/* ============================================================
   DEPARTURES PAGE - departures.css
   Place this file at: css/departures.css
   ============================================================ */

/* Last updated bar */
.dep-updated {
    font-size: 13px;
    color: #888;
    text-align: right;
    padding: 12px 0 10px;
    border-bottom: 1px solid #eee;
    margin-bottom: 14px;
}

/* Desktop column headers */
.dep-header {
    display: grid;
    grid-template-columns: 110px 1fr 140px 80px 150px;
    gap: 12px;
    padding: 0 14px 8px;
    margin-bottom: 4px;
}

.dep-header-cell {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #aaa;
    font-weight: 600;
}

.dep-center {
    text-align: center;
}

/* Flight list wrapper */
.dep-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* -------------------------------------------------------
   Flight card — desktop: 4-column grid
   col 1: .dep-top-row (logo + flight info)
   col 2: .dep-to      (via display:contents on .dep-mid-row)
   col 3: .dep-gate    (via display:contents on .dep-mid-row)
   col 4: .dep-status
   ------------------------------------------------------- */
.dep-card {
    display: grid;
    grid-template-columns: 1fr 140px 80px 150px;
    gap: 12px;
    /*align-items: center;*/
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 14px;
    transition: box-shadow 0.2s ease;
}

.dep-card:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

/* Logo + flight side-by-side in column 1 */
.dep-top-row {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 30px;
    align-items: center;
}

/* display:contents lifts dep-to and dep-gate into the parent grid */
.dep-mid-row {
    display: contents;
}

/* Mobile scheduled duplicate — hidden on desktop */
.dep-sched-mob {
    display: none;
}

/* Airline logo */
.dep-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f6f6f4;
    border-radius: 8px;
    padding: 8px;
    height: 54px;
}

.dep-logo img {
    max-width: 140px;
    max-height: 50px;
    object-fit: contain;
}

/* Flight info */
.dep-flight {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.dep-flight-number {
    font-size: 17px;
    font-weight: 600;
    color: #222;
    line-height: 1.3;
}

.dep-cs {
    font-size: 11px;
    color: #999;
    font-weight: 400;
    margin-left: 4px;
}

.dep-city {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: #444;
}

.dep-dot {
    color: #e8a020;
    font-size: 10px;
    line-height: 1;
}

.dep-via {
    font-size: 11px;
    color: #aaa;
    font-style: italic;
}

.dep-sched {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}


.dep-label {
    display: block;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #00BCD4;
    margin-bottom: 1px;
}

.dep-time {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #222;
}

/* To (destination) column */
.dep-to {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.dep-to-city {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    font-weight: 500;
    color: #222;
}

.dep-pin-icon {
    width: 13px;
    height: 13px;
    color: #e8a020;
    flex-shrink: 0;
}

.dep-to-via {
    font-size: 10px;
    color: #aaa;
    font-style: italic;
    padding-left: 18px;
}

/* Gate column */
.dep-gate {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-align: center;
}

.dep-gate-num {
    font-size: 22px;
    font-weight: 700;
    color: #222;
    line-height: 1.1;
}

.dep-gate-empty {
    font-size: 18px;
    color: #ccc;
}

/* Status badge */
.dep-status {
    display: flex;
    align-items: center;
}

.dep-badge {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    text-align: center;
    width: 100%;
    min-height: 40px;
    line-height: 1.4;
    box-sizing: border-box;
}

/* Departed / Gate Open / Now Boarding — Green */
.dep-badge-departed { background:#559d55 ; color: #f8fdfb; }
.dep-badge-nowboarding  { background:#2bb52b ; color: #f8fdfb; }
.dep-badge-gateopen  { background: #1e951e; color: #f8fdfb; }
/* Expected at — Blue */
.dep-badge-expected  { background: #876b5f; color: #f8fdfb; }
/* Final Call — Red */
.dep-badge-finalcall { background: #d9534f; color: #f8fdfb; }
/* Gate Closed — Dark grey */
.dep-badge-gateclosed { background: #afada3; color: #f1efe8; }
/* Cancelled — Red (lighter) */
.dep-badge-cancelled { background: #b97574; color: #fcebeb; }
/* Delayed / default — Amber */
.dep-badge-delayed   { background: #ef9f27; color: #412402; }
/* Default */
.dep-badge-default   { background:  #3c3a39; color: #f0f0ee; border: 1px solid #e0e0e0; }

/* No data */
.dep-no-flights {
    text-align: center;
    color: #aaa;
    padding: 40px 0;
    font-size: 14px;
}
.large-icon {
  font-size: 24px;
}


/* ============================================================
   TABLET  (641px – 900px)
   ============================================================ */
@media (max-width: 900px) {
    .dep-header { display: none; }

    .dep-card {
        grid-template-columns: 1fr 110px 20px 120px;
        gap: 10px;
        padding: 12px;
    }

    .dep-top-row {
        grid-template-columns: 120px 1fr;
    }

    .dep-gate-num { font-size: 18px; }
}
/* ============================================================
   Tablet (max-width: 768px)
   ============================================================ */

@media (max-width: 768px) {
    .arr-top-row,
    .dep-top-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* ============================================================
   MOBILE  (max-width: 640px)
   ============================================================ */
@media (max-width: 640px) {
    .dep-header { display: none; }

    /* Stack card as flex column */
    .dep-card {
        display: flex;
        flex-direction: column;
        gap: 0;
        padding: 12px;
    }

    /* Row 1: logo + flight info */
    .dep-top-row {
        display: grid;
        grid-template-columns: 58px 1fr;
        gap: 10px;
        align-items: start;
    }

    .dep-logo {
        height: 44px;
        padding: 6px;
        justify-content: flex-start;
    }

    .dep-logo img {
        max-width: 52px;
        max-height: 30px;
    }

    /* Hide desktop scheduled — shown in mid row instead */
    .dep-sched { display: none; }

    /* Row 2: Scheduled | To | Gate */
    .dep-mid-row {
        display: grid;
        grid-template-columns: 1fr 1fr 60px;
        gap: 8px;
        border-top: 1px solid #f0f0ee;
        margin-top: 10px;
        padding-top: 10px;
    }

    /* Now show mobile scheduled cell */
    .dep-sched-mob {
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    .dep-to {
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    .dep-to-city { font-size: 13px; }

    .dep-gate {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .dep-gate-num { font-size: 18px; }

    /* Row 3: full-width status badge */
    .dep-status {
        display: flex;
        border-top: 1px solid #f0f0ee;
        margin-top: 10px;
        padding-top: 10px;
    }

    .dep-updated {
        font-size: 11px;
        text-align: left;
    }
}
.takeoff-icon {
  display: inline-block;
  animation: takeoff 1s ease-out forwards;
}

@keyframes takeoff {
  from {
    transform: rotate(0deg) translate(0, 0);
  }
  to {
    transform: rotate(-25deg) translate(3px, -4px);
  }
}
/* ============================================================
   EXTRA SMALL  (max-width: 380px)
   ============================================================ */
@media (max-width: 380px) {
    .dep-flight-number { font-size: 13px; }
    .dep-city          { font-size: 12px; }
    .dep-to-city       { font-size: 12px; }
    .dep-mid-row       { grid-template-columns: 1fr 1fr 52px; gap: 6px; }
}
