/* GDS Travel Booking Plugin - Frontend Styles */

/* Search Form Styles */
.gds-flight-search-form {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 30px;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.gds-form-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px 20px;
}

.gds-form-group {
    padding: 0 10px;
    flex: 1;
}

.gds-form-group-half {
    flex: 0 0 50%;
}

.gds-form-group-third {
    flex: 0 0 33.333%;
}

.gds-form-group-quarter {
    flex: 0 0 25%;
}

.gds-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.gds-form-group input,
.gds-form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.gds-form-group input:focus,
.gds-form-group select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

.gds-search-button {
    background: #0073aa;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.gds-search-button:hover {
    background: #005a87;
}

.gds-search-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Results Styles */
.gds-search-results {
    margin: 30px 0;
}

.gds-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.gds-results-header h3 {
    margin: 0;
    color: #333;
}

.gds-sort-options label {
    margin-right: 10px;
    font-weight: 600;
}

.gds-sort-options select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Flight Item Styles */
.gds-flight-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.gds-flight-item:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.gds-flight-summary {
    display: flex;
    align-items: center;
    padding: 20px;
}

.gds-flight-route {
    flex: 1;
}

.gds-segment-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.gds-segment-summary {
    display: flex;
    align-items: center;
    gap: 15px;
}

.gds-segment-airports {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 18px;
}

.gds-departure-airport,
.gds-arrival-airport {
    color: #333;
}

.gds-route-arrow {
    color: #666;
    font-size: 14px;
}

.gds-segment-times {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #666;
}

.gds-segment-info {
    font-size: 12px;
    color: #888;
}

.gds-nonstop {
    color: #28a745;
    font-weight: 600;
}

.gds-flight-price {
    text-align: right;
    margin: 0 20px;
}

.gds-price-total {
    font-size: 24px;
    font-weight: 700;
    color: #0073aa;
    margin-bottom: 5px;
}

.gds-price-breakdown {
    font-size: 12px;
    color: #666;
}

.gds-flight-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gds-select-flight-button {
    background: #28a745;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.gds-select-flight-button:hover {
    background: #218838;
}

.gds-flight-details-toggle {
    background: transparent;
    color: #0073aa;
    border: 1px solid #0073aa;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.gds-flight-details-toggle:hover {
    background: #0073aa;
    color: white;
}

/* Flight Details */
.gds-flight-details {
    border-top: 1px solid #e0e0e0;
    padding: 20px;
    background: #f8f9fa;
}

.gds-detailed-flight-info h4 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
}

.gds-segment-detail {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
}

.gds-segment-header {
    margin-bottom: 15px;
    font-size: 16px;
    color: #333;
}

.gds-segment-times-detail {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gds-departure-detail,
.gds-arrival-detail {
    flex: 1;
}

.gds-flight-duration {
    flex: 0 0 auto;
    text-align: center;
    padding: 0 20px;
}

.gds-duration {
    font-size: 12px;
    color: #666;
    font-weight: 600;
}

.gds-terminal {
    font-size: 12px;
    color: #888;
    margin-left: 10px;
}

.gds-datetime {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

.gds-layover {
    text-align: center;
    padding: 10px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    color: #856404;
    font-size: 12px;
    margin: 10px 0;
}

.gds-fare-info {
    margin-top: 20px;
    padding: 15px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
}

.gds-fare-info h5 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
}

.gds-fare-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 14px;
}

.gds-fare-label {
    color: #666;
}

.gds-fare-value {
    font-weight: 600;
    color: #333;
}

/* Error and Loading States */
.gds-no-results {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 16px;
}

.gds-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 15px;
    margin: 15px 0;
}

.gds-loading {
    text-align: center;
    padding: 40px;
}

.gds-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Booking Form Styles */
.gds-booking-form {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 30px;
    margin: 20px 0;
}

.gds-booking-progress {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.gds-progress-step {
    flex: 1;
    text-align: center;
    padding: 10px;
    position: relative;
    color: #999;
}

.gds-progress-step.gds-active {
    color: #0073aa;
    font-weight: 600;
}

.gds-progress-step.gds-completed {
    color: #28a745;
    font-weight: 600;
}

.gds-flight-summary {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 30px;
}

.gds-total-price {
    text-align: right;
    font-size: 18px;
    color: #0073aa;
    margin-top: 15px;
}

.gds-passenger-section,
.gds-contact-section {
    margin-bottom: 30px;
}

.gds-passenger-section h4,
.gds-contact-section h4 {
    margin-bottom: 20px;
    color: #333;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 10px;
}

.gds-passenger-form {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
}

.gds-form-actions {
    text-align: right;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.gds-continue-button,
.gds-pay-button {
    background: #0073aa;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.gds-continue-button:hover,
.gds-pay-button:hover {
    background: #005a87;
}

/* Confirmation Styles */
.gds-booking-confirmation {
    text-align: center;
    padding: 40px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin: 20px 0;
}

.gds-confirmation-success h2 {
    color: #28a745;
    margin-bottom: 10px;
}

.gds-reference-number {
    font-size: 24px;
    font-weight: 700;
    color: #0073aa;
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.gds-next-steps {
    text-align: left;
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
}

.gds-next-steps ul {
    margin: 10px 0;
    padding-left: 20px;
}

.gds-next-steps li {
    margin-bottom: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .gds-form-group-half,
    .gds-form-group-third,
    .gds-form-group-quarter {
        flex: 0 0 100%;
    }
    
    .gds-flight-summary {
        flex-direction: column;
        gap: 20px;
    }
    
    .gds-segment-summary {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .gds-results-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .gds-segment-times-detail {
        flex-direction: column;
        gap: 15px;
    }
    
    .gds-flight-actions {
        margin-top: 20px;
    }
    
    .gds-booking-progress {
        flex-direction: column;
        gap: 10px;
    }
}