/* =========================================================
   Raccourci de farm optimal compact
   Cette feuille est volontairement chargée après les CSS historiques.
   Le nom des GRAND BOSS conserve désormais exactement la typographie et
   l'alignement communs aux autres monstres.
   ========================================================= */

/* Le contrôle OPTIMAL vit dans le rail, juste après la flèche zone max. */
.level-selector-container {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
}

.optimalCrystalControl {
    position: relative;
    display: block;
    flex: 0 0 auto;
    width: 28px;
    height: 46px;
    margin: 0;
    border: 1px solid rgba(116, 190, 222, .66);
    border-radius: 10px;
    overflow: visible;
    background: linear-gradient(180deg, rgba(23, 76, 112, .97), rgba(8, 43, 70, .99));
    box-shadow: 0 4px 8px rgba(0, 0, 0, .28), inset 0 1px rgba(255, 255, 255, .13);
}

.optimalCrystalZone {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    line-height: 1;
    box-shadow: none;
    cursor: pointer;
    touch-action: manipulation;
    max-width: none;
    border-radius: 9px;
    color: #fff1b9;
    font-size: 17px;
}

.optimalCrystalZone:hover:not(:disabled),
.optimalCrystalZone:focus-visible {
    outline: none;
    filter: brightness(1.18);
}

.optimalCrystalZone:active:not(:disabled) {
    transform: scale(.94);
}

.optimalCrystalZone:disabled {
    cursor: default;
    opacity: .42;
}

.optimalCrystalControl.is-current {
    border-color: rgba(102, 228, 240, .8);
    box-shadow: 0 0 0 1px rgba(102, 228, 240, .2), 0 4px 8px rgba(0, 0, 0, .28);
}

.optimalCrystalControl.is-pending {
    opacity: .72;
}

.optimalCrystalInlineInfo {
    /*
     * Le texte est centré sur toute la largeur du level tray. Le trait blanc
     * commence au début réel du texte puis remonte jusqu'au centre bas du bouton
     * OPTIMAL. Desktop : padding rail 8px + demi-largeur bouton 14px = 22px.
     */
    --optimal-link-right: 22px;
    --optimal-link-height: 32px;

    position: relative;
    margin-top: 4px;
    min-height: 14px;
    padding: 0 0 6px;
    color: #ffffff;
    font-family: "Poppins", Arial, sans-serif;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.15;
    text-align: center;
    text-shadow: none;
    white-space: nowrap;
    overflow: visible;
}

/* Trait horizontal sous l'info optimale. */
.optimalCrystalInlineInfo::before {
    content: "";
    position: absolute;
    z-index: 0;
    left: var(--optimal-line-left, 0px);
    right: var(--optimal-link-right);
    bottom: 0;
    height: 1px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 1px 0 rgba(0, 0, 0, .92);
    pointer-events: none;
}

/* Remontée verticale jusqu'au bouton OPTIMAL. */
.optimalCrystalInlineInfo::after {
    content: "";
    position: absolute;
    z-index: 0;
    right: var(--optimal-link-right);
    bottom: 0;
    width: 1px;
    height: var(--optimal-link-height);
    background: rgba(255, 255, 255, .96);
    box-shadow: 1px 0 0 rgba(0, 0, 0, .92);
    pointer-events: none;
}

/*
 * Même traitement que les noms de combat : contour noir net puis ombre
 * portée appliquée à la silhouette déjà rendue, sans text-shadow diffus.
 */
.optimalCrystalInlineInfo > span {
    position: relative;
    z-index: 2;
    display: inline-block;
    -webkit-text-stroke: 0.5px #000;
    text-shadow: none !important;
    filter:
        drop-shadow(0 1px 0 #000)
        drop-shadow(0 1px 1px rgba(0, 0, 0, .95))
        drop-shadow(0 0 1px rgba(0, 0, 0, .9));
}

#optimalCrystalInlineLabel {
    color: #ffffff;
    font-weight: 900;
}

#optimalCrystalInlineZone {
    color: #ffffff;
}

#optimalCrystalInlineRate {
    color: #8ff5ff;
}

#optimalCrystalInlineGain {
    color: #b9f5c8;
}

@media (max-width: 520px) {
    .optimalCrystalInlineInfo {
        /* Rail mobile : padding droit 6px + demi-largeur OPTIMAL 14px. */
        --optimal-link-right: 21px;
        --optimal-link-height: 28px;
    }
}
@media (max-width: 390px) {
    .optimalCrystalControl {
        width: 30px;
        height: 42px;
    }

    .optimalCrystalZone {
        font-size: 15px;
    }

    .optimalCrystalInlineInfo {
        /* Mobile : padding rail 6px + demi-largeur bouton 19px = 25px. */
        --optimal-link-right: 21px;
        --optimal-link-height: 24px;
        margin-top: 3px;
        min-height: 12px;
        padding-right: 0;
        padding-left: 0;
        padding-bottom: 5px;
        font-size: 9px;
    }
}
