/**
 * Aviation Stack Flight Tracker Public CSS
 *
 * @package    Aviation_Stack_Flight_Tracker
 */

/* General Styles */
.asft-flight-tracker {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    margin: 20px 0;
    color: #333;
}

.asft-attribution {
    font-size: 12px;
    text-align: right;
    margin-top: 8px;
    color: #777;
}

.asft-no-flights {
    padding: 20px;
    text-align: center;
    background: #f8f9fa;
    border-radius: 4px;
    color: #666;
}

.asft-delay {
    color: #e63946;
    font-weight: bold;
}

/* Status Colors */
.asft-status-scheduled .asft-status-label {
    color: #0077b6;
}

.asft-status-active .asft-status-label {
    color: #2a9d8f;
}

.asft-status-landed .asft-status-label {
    color: #4a4e69;
}

.asft-status-cancelled .asft-status-label {
    color: #e63946;
}

.asft-status-incident .asft-status-label {
    color: #e63946;
}

.asft-status-diverted .asft-status-label {
    color: #ee6c4d;
}

/* Table View */
.asft-table-view {
    overflow-x: auto;
}

.asft-flights-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    margin-bottom: 10px;
}

.asft-flights-table th {
    background-color: #f8f9fa;
    padding: 12px 15px;
    text-align: left;
    font-weight: bold;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.asft-flights-table tr {
    border-bottom: 1px solid #dee2e6;
}

.asft-flights-table tr:hover {
    background-color: #f1f3f5;
}

.asft-flights-table td {
    padding: 10px 15px;
    vertical-align: top;
}

.asft-flight-number {
    font-weight: bold;
}

.asft-airline-code, 
.asft-airport-code {
    color: #6c757d;
    font-size: 0.85em;
}

/* List View */
.asft-flights-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.asft-flight-item {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    margin-bottom: 15px;
    padding: 15px;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.asft-flight-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.asft-flight-number {
    font-size: 1.1em;
    font-weight: bold;
}

.asft-flight-airline {
    font-weight: bold;
    margin-bottom: 10px;
}

.asft-flight-route {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.asft-departure, 
.asft-arrival {
    flex: 1;
}

.asft-flight-arrow {
    display: flex;
    align-items: center;
    padding: 0 15px;
    color: #6c757d;
    font-size: 1.5em;
}

.asft-airport-code {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 5px;
}

.asft-airport-name {
    margin-bottom: 5px;
}

.asft-time {
    font-weight: bold;
    margin-bottom: 5px;
}

.asft-terminal,
.asft-gate,
.asft-baggage {
    font-size: 0.9em;
    color: #495057;
    margin-bottom: 3px;
}

.asft-live-data {
    background-color: #f8f9fb;
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
}

.asft-live-data h4 {
    margin: 0 0 8px 0;
    font-size: 1em;
}

.asft-live-details {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 0.9em;
}

/* Responsive design */
@media screen and (max-width: 768px) {
    .asft-flight-route {
        flex-direction: column;
    }
    
    .asft-flight-arrow {
        transform: rotate(90deg);
        padding: 15px 0;
    }
    
    .asft-departure, 
    .asft-arrival {
        width: 100%;
    }
    
    .asft-live-details {
        flex-direction: column;
        gap: 5px;
    }
}

/* New Flight Search Styles */
.asft-search-container {
    background-color: #f8f9fa;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.asft-search-form {
    width: 100%;
}

.asft-search-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.asft-search-field {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.asft-search-field label {
    display: flex;
    align-items: center;
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

.asft-icon {
    width: 20px;
    height: 20px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    display: inline-block;
}

.asft-icon-airline {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%236c757d"><path d="M21,16V14L13,9V3.5A1.5,1.5,0,0,0,11.5,2A1.5,1.5,0,0,0,10,3.5V9L2,14V16L10,13.5V19L8,20.5V22L11.5,21L15,22V20.5L13,19V13.5L21,16Z"/></svg>');
}

.asft-icon-flight {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%236c757d"><path d="M2.5,19H21.5V21H2.5V19M22.07,9.64C21.86,8.84 21.03,8.36 20.23,8.58L14.92,10L8,3.57L6.09,4.08L10.23,11.25L5.26,12.58L3.29,11.04L1.84,11.43L3.66,14.59L4.43,15.92L6.03,15.5L11.34,14.07L15.69,12.91L21,11.5C21.81,11.26 22.28,10.44 22.07,9.64Z"/></svg>');
}

.asft-icon-calendar {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%236c757d"><path d="M19,19H5V8H19M16,1V3H8V1H6V3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3H18V1M17,12H12V17H17V12Z"/></svg>');
}

.asft-search-field input[type="text"],
.asft-search-field input[type="date"] {
    width: 100%;
    padding: 10px 10px 10px 40px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 16px;
    height: 50px;
}

.asft-search-field input[type="text"]:focus,
.asft-search-field input[type="date"]:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

.asft-today-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background-color: #e9ecef;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    color: #495057;
}

.asft-today-btn:hover {
    background-color: #dee2e6;
}

.asft-search-button {
    width: 100%;
    background-color: #007bff;
    color: white;
    border: none;
    padding: 0;
    height: 50px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
}

.asft-search-button:hover {
    background-color: #0069d9;
}

.asft-submit-field {
    min-width: 150px;
}

/* Detailed Flight View */
.asft-flight-detail {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    overflow: hidden;
}

.asft-flight-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.asft-flight-info {
    flex: 1;
}

.asft-flight-info h2 {
    margin: 0 0 5px 0;
    font-size: 24px;
}

.asft-route-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: bold;
}

.asft-route-arrow svg {
    fill: #6c757d;
}

.asft-flight-status {
    text-align: right;
    padding: 10px 15px;
    border-radius: 4px;
    background-color: #e9ecef;
    min-width: 120px;
}

.asft-status-active .asft-flight-status {
    background-color: #d4edda;
}

.asft-status-cancelled .asft-flight-status,
.asft-status-incident .asft-flight-status {
    background-color: #f8d7da;
}

.asft-status-diverted .asft-flight-status {
    background-color: #fff3cd;
}

.asft-status-primary {
    font-weight: bold;
    font-size: 18px;
}

.asft-status-secondary {
    font-size: 14px;
    margin-top: 3px;
}

.asft-on-time {
    color: #28a745;
}

.asft-delayed {
    color: #dc3545;
}

.asft-flight-details {
    display: flex;
    flex-wrap: wrap;
    padding: 20px;
}

.asft-column {
    flex: 1;
    min-width: 300px;
    padding: 15px;
}

.asft-column-header {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #dee2e6;
}

.asft-airport-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.asft-airport-code {
    color: #6c757d;
    margin-bottom: 15px;
}

.asft-times {
    margin-bottom: 20px;
}

.asft-time-row {
    display: flex;
    margin-bottom: 8px;
}

.asft-time-label {
    width: 100px;
    color: #6c757d;
}

.asft-time-value {
    flex: 1;
    font-weight: 500;
}

.asft-terminal-gate {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.asft-terminal, 
.asft-gate,
.asft-baggage {
    text-align: center;
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    min-width: 100px;
}

.asft-terminal-label,
.asft-gate-label,
.asft-baggage-label {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 5px;
}

.asft-terminal-value,
.asft-gate-value,
.asft-baggage-value {
    font-size: 20px;
    font-weight: bold;
}

.asft-delay-info {
    color: #dc3545;
    font-weight: bold;
    margin-bottom: 10px;
}

.asft-timezone-info {
    font-size: 12px;
    color: #6c757d;
}

.asft-section-header {
    font-size: 18px;
    font-weight: bold;
    margin: 0 0 15px 0;
    padding: 15px 20px 0;
}

.asft-live-data,
.asft-aircraft-data,
.asft-codeshare-data {
    padding-bottom: 15px;
    border-top: 1px solid #dee2e6;
}

.asft-live-details,
.asft-aircraft-details,
.asft-codeshare-details {
    display: flex;
    flex-wrap: wrap;
    padding: 0 20px;
}

.asft-live-item,
.asft-aircraft-item,
.asft-codeshare-item {
    margin-right: 20px;
    margin-bottom: 15px;
    min-width: 150px;
}

.asft-live-label,
.asft-aircraft-label,
.asft-codeshare-label {
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 5px;
}

.asft-live-value,
.asft-aircraft-value,
.asft-codeshare-value {
    font-weight: 500;
}

.asft-attribution {
    padding: 10px 20px;
    border-top: 1px solid #dee2e6;
}

@media screen and (max-width: 768px) {
    .asft-flight-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .asft-route-summary {
        width: 100%;
        justify-content: space-between;
    }
    
    .asft-flight-status {
        width: 100%;
        text-align: center;
    }
    
    .asft-column {
        flex: 100%;
    }
    
    .asft-terminal-gate {
        flex-direction: column;
        gap: 10px;
    }
    
    .asft-terminal, 
    .asft-gate,
    .asft-baggage {
        width: 100%;
    }
    
    .asft-search-fields {
        flex-direction: column;
    }
    
    .asft-search-field {
        width: 100%;
    }
}
