/**
 * Frontend Styles for Airport Departures Plugin
 */

.airport-departures-container {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Header */
.airport-departures-header {
    border-bottom: 2px solid #0073aa;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.airport-departures-heading {
    margin: 0 0 10px 0;
    font-size: 28px;
    color: #23282d;
    font-weight: 600;
}

.airport-departures-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #646970;
}

.airport-code {
    background: #0073aa;
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 1px;
}

.last-updated {
    font-style: italic;
}

/* Table */
.departures-table-wrapper {
    overflow-x: auto;
    margin-bottom: 20px;
}

.airport-departures-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

.airport-departures-table thead {
    background: #f0f0f1;
}

.airport-departures-table th {
    padding: 12px 10px;
    text-align: left;
    font-weight: 600;
    color: #23282d;
    border-bottom: 2px solid #dcdcde;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.airport-departures-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #f0f0f1;
    font-size: 14px;
    color: #23282d;
}

.airport-departures-table tbody tr {
    transition: background-color 0.2s ease;
}

.airport-departures-table tbody tr:hover {
    background-color: #f9f9f9;
}

/* Column widths */
.col-flight {
    width: 10%;
    min-width: 80px;
}

.col-airline {
    width: 18%;
    min-width: 150px;
}

/* Airline info with logo */
.airline-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.airline-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 4px;
    background: #f9f9f9;
    padding: 2px;
}

.airline-name {
    flex: 1;
}

.col-destination {
    width: 25%;
    min-width: 180px;
}

.col-time {
    width: 10%;
    min-width: 80px;
}

.col-gate {
    width: 8%;
    min-width: 60px;
}

.col-terminal {
    width: 8%;
    min-width: 70px;
}

.col-status {
    width: 12%;
    min-width: 100px;
}

/* Destination info */
.destination-info {
    display: flex;
    flex-direction: column;
}

.destination-name {
    font-weight: 500;
}

.destination-code {
    font-size: 12px;
    color: #646970;
    margin-top: 2px;
}

/* Gate number */
.gate-number {
    background: #f0f0f1;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
    display: inline-block;
}

/* Time styling */
.time-delayed {
    color: #d63638;
    font-weight: 600;
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-scheduled {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-boarding {
    background: #fff3e0;
    color: #ef6c00;
}

.status-departed {
    background: #e3f2fd;
    color: #1565c0;
}

.status-delayed {
    background: #ffebee;
    color: #c62828;
}

.status-cancelled {
    background: #f5f5f5;
    color: #616161;
}

/* Row status colors */
.departure-row.status-delayed {
    background-color: #fff9f9;
}

.departure-row.status-cancelled {
    opacity: 0.6;
}

.departure-row.status-boarding {
    background-color: #fffef5;
}

/* Empty state */
.airport-departures-empty {
    text-align: center;
    padding: 40px 20px;
    color: #646970;
}

.airport-departures-empty p {
    font-size: 16px;
    margin: 0;
}

/* Footer */
.airport-departures-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 15px;
    border-top: 1px solid #f0f0f1;
}

.auto-refresh-status {
    color: #646970;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-style: italic;
}

.refresh-icon {
    font-size: 16px;
    display: inline-block;
    color: #0073aa;
    animation: rotate 3s linear infinite;
}

.refresh-interval {
    font-weight: 600;
    color: #0073aa;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Responsive design */
@media screen and (max-width: 1024px) {
    .airport-departures-table {
        font-size: 13px;
    }
    
    .airport-departures-table th,
    .airport-departures-table td {
        padding: 10px 8px;
    }
}

@media screen and (max-width: 768px) {
    .airport-departures-container {
        padding: 15px;
    }
    
    .airport-departures-heading {
        font-size: 22px;
    }
    
    .airport-departures-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .airport-departures-table {
        font-size: 12px;
    }
    
    .airport-departures-table th,
    .airport-departures-table td {
        padding: 8px 6px;
    }
    
    .col-airline,
    .col-terminal {
        display: none;
    }
    
    .destination-name {
        font-size: 13px;
    }
    
    .destination-code {
        font-size: 11px;
    }
    
    .airline-logo {
        width: 24px;
        height: 24px;
    }
}

@media screen and (max-width: 480px) {
    .airport-departures-heading {
        font-size: 18px;
    }
    
    .airport-code {
        font-size: 14px;
        padding: 3px 10px;
    }
    
    .last-updated {
        font-size: 12px;
    }
    
    .col-destination {
        min-width: 120px;
    }
    
    .status-badge {
        font-size: 10px;
        padding: 4px 8px;
    }
}