/*
 * 4Fimo premium action tiles
 * Shared by Main and every large/small navigation-tile view.
 * Keep this component independent from Bootstrap and Font Awesome.
 */

.fimo-tile-grid {
    display: grid !important;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.fimo-tile-grid > .grid-options {
    display: contents !important;
}

.fimo-tile {
    position: relative;
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 142px !important;
    height: 142px !important;
    margin: 0 !important;
    padding: 14px 10px 12px !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 1px solid rgba(103, 80, 220, 0.115) !important;
    border-radius: 20px !important;
    color: #2a214e !important;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.99), rgba(249, 247, 255, 0.95)) !important;
    box-shadow: 0 9px 24px rgba(51, 33, 121, 0.065) !important;
    overflow: hidden;
    text-decoration: none !important;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
    isolation: isolate;
    -webkit-tap-highlight-color: transparent;
}

.fimo-tile::after {
    position: absolute;
    z-index: -1;
    right: -30px;
    bottom: -42px;
    width: 108px;
    height: 108px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(112, 85, 235, 0.09), rgba(112, 85, 235, 0));
    content: "";
    pointer-events: none;
}

.fimo-tile__media,
.fimo-tile > .img_wrapper,
.fimo-tile > .imageWrapper {
    display: grid !important;
    width: 78px !important;
    height: 78px !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    place-items: center;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.fimo-tile__media > img,
.fimo-tile > .img_wrapper > img,
.fimo-tile > .imageWrapper > img,
.fimo-tile > img {
    display: block !important;
    width: 72px !important;
    height: 72px !important;
    max-width: 100% !important;
    max-height: 100% !important;
    margin: 0 !important;
    object-fit: contain;
}

.fimo-tile__label,
.fimo-tile > p,
.fimo-tile > span:not(.fimo-tile__badge):not(.badges2):not(.fimo-tile__media):not(.fimo-tile__copy):not(.imageWrapper) {
    display: block;
    width: 100%;
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
    color: #2b214f !important;
    background: transparent !important;
    font-family: "Fimo Inter", "Segoe UI", Arial, sans-serif !important;
    font-size: 0.86rem !important;
    font-weight: 740 !important;
    line-height: 1.2 !important;
    letter-spacing: -0.01em;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fimo-tile__copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-align: center;
}

.fimo-tile__copy strong {
    color: #2b214f;
    font-size: 0.86rem;
    font-weight: 740;
    line-height: 1.2;
}

.fimo-tile__copy small {
    color: #81799e;
    font-size: 0.69rem;
    font-weight: 560;
    line-height: 1.25;
}

.fimo-tile__badge,
.fimo-tile > .badges2 {
    position: absolute !important;
    z-index: 3;
    top: 10px !important;
    right: 10px !important;
    bottom: auto !important;
    left: auto !important;
    display: grid !important;
    width: auto !important;
    min-width: 22px !important;
    height: 22px !important;
    min-height: 22px !important;
    margin: 0 !important;
    padding: 0 6px !important;
    place-items: center;
    border: 2px solid #ffffff !important;
    border-radius: 999px !important;
    color: #ffffff !important;
    background: linear-gradient(135deg, #5554fe, #875fff) !important;
    box-shadow: 0 5px 12px rgba(78, 57, 190, 0.22) !important;
    font-size: 0.61rem !important;
    font-weight: 820 !important;
    line-height: 1 !important;
}

.fimo-tile > .badges2 > span {
    display: block;
    width: auto;
    min-width: 0;
    height: auto;
    margin: 0;
    padding: 0;
    border: 0;
    color: #ffffff;
    background: transparent;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
}

.fimo-tile--compact {
    min-height: 102px !important;
    height: 102px !important;
    padding: 11px 8px 10px !important;
    gap: 8px;
    border-color: rgba(103, 80, 220, 0.13) !important;
    border-radius: 16px !important;
    background: #ffffff !important;
    box-shadow: none !important;
}

.fimo-tile--compact::after {
    display: none;
}

.fimo-tile--compact .fimo-tile__media,
.fimo-tile--compact > .img_wrapper,
.fimo-tile--compact > .imageWrapper {
    width: 43px !important;
    height: 43px !important;
    border: 1px solid rgba(103, 80, 220, 0.11) !important;
    border-radius: 13px !important;
    background: #f2efff !important;
    box-shadow: none !important;
}

.fimo-tile--compact .fimo-tile__media > img,
.fimo-tile--compact > .img_wrapper > img,
.fimo-tile--compact > .imageWrapper > img,
.fimo-tile--compact > img {
    width: 25px !important;
    height: 25px !important;
}

.fimo-tile--compact .fimo-tile__media > svg,
.fimo-tile--compact > .img_wrapper > svg,
.fimo-tile--compact > .imageWrapper > svg {
    display: block;
    width: 24px;
    height: 24px;
    overflow: visible;
    fill: none;
    stroke: #654cdd;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

@media (hover: hover) and (pointer: fine) {
    .fimo-tile:hover {
        border-color: rgba(103, 80, 220, 0.22) !important;
        box-shadow: 0 14px 29px rgba(51, 33, 121, 0.105) !important;
        transform: translateY(-2px);
    }

    .fimo-tile--compact:hover {
        border-color: rgba(103, 80, 220, 0.24) !important;
        background: #faf9ff !important;
        box-shadow: none !important;
        transform: none;
    }
}

.fimo-tile:focus-visible {
    outline: 3px solid rgba(91, 75, 226, 0.2);
    outline-offset: 3px;
}

.fimo-tile:active {
    transform: translateY(0);
}

@media (max-width: 600px) {
    .fimo-tile-grid {
        gap: 10px;
    }

    .fimo-tile {
        min-height: 124px !important;
        height: 124px !important;
        padding: 11px 8px 10px !important;
        border-radius: 17px !important;
    }

    .fimo-tile__media,
    .fimo-tile > .img_wrapper,
    .fimo-tile > .imageWrapper {
        width: 65px !important;
        height: 65px !important;
    }

    .fimo-tile__media > img,
    .fimo-tile > .img_wrapper > img,
    .fimo-tile > .imageWrapper > img,
    .fimo-tile > img {
        width: 61px !important;
        height: 61px !important;
    }

    .fimo-tile--compact {
        min-height: 96px !important;
        height: 96px !important;
    }

    .fimo-tile--compact .fimo-tile__media,
    .fimo-tile--compact > .img_wrapper,
    .fimo-tile--compact > .imageWrapper {
        width: 40px !important;
        height: 40px !important;
    }

    .fimo-tile--compact .fimo-tile__media > img,
    .fimo-tile--compact > .img_wrapper > img,
    .fimo-tile--compact > .imageWrapper > img,
    .fimo-tile--compact > img {
        width: 23px !important;
        height: 23px !important;
    }

    .fimo-tile--compact .fimo-tile__media > svg,
    .fimo-tile--compact > .img_wrapper > svg,
    .fimo-tile--compact > .imageWrapper > svg {
        width: 22px;
        height: 22px;
    }
}

/*
 * Authoritative main.jsp presentation.
 * Apply these modifiers where older page CSS has more specific card rules.
 */
.fimo-tile-grid.fimo-tile-grid--main-model {
    display: grid !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
}

.fimo-tile-grid--main-model > .fimo-tile.fimo-tile--main-model {
    position: relative;
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 142px !important;
    height: 142px !important;
    margin: 0 !important;
    padding: 14px 10px 12px !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    overflow: hidden;
    border: 1px solid rgba(103, 80, 220, 0.115) !important;
    border-radius: 20px !important;
    color: #2a214e !important;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.99), rgba(249, 247, 255, 0.95)) !important;
    box-shadow: 0 9px 24px rgba(51, 33, 121, 0.065) !important;
    text-decoration: none !important;
    isolation: isolate;
    -webkit-tap-highlight-color: transparent;
}

.fimo-tile-grid--main-model > .fimo-tile.fimo-tile--main-model::after {
    position: absolute;
    z-index: -1;
    right: -30px;
    bottom: -42px;
    display: block;
    width: 108px;
    height: 108px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(112, 85, 235, 0.09), rgba(112, 85, 235, 0));
    content: "";
    pointer-events: none;
}

.fimo-tile-grid.fimo-tile-grid--main-model > .fimo-tile--main-model .fimo-tile__media {
    display: grid !important;
    width: 78px !important;
    height: 78px !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    place-items: center;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.fimo-tile-grid.fimo-tile-grid--main-model > .fimo-tile--main-model .fimo-tile__media > img {
    display: block !important;
    width: 72px !important;
    height: 72px !important;
    max-width: 100% !important;
    max-height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    object-fit: contain;
}

.fimo-tile-grid.fimo-tile-grid--main-model > .fimo-tile--main-model .fimo-tile__label {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    color: #2b214f !important;
    background: transparent !important;
    font-family: "Fimo Inter", "Segoe UI", Arial, sans-serif !important;
    font-size: 0.86rem !important;
    font-weight: 740 !important;
    line-height: 1.2 !important;
    letter-spacing: -0.01em;
    text-align: center;
    text-overflow: clip;
    white-space: normal;
}

@media (hover: hover) and (pointer: fine) {
    .fimo-tile-grid--main-model > .fimo-tile.fimo-tile--main-model:hover {
        border-color: rgba(103, 80, 220, 0.22) !important;
        background: linear-gradient(145deg, rgba(255, 255, 255, 0.99), rgba(249, 247, 255, 0.95)) !important;
        box-shadow: 0 14px 29px rgba(51, 33, 121, 0.105) !important;
        transform: translateY(-2px);
    }
}

@media (max-width: 600px) {
    .fimo-tile-grid.fimo-tile-grid--main-model {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 9px !important;
    }

    .fimo-tile-grid--main-model > .fimo-tile.fimo-tile--main-model {
        min-height: 124px !important;
        height: 124px !important;
        padding: 10px 6px 9px !important;
        border-radius: 17px !important;
    }

    .fimo-tile-grid.fimo-tile-grid--main-model > .fimo-tile--main-model .fimo-tile__media {
        width: 65px !important;
        height: 65px !important;
    }

    .fimo-tile-grid.fimo-tile-grid--main-model > .fimo-tile--main-model .fimo-tile__media > img {
        width: 61px !important;
        height: 61px !important;
    }

    .fimo-tile-grid.fimo-tile-grid--main-model > .fimo-tile--main-model .fimo-tile__label {
        font-size: 0.78rem !important;
    }
}

@media (max-width: 360px) {
    .fimo-tile-grid.fimo-tile-grid--main-model {
        gap: 7px !important;
    }

    .fimo-tile-grid--main-model > .fimo-tile.fimo-tile--main-model {
        min-height: 116px !important;
        height: 116px !important;
        padding-right: 4px !important;
        padding-left: 4px !important;
    }

    .fimo-tile-grid.fimo-tile-grid--main-model > .fimo-tile--main-model .fimo-tile__media {
        width: 58px !important;
        height: 58px !important;
    }

    .fimo-tile-grid.fimo-tile-grid--main-model > .fimo-tile--main-model .fimo-tile__media > img {
        width: 56px !important;
        height: 56px !important;
    }

    .fimo-tile-grid.fimo-tile-grid--main-model > .fimo-tile--main-model .fimo-tile__label {
        font-size: 0.72rem !important;
    }
}

@media (max-width: 330px) {
    .fimo-tile {
        min-height: 116px !important;
        height: 116px !important;
    }

    .fimo-tile__media,
    .fimo-tile > .img_wrapper,
    .fimo-tile > .imageWrapper {
        width: 59px !important;
        height: 59px !important;
    }

    .fimo-tile__media > img,
    .fimo-tile > .img_wrapper > img,
    .fimo-tile > .imageWrapper > img,
    .fimo-tile > img {
        width: 56px !important;
        height: 56px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fimo-tile {
        transition: none;
    }
}
