/* Portal Container */
.portal-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.portal-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
}

.portal-header h1 {
    margin: 0;
    font-size: 2.5em;
}

.subtitle {
    font-size: 1.1em;
    opacity: 0.9;
    margin-top: 10px;
}

/* Search Section */
.search-section {
    background: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.search-section h2 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

/* Form Elements */
.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.form-group {
    flex: 1 1 200px;
    min-width: 200px;
    position: relative;
}

.form-group.full-width {
    flex: 1 1 100%;
}

.form-group.half {
    flex: 1 1 calc(50% - 15px);
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
    font-size: 0.9em;
}

.form-group small {
    display: block;
    font-size: 0.8em;
    color: #888;
    margin-top: 3px;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 5px rgba(102, 126, 234, 0.3);
}

.form-control.small {
    width: 80px;
    display: inline-block;
}

/* Price Range */
.price-range {
    display: flex;
    align-items: center;
    gap: 10px;
}

.price-range span {
    color: #666;
}

/* Checkbox Styles */
.consent-group {
    margin: 10px 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: normal;
    font-size: 0.95em;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Optional Filters */
.optional-filters {
    margin: 20px 0;
    border: 1px solid #eee;
    border-radius: 4px;
    overflow: hidden;
}

.filters-toggle {
    background: #f8f9fa;
    padding: 12px 15px;
    margin: 0;
    cursor: pointer;
    color: #667eea;
    font-size: 1em;
    border-bottom: 1px solid #eee;
}

#optional-filters-content {
    padding: 15px;
    background: white;
}

/* Autocomplete */
.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.autocomplete-item {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background 0.2s;
}

.autocomplete-item:hover {
    background: #f0f0f0;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a67d8;
    transform: translateY(-1px);
}

.btn-success {
    background: #48bb78;
    color: white;
}

.btn-success:hover {
    background: #38a169;
}

.btn-secondary {
    background: #a0aec0;
    color: white;
}

.btn-secondary:hover {
    background: #718096;
}

.search-btn {
    width: 100%;
    font-size: 1.1em;
    padding: 15px;
    margin-top: 20px;
}

/* Loading Indicator */
.loading-indicator {
    text-align: center;
    padding: 40px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Flight Results */
.results-section {
    margin-top: 30px;
}

.flights-grid {
    display: grid;
    gap: 20px;
    margin-top: 20px;
}

.flight-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.flight-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.flight-card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #dee2e6;
}

.airline-info {
    display: flex;
    flex-direction: column;
}

.airline {
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
}

.flight-number {
    font-size: 0.9em;
    color: #666;
}

.flight-price {
    font-size: 1.5em;
    font-weight: bold;
    color: #48bb78;
}

.flight-card-body {
    padding: 20px;
}

.flight-route {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.departure, .arrival {
    text-align: center;
}

.departure .time, .arrival .time {
    font-size: 1.4em;
    font-weight: bold;
    color: #333;
}

.departure .airport, .arrival .airport {
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
}

.flight-path {
    text-align: center;
    flex: 1;
    padding: 0 20px;
}

.duration {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 5px;
}

.stops {
    font-size: 0.85em;
    color: #48bb78;
    font-weight: 600;
}

.return-info {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #dee2e6;
    text-align: center;
    color: #666;
}

.flight-card-footer {
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

.btn-book {
    width: 100%;
    background: #48bb78;
    color: white;
}

.btn-book:hover {
    background: #38a169;
}

/* Modal */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow-y: auto;
}

.modal-content {
    background: white;
    margin: 50px auto;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    position: relative;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    cursor: pointer;
    color: #666;
}

.close-modal:hover {
    color: #333;
}

.modal-subtitle {
    color: #666;
    margin-bottom: 25px;
}

/* Booking Form */
.booking-form h4 {
    color: #333;
    margin: 20px 0 15px;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin: 25px 0 15px;
}

.form-actions .btn {
    flex: 1;
}

/* Messages */
.form-message {
    text-align: center;
    padding: 10px;
    border-radius: 4px;
}

.form-message .error {
    color: #e53e3e;
    background: #fff5f5;
    padding: 10px;
    border-radius: 4px;
}

.form-message .success {
    color: #38a169;
    background: #f0fff4;
    padding: 10px;
    border-radius: 4px;
}

.form-message .info {
    color: #3182ce;
    background: #ebf8ff;
    padding: 10px;
    border-radius: 4px;
}

.success-message {
    text-align: center;
    padding: 40px;
    background: #f0fff4;
    border-radius: 8px;
    margin: 20px 0;
}

.success-message h3 {
    color: #38a169;
    margin-bottom: 15px;
}

.no-results, .error-message {
    text-align: center;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 8px;
    color: #666;
}

.error-message {
    background: #fff5f5;
    color: #e53e3e;
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
    }
    
    .form-group.half {
        flex: 1 1 100%;
    }
    
    .flight-route {
        flex-direction: column;
        gap: 15px;
    }
    
    .flight-path {
        width: 100%;
        padding: 10px 0;
    }
    
    .modal-content {
        margin: 20px;
        padding: 20px;
    }
    
    .form-actions {
        flex-direction: column;
    }
}