/* Amadeus Flight Search Styles */

.amadeus-flight-search-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.amadeus-search-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 30px;
    color: #1a1a1a;
    text-align: center;
}

/* Search Form Styles */
.amadeus-search-form {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.amadeus-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.amadeus-form-group {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.amadeus-form-group.amadeus-half {
    flex: 1 1 calc(50% - 10px);
}

.amadeus-form-group.amadeus-third {
    flex: 1 1 calc(33.333% - 14px);
}

.amadeus-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.amadeus-form-group input[type="text"],
.amadeus-form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-sizing: border-box;
}

.amadeus-form-group input[type="text"]:focus,
.amadeus-form-group select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Trip Type Radio Buttons */
.trip-type-group {
    display: flex;
    gap: 20px;
    align-items: center;
}

.trip-type-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-bottom: 0;
    font-weight: 500;
}

.trip-type-group input[type="radio"] {
    margin-right: 8px;
    cursor: pointer;
}

/* Airport Suggestions */
.amadeus-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: none;
}

.suggestion-item {
    padding: 12px 15px;
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid #f0f0f0;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background-color: #f5f5f5;
}

.suggestion-item.error {
    color: #dc2626;
    cursor: default;
}

.suggestion-loading {
    padding: 12px 15px;
    color: #666;
    text-align: center;
}

/* Search Button */
.amadeus-search-button {
    width: 100%;
    padding: 15px 30px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.amadeus-search-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.amadeus-search-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.button-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.spinner-large {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

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

/* Results Section */
.amadeus-results {
    margin-top: 30px;
}

.results-header {
    margin-bottom: 20px;
}

.results-header h3 {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
}

.loading-results {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
}

.loading-results p {
    margin-top: 20px;
    color: #666;
    font-size: 16px;
}

/* Error and No Results Messages */
.error-message,
.no-results {
    background: white;
    border: 1px solid #fecaca;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
}

.error-message {
    border-color: #fecaca;
    background: #fef2f2;
}

.no-results {
    border-color: #e0e0e0;
}

.error-message h3,
.no-results h3 {
    color: #dc2626;
    margin-bottom: 10px;
}

.no-results h3 {
    color: #666;
}

/* Flight Cards */
.flights-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.flight-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.3s;
}

.flight-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.flight-price-header {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-amount {
    font-size: 24px;
    font-weight: 700;
}

.seats-available {
    font-size: 13px;
    opacity: 0.9;
}

/* Itinerary Styles */
.itinerary {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.itinerary:last-of-type {
    border-bottom: none;
}

.itinerary-header {
    font-weight: 600;
    font-size: 16px;
    color: #1a1a1a;
    margin-bottom: 15px;
}

.segment {
    margin-bottom: 15px;
}

.segment-route {
    display: flex;
    align-items: center;
    gap: 20px;
}

.airport-info {
    flex: 1;
    text-align: center;
}

.airport-code {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
}

.airport-time {
    display: block;
    font-size: 14px;
    color: #666;
    margin-top: 4px;
}

.terminal {
    display: block;
    font-size: 12px;
    color: #999;
    margin-top: 2px;
}

.flight-details {
    flex: 1;
    text-align: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.airline {
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.duration {
    font-size: 13px;
    color: #666;
}

.layover {
    padding: 8px 15px;
    background: #fff3cd;
    border-left: 3px solid #ffc107;
    margin: 10px 0;
    font-size: 13px;
    color: #856404;
}

.total-duration {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
    font-weight: 600;
    color: #666;
    text-align: right;
}

/* Flight Actions */
.flight-actions {
    padding: 20px;
    background: #f8f9fa;
    text-align: right;
}

.select-flight-btn {
    padding: 12px 30px;
    background: #16a34a;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.select-flight-btn:hover {
    background: #15803d;
    transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .amadeus-form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .amadeus-form-group.amadeus-half,
    .amadeus-form-group.amadeus-third {
        flex: 1 1 100%;
    }
    
    .segment-route {
        flex-direction: column;
        gap: 10px;
    }
    
    .flight-details {
        width: 100%;
    }
    
    .flight-price-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .amadeus-search-form {
        padding: 20px;
    }
    
    .amadeus-search-title {
        font-size: 22px;
    }
    
    .airport-code {
        font-size: 20px;
    }
    
    .price-amount {
        font-size: 20px;
    }
}
