/* Wonderly Travel - Flight Search Styles */

/* Search Form Container */
.wonderly-search-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.wonderly-search-header {
    text-align: center;
    margin-bottom: 30px;
}

.wonderly-search-header h2 {
    font-size: 32px;
    color: #1a1a1a;
    margin-bottom: 10px;
}

.wonderly-search-header p {
    font-size: 16px;
    color: #666;
}

/* Trip Type Selection */
.wonderly-trip-type {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.wonderly-trip-type label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 10px 20px;
    border-radius: 25px;
    background: #f5f5f5;
    transition: all 0.3s ease;
}

.wonderly-trip-type input[type="radio"]:checked + span {
    background: #007bff;
    color: white;
}

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

/* Search Form */
.wonderly-search-form {
    display: grid;
    gap: 20px;
}

.wonderly-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.wonderly-form-group {
    display: flex;
    flex-direction: column;
}

.wonderly-form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}

.wonderly-form-group input,
.wonderly-form-group select {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s ease;
}

.wonderly-form-group input:focus,
.wonderly-form-group select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Autocomplete Styles */
.ui-autocomplete {
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.ui-menu-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.ui-menu-item:hover {
    background-color: #f8f9fa;
}

/* Passengers Counter */
.wonderly-passengers {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.passenger-counter {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.passenger-counter label {
    font-weight: 500;
    color: #333;
}

.passenger-counter .counter-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.passenger-counter button {
    width: 35px;
    height: 35px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s ease;
}

.passenger-counter button:hover {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.passenger-counter button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.passenger-counter .count {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
    font-size: 16px;
}

/* Advanced Options */
.wonderly-advanced-options {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.wonderly-advanced-toggle {
    background: none;
    border: none;
    color: #007bff;
    cursor: pointer;
    font-weight: 600;
    padding: 0;
    text-decoration: underline;
}

.wonderly-advanced-content {
    margin-top: 20px;
    display: none;
}

.wonderly-advanced-content.show {
    display: block;
}

/* Checkbox */
.wonderly-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.wonderly-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}

.wonderly-checkbox label {
    cursor: pointer;
    font-size: 14px;
    color: #333;
    user-select: none;
}

.wonderly-checkbox label:hover {
    color: #667eea;
}

/* Search Button */
.wonderly-search-button {
    padding: 15px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 20px;
}

.wonderly-search-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.wonderly-search-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Loading Spinner */
.wonderly-loading {
    display: none;
    text-align: center;
    padding: 40px;
}

.wonderly-loading.show {
    display: block;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Results Container */
.wonderly-results-container {
    margin-top: 40px;
    display: none;
}

.wonderly-results-container.show {
    display: block;
}

.wonderly-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.wonderly-results-count {
    font-size: 18px;
    font-weight: 600;
}

.wonderly-sort-options select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
}

/* Filters Sidebar */
.wonderly-results-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
}

.wonderly-filters {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.wonderly-filters h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 20px;
}

.filter-group {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #e0e0e0;
}

.filter-group:last-child {
    border-bottom: none;
}

.filter-group h4 {
    margin-bottom: 15px;
    color: #555;
    font-size: 16px;
}

/* Price Range Slider */
.price-range-slider {
    margin: 20px 0;
}

.price-values {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
}

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

.flight-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    cursor: pointer;
}

.flight-card:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.flight-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.airline-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.airline-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 8px;
}

.airline-name {
    font-weight: 600;
    color: #333;
    font-size: 18px;
}

.flight-price {
    text-align: right;
}

.price-amount {
    font-size: 28px;
    font-weight: 700;
    color: #667eea;
    line-height: 1.2;
}

.price-label {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

.flight-details {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: center;
    margin-bottom: 15px;
}

.flight-segment {
    text-align: center;
}

.flight-time {
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

.flight-airport {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

.flight-duration {
    text-align: center;
}

.duration-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 10px 0;
}

.duration-line::before,
.duration-line::after {
    content: '';
    width: 40px;
    height: 2px;
    background: #ddd;
}

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

.stops-info {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

.flight-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

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

.select-flight-btn {
    padding: 10px 30px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.select-flight-btn:hover {
    background: #0056b3;
}

/* No Results */
.wonderly-no-results {
    text-align: center;
    padding: 60px 20px;
}

.wonderly-no-results i {
    font-size: 80px;
    color: #ddd;
    margin-bottom: 20px;
}

.wonderly-no-results h3 {
    font-size: 24px;
    color: #333;
    margin-bottom: 10px;
}

.wonderly-no-results p {
    font-size: 16px;
    color: #666;
}

/* Responsive Design */
@media (max-width: 992px) {
    .wonderly-results-layout {
        grid-template-columns: 1fr;
    }
    
    .wonderly-filters {
        position: static;
    }
}

@media (max-width: 768px) {
    .wonderly-search-container {
        padding: 20px;
    }
    
    .wonderly-form-row {
        grid-template-columns: 1fr;
    }
    
    .flight-details {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .flight-card {
        padding: 15px;
    }
    
    .flight-card-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .flight-price {
        text-align: center;
    }
}
