/* Module contre-mesures ajoute au Jet HUD sans remplacer le HUD principal.
   Deux panneaux lateraux, plus grands, et places au-dessus du bloc GEAR/VTOL pour ne pas le masquer. */
.flares-panel {
    position: absolute;
    inset: 0;
    display: none;
    pointer-events: none;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-shadow: 0 0 2px var(--shadow), 0 0 8px rgba(0, 0, 0, 0.36);
    z-index: 4;
}

.flares-side {
    position: absolute;
    top: calc(50% + 82px);
    width: 252px;
    min-height: 118px;
    padding: 11px 13px 12px;
    background: rgba(0, 0, 0, 0.025);
    color: currentColor;
    border-top: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
}

.flares-side::before,
.flares-side::after {
    content: "";
    position: absolute;
    top: 11px;
    bottom: 11px;
    width: 2px;
    background: currentColor;
    opacity: 0.92;
}

.flares-side-left {
    left: calc(50% - 302px);
    transform: translate(-100%, -50%);
    text-align: right;
    border-left: 2px solid currentColor;
}

.flares-side-left::before {
    left: 0;
}

.flares-side-left::after {
    right: -14px;
    height: 2px;
    top: 50%;
    bottom: auto;
    width: 14px;
    transform: translateY(-50%);
}

.flares-side-right {
    left: calc(50% + 302px);
    transform: translate(0%, -50%);
    text-align: left;
    border-right: 2px solid currentColor;
}

.flares-side-right::before {
    left: -14px;
    height: 2px;
    top: 50%;
    bottom: auto;
    width: 14px;
    transform: translateY(-50%);
}

.flares-side-right::after {
    right: 0;
}

.flares-title {
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    opacity: 0.9;
}

.flares-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
    margin-top: 6px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.08;
    white-space: nowrap;
}

.flares-label {
    opacity: 0.62;
}

.flares-value {
    max-width: 142px;
    font-weight: 850;
    overflow: hidden;
    text-overflow: ellipsis;
}

.flares-side-left .flares-value {
    text-align: right;
}

.flares-side-right .flares-value {
    text-align: left;
}

.flares-progress {
    position: relative;
    width: 100%;
    height: 6px;
    margin-top: 12px;
    border: 1px solid currentColor;
    overflow: hidden;
    opacity: 0.98;
}

.flares-progress-fill {
    width: 0%;
    height: 100%;
    background: currentColor;
    transition: width 0.18s linear;
}

.flares-panel.deploying #flares-status,
.flares-panel.deploying #flares-mode {
    animation: flaresBlink 0.38s linear infinite;
}

.flares-panel.cooldown #flares-status {
    opacity: 0.78;
}

.flares-panel.empty .flares-progress-fill {
    width: 0%;
}

.flares-panel.chaff .flares-progress-fill {
    opacity: 0.76;
}

.green .flares-panel {
    color: var(--green);
}

.orange .flares-panel {
    color: var(--orange);
}

.red .flares-panel {
    color: var(--red);
}

.blue .flares-panel {
    color: var(--blue);
}

@keyframes flaresBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.38; }
}

@media (max-width: 1100px) {
    .flares-side {
        top: calc(50% + 76px);
        width: 220px;
        min-height: 108px;
        padding: 10px 11px;
    }

    .flares-side-left {
        left: calc(50% - 282px);
    }

    .flares-side-right {
        left: calc(50% + 282px);
    }

    .flares-row,
    .flares-title {
        font-size: 12px;
    }

    .flares-value {
        max-width: 118px;
    }
}

/* Les panneaux contre-mesures ne doivent jamais masquer les infos natives du Jet HUD. */
.gear-info,
.vtol-info {
    z-index: 6;
}
