/* =============================================================================
   FLIGHT BOARD COMPONENT STYLES
   Split-flap display (Solari Board) simulation for airport flight information
   ============================================================================= */

/* Base Airport Display Row */
.airport-display-row {
    background: linear-gradient(145deg, #1a1a1a 0%, #0f0f0f 100%);
    border: 0;
    border-radius: 8px;
    padding: 1px 19px;
    margin: 5px;
    position: relative;
    overflow: hidden;
}

.airport-display-cell {
    display: inline-flex;
    justify-content: flex-start;
    align-items: center;
    min-height: 40px;
}

/* Continuous display - CENTERED */
.continuous-flap-display {
    display: flex;
    justify-content: center; /* CENTER THE FLAPS */
    align-items: center;
    width: 100%;
    overflow-x: auto;
}

/* Flight board container - CENTERED */
.flight-board-container {
    border: 2px solid #333;
    border-radius: 12px;
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.5);
    overflow: hidden;
    background: #0f0f0f;
    margin: 0 auto; /* CENTER THE BOARD */
    max-width: fit-content; /* FIT TO CONTENT SIZE */
}

/* Individual Split-Flap Character - UNIFORM GRAY REALISTIC */
.split-flap-char {
    display: inline-block;
    font-family: 'Courier New', 'Monaco', 'Menlo', monospace;
    font-weight: 900;
    font-size: 18px;
    line-height: 1;
    width: 20px;
    height: 32px;
    text-align: center;
    position: relative;
    margin: 0;
    /* Force consistent character spacing */
    letter-spacing: 0;
    word-spacing: 0;

    /* UNIFORM REALISTIC GRAY - Like real airport displays */
    background: linear-gradient(180deg, #2a2a2a 0%, #1a1a1a 50%, #0f0f0f 100%);
    border: 1px solid #444;
    border-radius: 4px;
    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 0.1),
        inset 0 -2px 0 rgba(0, 0, 0, 0.6),
        0 2px 4px rgba(0, 0, 0, 0.3),
        0 1px 2px rgba(0, 0, 0, 0.5);

    /* Character positioning */
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e5e7eb; /* Uniform light gray text */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);

    /* 3D perspective for realistic depth */
    transform-style: preserve-3d;
    perspective: 100px;
}

/* Red color for Offline network status */
.split-flap-char.offline {
    color: #ef4444 !important; /* Red 500 */
    text-shadow: 0 1px 2px rgba(239, 68, 68, 0.8);
}

/* Header flap chars - IDENTICAL font properties to data chars */
.header-flap-char {
    display: inline-block;
    font-family: 'Courier New', 'Monaco', 'Menlo', monospace;
    font-weight: 900; /* IDENTICAL to split-flap-char */
    font-size: 18px; /* IDENTICAL to split-flap-char */
    line-height: 1; /* IDENTICAL to split-flap-char */
    width: 20px; /* IDENTICAL to split-flap-char */
    height: 32px; /* IDENTICAL to split-flap-char */
    text-align: center;
    position: relative;
    margin: 0; /* IDENTICAL to split-flap-char */
    /* Force consistent character spacing - IDENTICAL */
    letter-spacing: 0;
    word-spacing: 0;

    /* Different styling for header (only visual, not layout) */
    background: linear-gradient(180deg, #374151 0%, #1f2937 50%, #111827 100%);
    border: 1px solid #4b5563;
    border-radius: 4px;
    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 0.1),
        inset 0 -2px 0 rgba(0, 0, 0, 0.6),
        0 2px 4px rgba(0, 0, 0, 0.3);

    /* Character positioning - IDENTICAL to split-flap-char */
    display: flex;
    align-items: center;
    justify-content: center;
    color: #22c55e; /* Only difference: Webjet green vs gray */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8); /* IDENTICAL shadow */

    /* 3D perspective - IDENTICAL to split-flap-char */
    transform-style: preserve-3d;
    perspective: 100px; /* ADDED: same as split-flap-char */
}

/* Continuous display - NO GAPS */
.continuous-flap-display {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    overflow-x: auto;
}

/* =============================================================================
   REALISTIC SPLIT-FLAP ANIMATIONS (SOLARI BOARD STYLE)
   ============================================================================= */

@keyframes solariFlapDrop {
    0% {
        transform: perspective(100px) rotateX(-90deg);
        opacity: 0.7;
        box-shadow:
            inset 0 2px 0 rgba(255, 255, 255, 0.1),
            inset 0 -2px 0 rgba(0, 0, 0, 0.6),
            0 6px 12px rgba(0, 0, 0, 0.6),
            0 2px 8px rgba(34, 197, 94, 0.3);
    }
    15% {
        transform: perspective(100px) rotateX(-75deg);
        opacity: 0.8;
        background: linear-gradient(180deg, #3a3a3a 0%, #2a2a2a 50%, #1a1a1a 100%);
    }
    30% {
        transform: perspective(100px) rotateX(-45deg);
        opacity: 0.9;
        background: linear-gradient(180deg, #4a4a4a 0%, #3a3a3a 50%, #2a2a2a 100%);
        box-shadow:
            inset 0 3px 0 rgba(255, 255, 255, 0.15),
            inset 0 -3px 0 rgba(0, 0, 0, 0.7),
            0 8px 16px rgba(0, 0, 0, 0.4),
            0 0 20px rgba(34, 197, 94, 0.4);
    }
    60% {
        transform: perspective(100px) rotateX(-15deg);
        opacity: 0.95;
        background: linear-gradient(180deg, #3a3a3a 0%, #2a2a2a 50%, #1a1a1a 100%);
    }
    80% {
        transform: perspective(100px) rotateX(-5deg);
        opacity: 0.98;
    }
    100% {
        transform: perspective(100px) rotateX(0deg);
        opacity: 1;
        background: linear-gradient(180deg, #2a2a2a 0%, #1a1a1a 50%, #0f0f0f 100%);
        box-shadow:
            inset 0 2px 0 rgba(255, 255, 255, 0.1),
            inset 0 -2px 0 rgba(0, 0, 0, 0.6),
            0 2px 4px rgba(0, 0, 0, 0.3),
            0 1px 2px rgba(0, 0, 0, 0.5);
    }
}

/* Animation Class */
.flap-animate {
    animation: solariFlapDrop 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-origin: center top;
}

/* =============================================================================
   RESPONSIVE DESIGN
   ============================================================================= */

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .split-flap-char {
        width: 16px;
        height: 28px;
        font-size: 14px;
    }

    .header-flap-char {
        width: 16px;
        height: 28px;
        font-size: 14px;
    }

    .mobile-info {
        font-size: 12px;
        color: #9ca3af;
        font-family: monospace;
        margin-top: 8px;
        text-align: center;
    }
}