/**
 * FIDS Plugin Styles
 * Styles for flight information display tables
 */

.fids-container {
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    font-family: Arial, sans-serif;
}

.fids-title {
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

.fids-loading {
    text-align: center;
    padding: 20px;
    font-size: 1.1em;
    color: #666;
}

.fids-error {
    text-align: center;
    padding: 20px;
    font-size: 1.1em;
    color: #d32f2f;
    background-color: #ffebee;
    border: 1px solid #ffcdd2;
    border-radius: 4px;
    margin: 10px 0;
}

.fids-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
    margin-top: 10px;
    transition: opacity 0.3s ease-in-out;
}

.fids-table thead {
    background-color: #333;
    color: #fff;
}

.fids-table th {
    padding: 15px;
    text-align: center;
    font-weight: bold;
    font-size: 1em;
}

.fids-table tbody tr {
    transition: background-color 0.2s;
}

.fids-table tbody tr:nth-child(even) {
    background-color: #f5f5f5;
}

.fids-table tbody tr:nth-child(odd) {
    background-color: #ffffff;
}

.fids-table tbody tr:hover {
    background-color: #e8e8e8;
}

.fids-table td {
    padding: 15px;
    text-align: center;
    border: none;
    font-size: 0.95em;
    vertical-align: middle;
}

/* Hide gate column for arrivals */
.fids-arrival-table .fids-gate-column,
.fids-arrival-table .fids-gate-cell {
    display: none;
}

/* Airline logo styling */
.fids-airline-logo {
    max-width: 120px;
    max-height: 40px;
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto;
}

.fids-airline-logo-cell {
    width: 150px;
}

.fids-table tbody tr:first-child td:first-child {
    border-top-left-radius: 8px;
}

.fids-table tbody tr:first-child td:last-child {
    border-top-right-radius: 8px;
}

.fids-table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 8px;
}

.fids-table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 8px;
}

/* Status badges */
.fids-status-ontime {
    color: #4caf50;
    font-weight: bold;
}

.fids-status-delayed {
    color: #ff9800;
    font-weight: bold;
}

.fids-status-cancelled {
    color: #f44336;
    font-weight: bold;
}

.fids-status-departed {
    color: #9c27b0;
    font-weight: bold;
}

.fids-status-arrived {
    color: #4caf50;
    font-weight: bold;
}

.fids-status-arrived-ontime {
    color: #2196f3;
    font-weight: bold;
}

/* Responsive design */
@media screen and (max-width: 768px) {
    .fids-container {
        padding: 10px;
    }

    .fids-title {
        font-size: 1.5em;
    }

    .fids-table {
        font-size: 0.85em;
    }

    .fids-table th,
    .fids-table td {
        padding: 10px 8px;
    }

    /* Stack table on small screens */
    .fids-table,
    .fids-table thead,
    .fids-table tbody,
    .fids-table th,
    .fids-table td,
    .fids-table tr {
        display: block;
    }

    .fids-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    .fids-table tr {
        border: 1px solid #ccc;
        margin-bottom: 10px;
        border-radius: 8px;
        padding: 10px;
    }

    .fids-table td {
        border: none;
        position: relative;
        padding-left: 40%;
        text-align: left;
        padding-top: 12px;
        padding-bottom: 12px;
        border-bottom: 1px solid #e0e0e0;
    }

    .fids-table td:last-child {
        border-bottom: none;
    }

    .fids-table td:before {
        content: attr(data-label);
        position: absolute;
        left: 6px;
        width: 35%;
        padding-right: 10px;
        white-space: nowrap;
        font-weight: bold;
        color: #666;
        text-transform: uppercase;
        font-size: 0.85em;
        letter-spacing: 0.5px;
    }

    /* Airline logo cell in responsive */
    .fids-table td.fids-airline-logo-cell {
        padding-left: 40%;
    }

    .fids-table td.fids-airline-logo-cell .fids-airline-logo {
        max-width: 80px;
        max-height: 30px;
    }

    /* Ensure gate column is hidden on mobile for arrivals */
    .fids-arrival-table .fids-gate-cell {
        display: none;
    }
}

/* Print styles */
@media print {
    .fids-container {
        max-width: 100%;
    }

    .fids-table {
        border-collapse: collapse;
    }

    .fids-table th,
    .fids-table td {
        border: 1px solid #ddd;
        padding: 8px;
    }
}

