/* ========================================
   PROFESSIONAL FLIGHT SEARCH STYLES
   Southall Travel Style Layout
   ======================================== */

/* Search Widget Professional */
.search-widget.professional {
    background: linear-gradient(135deg, #1a365d 0%, #2d4a6f 100%);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    margin-top: 30px;
}

.search-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
}

.tab-btn {
    padding: 10px 25px;
    background: rgba(255,255,255,0.1);
    border: none;
    color: rgba(255,255,255,0.7);
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px 6px 0 0;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    background: rgba(255,255,255,0.2);
    color: white;
}

.tab-btn.active {
    background: white;
    color: #1a365d;
}

.search-form-container {
    background: white;
    border-radius: 8px;
    padding: 20px;
}

/* Search Rows */
.search-row {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.search-row.main-row {
    margin-bottom: 15px;
}

.search-row.options-row {
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

/* Search Fields */
.search-field {
    flex: 1;
    min-width: 160px;
    position: relative;
}

.search-field.from-field,
.search-field.to-field {
    flex: 1.5;
    min-width: 200px;
}

.search-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-field label i {
    color: #e07b39;
    margin-right: 5px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-field input,
.search-field select {
    width: 100%;
    padding: 12px 35px 12px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #2d3748;
    transition: all 0.3s ease;
    background: white;
}

.search-field input:focus,
.search-field select:focus {
    border-color: #e07b39;
    outline: none;
    box-shadow: 0 0 0 3px rgba(224, 123, 57, 0.1);
}

.search-field input::placeholder {
    color: #a0aec0;
}

/* Clear Button */
.clear-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #a0aec0;
    cursor: pointer;
    padding: 5px;
    font-size: 12px;
    opacity: 0;
    transition: all 0.2s ease;
}

.search-field input:not(:placeholder-shown) + .clear-btn {
    opacity: 1;
}

.clear-btn:hover {
    color: #e53e3e;
}

/* Swap Button */
.swap-btn {
    position: absolute;
    right: -25px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    background: #e07b39;
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    font-size: 11px;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.swap-btn:hover {
    background: #c96a2e;
    transform: translateY(-50%) rotate(180deg);
}

/* Passenger Selector */
.passenger-selector {
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    transition: all 0.3s ease;
}

.passenger-selector:hover {
    border-color: #cbd5e0;
}

.passenger-selector.active {
    border-color: #e07b39;
    box-shadow: 0 0 0 3px rgba(224, 123, 57, 0.1);
}

.passenger-selector span {
    font-size: 14px;
    font-weight: 500;
    color: #2d3748;
}

.passenger-selector i {
    color: #a0aec0;
    font-size: 12px;
}

/* Passenger Dropdown */
.passenger-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    padding: 15px;
    z-index: 100;
    display: none;
    margin-top: 5px;
    min-width: 280px;
}

.passenger-dropdown.show {
    display: block;
}

.passenger-type {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
}

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

.passenger-info {
    display: flex;
    flex-direction: column;
}

.type-label {
    font-weight: 600;
    color: #2d3748;
    font-size: 14px;
}

.type-age {
    font-size: 12px;
    color: #718096;
}

.counter {
    display: flex;
    align-items: center;
    gap: 12px;
}

.counter-btn {
    width: 32px;
    height: 32px;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #4a5568;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.counter-btn:hover:not(:disabled) {
    border-color: #e07b39;
    color: #e07b39;
}

.counter-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.count {
    font-weight: 600;
    font-size: 16px;
    color: #2d3748;
    min-width: 20px;
    text-align: center;
}

.cabin-class-section {
    padding-top: 15px;
    margin-top: 10px;
    border-top: 1px solid #e2e8f0;
}

.cabin-class-section label {
    font-size: 12px;
    color: #718096;
    margin-bottom: 8px;
    display: block;
}

.cabin-class-section select {
    width: 100%;
    padding: 10px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}

.btn-done {
    width: 100%;
    padding: 12px;
    background: #e07b39;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.btn-done:hover {
    background: #c96a2e;
}

/* Search Button */
.btn-search-orange {
    padding: 14px 35px;
    background: linear-gradient(135deg, #e07b39 0%, #d4692a 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(224, 123, 57, 0.3);
}

.btn-search-orange:hover {
    background: linear-gradient(135deg, #d4692a 0%, #c45a20 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(224, 123, 57, 0.4);
}

.btn-search-orange:active {
    transform: translateY(0);
}

/* Options Row */
.trip-type-group {
    display: flex;
    gap: 5px;
    background: #f7fafc;
    padding: 4px;
    border-radius: 6px;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 15px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.radio-label input {
    display: none;
}

.radio-label span {
    font-size: 13px;
    font-weight: 500;
    color: #4a5568;
}

.radio-label:hover {
    background: #edf2f7;
}

.radio-label input:checked + span {
    color: #e07b39;
    font-weight: 600;
}

.radio-label:has(input:checked) {
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.option-field select {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 13px;
    color: #4a5568;
    background: white;
    cursor: pointer;
    min-width: 140px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #4a5568;
}

.checkbox-label input {
    width: 18px;
    height: 18px;
    accent-color: #e07b39;
    cursor: pointer;
}

.reset-link {
    background: none;
    border: none;
    color: #e07b39;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: auto;
    transition: all 0.2s ease;
}

.reset-link:hover {
    color: #c96a2e;
    text-decoration: underline;
}

/* Autocomplete Dropdown */
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    max-height: 320px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    margin-top: 5px;
}

.autocomplete-dropdown.show {
    display: block;
}

.autocomplete-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
}

.autocomplete-item:hover,
.autocomplete-item.highlighted {
    background: #fff7ed;
}

.autocomplete-item .airport-code {
    display: inline-block;
    background: #e07b39;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    margin-right: 10px;
}

.autocomplete-item .airport-name {
    font-weight: 600;
    color: #2d3748;
    font-size: 14px;
}

.autocomplete-item .airport-location {
    font-size: 12px;
    color: #718096;
    margin-left: 42px;
    margin-top: 2px;
}

.autocomplete-item .match-highlight {
    color: #e07b39;
    font-weight: 700;
}

.autocomplete-item.city-group {
    background: #f7fafc;
    font-weight: 600;
}

.autocomplete-item.city-group .airport-name {
    color: #1a365d;
}

/* Multicity Container */
.multicity-container {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

.multicity-leg {
    background: #f7fafc;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
}

.leg-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.leg-number {
    background: #e07b39;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.leg-header span {
    font-weight: 600;
    color: #2d3748;
    font-size: 14px;
}

.btn-remove-leg {
    background: #fed7d7;
    color: #c53030;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    margin-left: auto;
    transition: all 0.2s ease;
}

.btn-remove-leg:hover {
    background: #fc8181;
    color: white;
}

.btn-add-leg {
    background: #e6fffa;
    color: #319795;
    border: 2px dashed #81e6d9;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
}

.btn-add-leg:hover {
    background: #b2f5ea;
    border-color: #4fd1c5;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 54, 93, 0.95);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.loading-overlay.show {
    display: flex;
}

.loading-content {
    text-align: center;
    color: white;
    padding: 40px;
    max-width: 500px;
}

.airplane-animation {
    position: relative;
    margin-bottom: 30px;
}

.airplane-animation i {
    font-size: 60px;
    color: #e07b39;
    animation: flyPlane 2s ease-in-out infinite;
}

@keyframes flyPlane {
    0%, 100% { transform: translateX(-30px) rotate(-5deg); }
    50% { transform: translateX(30px) rotate(5deg); }
}

.flight-path {
    position: absolute;
    top: 50%;
    left: 20%;
    right: 20%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(224, 123, 57, 0.5), transparent);
    animation: pathPulse 2s ease-in-out infinite;
}

@keyframes pathPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

.loading-content h3 {
    font-size: 24px;
    margin-bottom: 25px;
    font-weight: 500;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 30px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #e07b39, #f6ad55);
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
    animation: progressAnim 4s ease-in-out forwards;
}

@keyframes progressAnim {
    0% { width: 0%; }
    100% { width: 100%; }
}

.travel-tip {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 20px;
    backdrop-filter: blur(10px);
}

.travel-tip i {
    font-size: 24px;
    color: #f6ad55;
    margin-bottom: 10px;
}

.travel-tip p {
    font-size: 16px;
    font-style: italic;
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 992px) {
    .search-widget.professional {
        margin: 20px 10px;
    }
    
    .search-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-field {
        min-width: 100%;
    }
    
    .swap-btn {
        right: 10px;
        top: auto;
        bottom: -15px;
        transform: rotate(90deg);
    }
    
    .swap-btn:hover {
        transform: rotate(90deg);
    }
    
    .btn-search-orange {
        width: 100%;
        justify-content: center;
    }
    
    .options-row {
        flex-wrap: wrap;
    }
    
    .trip-type-group {
        width: 100%;
        justify-content: center;
    }
    
    .reset-link {
        margin-left: 0;
        width: 100%;
        justify-content: center;
        margin-top: 10px;
    }
}

@media (max-width: 576px) {
    .search-widget.professional {
        padding: 15px;
        border-radius: 8px;
    }
    
    .tab-btn {
        padding: 8px 15px;
        font-size: 13px;
    }
    
    .search-form-container {
        padding: 15px;
    }
    
    .radio-label {
        padding: 6px 10px;
    }
    
    .radio-label span {
        font-size: 12px;
    }
}
