/*!
 * ==========================================================
 * BA.UI Framework
 * Search Panel Styles - Flight Search
 * Version : 1.0.0
 * ==========================================================
 */

/* ==========================================================
 * TYPOGRAPHY VARIABLES - Centralized font definitions
 * ========================================================== */
:root {
    /* Font Family */
    --ba-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

    /* Font Sizes - Consistent scale */
    --ba-font-size-xs: 11px;      /* Small helper text */
    --ba-font-size-sm: 12px;      /* Secondary/sublabels */
    --ba-font-size-base: 13px;    /* Labels, inputs */
    --ba-font-size-md: 14px;      /* Primary content */
    --ba-font-size-lg: 15px;      /* Emphasis, buttons */
    --ba-font-size-xl: 16px;      /* Large headings */

    /* Font Weights */
    --ba-font-weight-normal: 400;
    --ba-font-weight-medium: 500;
    --ba-font-weight-semibold: 600;

    /* Colors - Text */
    --ba-text-primary: #1F2937;     /* Main text */
    --ba-text-secondary: #6B7280;   /* Secondary text */
    --ba-text-muted: #9CA3AF;       /* Placeholder, disabled */
    --ba-text-accent: #3B82F6;      /* Links, active states */

    /* Line Heights */
    --ba-line-height-tight: 1.25;
    --ba-line-height-normal: 1.5;
    --ba-line-height-relaxed: 1.75;
}

/* ==========================================================
 * SEARCH TABS - Tab Navigation
 * ========================================================== */

.ba-search-tabs {
    width: 100%;
    margin: 24px 0;
    font-family: var(--ba-font-family);
}

.ba-search-tabs__nav {
    display: inline-flex;
    align-items: center;
    gap: 0;
    padding: 6px 8px;
    background: #ffffff;
    border-radius: 50px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 0;
    width: auto;
    position: relative;
}

.ba-search-tabs__tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    background: transparent;
    border-radius: 50px;
    cursor: pointer;
    font-family: var(--ba-font-family);
    font-size: var(--ba-font-size-md);
    font-weight: var(--ba-font-weight-medium);
    color: var(--ba-text-secondary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    position: relative;
    outline: none;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ba-search-tabs__tab:focus {
    outline: none;
}

.ba-search-tabs__tab:focus-visible {
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

.ba-search-tabs__tab:hover {
    background: #F3F4F6;
    color: var(--ba-text-accent);
}

.ba-search-tabs__tab:hover .ba-search-tabs__icon {
    color: var(--ba-text-accent);
}

.ba-search-tabs__tab--active {
    background: #F3F4F6;
    color: var(--ba-text-accent);
    text-decoration: none;
}

.ba-search-tabs__tab--active .ba-search-tabs__icon {
    color: var(--ba-text-accent);
}

.ba-search-tabs__icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: #9CA3AF;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Tab Content */
.ba-search-tabs__content {
    margin-top: 16px;
    position: relative;
    z-index: 100;
}

/* Triangle indicator above content, aligned with active tab */
.ba-search-tabs__content::before {
    content: '';
    position: absolute;
    top: -13px;
    left: var(--triangle-left, 70px);
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-bottom: 15px solid #ffffff;
    z-index: 101;
    filter: drop-shadow(0 -2px 3px rgba(0, 0, 0, 0.08));
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ba-search-tabs__panel {
    display: none;
    opacity: 0;
    transform: translateY(10px);
}

.ba-search-tabs__panel--active {
    display: block;
    animation: panelFadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    position: relative;
    z-index: 100;
}

.ba-search-tabs__panel--exiting {
    animation: panelFadeOut 0.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes panelFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes panelFadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Keep the old fadeIn for backwards compatibility */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Placeholder styling for coming soon panels */
.ba-search-panel__placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
    color: #9CA3AF;
}

.ba-search-panel__placeholder svg {
    margin-bottom: 16px;
}

.ba-search-panel__placeholder p {
    margin: 0;
    font-size: 15px;
}

/* Short label hidden on desktop */
.ba-search-tabs__short-label {
    display: none;
}

/* Responsive for tabs */
@media (max-width: 992px) {
    .ba-search-tabs__nav {
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }

    .ba-search-tabs__tab {
        padding: 10px 16px;
        font-size: 13px;
    }

    .ba-search-tabs__tab .ba-search-tabs__label {
        display: none;
    }

    .ba-search-tabs__icon {
        width: 24px;
        height: 24px;
    }
}

@media (max-width: 767px) {
    .ba-search-tabs {
        margin: 8px 0;
    }

    .ba-search-tabs__nav {
        display: flex;
        flex-wrap: nowrap;
        justify-content: space-around;
        width: 100%;
        gap: 0;
        padding: 4px 4px;
        border-radius: 50px;
    }

    .ba-search-tabs__tab {
        flex-direction: column;
        align-items: center;
        gap: 2px;
        padding: 5px 10px;
        border-radius: 50px;
        font-size: 10px;
        letter-spacing: 0.3px;
        flex: 1;
        justify-content: center;
    }

    .ba-search-tabs__tab .ba-search-tabs__label {
        display: none;
    }

    .ba-search-tabs__tab .ba-search-tabs__short-label {
        display: block;
        font-size: 10px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.3px;
    }

    .ba-search-tabs__icon {
        width: 18px;
        height: 18px;
    }

    .ba-search-tabs__content::before {
        display: block;
        border-left-width: 12px;
        border-right-width: 12px;
        border-bottom-width: 12px;
        top: -11px;
    }
}

@media (max-width: 576px) {
    .ba-search-tabs__tab {
        padding: 8px 6px;
    }

    .ba-search-tabs__tab {
        flex-shrink: 0;
    }
}

/* ==========================================================
 * MAIN SEARCH PANEL STYLES
 * ==========================================================

/* Main Container */
.ba-search-panel {
    width: 100%;
    margin: 24px 0;
    position: relative;
    z-index: 100;
}

/* Card Container - Common white background for all panels */
.ba-search-panel__card {
    background: #ffffff;
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: visible;
    z-index: 1;
}

.ba-search-panel__leg:focus-within {
    z-index: 30;
}

/* Form Container - White Card */
.ba-search-panel__form {
    background: #ffffff;
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: visible;
}

.ba-search-panel__leg-field .ba-autocomplete__dropdown {
    z-index: 1200;
}

/* Trip Type Selection Row */
.ba-search-panel__trip-type {
    display: flex;
    align-items: center;
    gap: 32px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

/* Custom Radio Buttons */
.ba-search-panel__trip-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    position: relative;
}

.ba-search-panel__trip-option input[type="radio"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #D1D5DB;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    margin: 0;
}

.ba-search-panel__trip-option input[type="radio"]:checked {
    border-color: #353E48;
    background: #353E48;
}

.ba-search-panel__trip-option input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

.ba-search-panel__trip-option label {
    font-family: var(--ba-font-family);
    font-size: var(--ba-font-size-md);
    color: var(--ba-text-primary);
    font-weight: var(--ba-font-weight-medium);
    cursor: pointer;
    user-select: none;
    margin: 0;
}

.ba-search-panel__trip-option input[type="radio"]:checked + label {
    color: #353E48;
}

/* Tour Code Toggle - Right Aligned */
.ba-search-panel__tour-code {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    padding-top: .25rem !important;
}

.ba-search-panel__tour-code-label {
    font-family: var(--ba-font-family);
    font-size: var(--ba-font-size-base);
    color: var(--ba-text-secondary);
    font-weight: var(--ba-font-weight-medium);
}

.ba-search-panel__tour-code-select {
    margin-left: 12px;
    position: relative;
    display: flex;
    align-items: center;
    align-self: center;
    min-width: 140px; /* Reserve space even when hidden */
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.ba-search-panel__tour-code-select.is-visible {
    visibility: visible;
    opacity: 1;
}

.ba-select-wrapper {
    display: flex;
    align-items: center;
}

/* Custom Select Trigger */
.ba-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 12px;
    height: 24px;
    font-size: 13px;
    font-weight: 500;
    color: #1F2937;
    background: #ffffff;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    cursor: pointer;
    min-width: 140px;
    gap: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.ba-select-trigger:hover {
    border-color: #D1D5DB;
}

.ba-select-trigger:focus,
.ba-select-trigger.is-open {
    outline: none;
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.ba-select-trigger__text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ba-select-trigger__arrow {
    width: 10px;
    height: 10px;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.ba-select-trigger.is-open .ba-select-trigger__arrow {
    transform: rotate(180deg);
}

/* Custom Select Dropdown */
.ba-select-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 100%;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}

.ba-select-dropdown.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.ba-select-dropdown__list {
    list-style: none;
    margin: 0;
    padding: 8px 0;
    max-height: 240px;
    overflow-y: auto;
}

.ba-select-dropdown__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    transition: background-color 0.15s;
}

.ba-select-dropdown__item:hover {
    background-color: #F9FAFB;
}

.ba-select-dropdown__item.is-selected {
    color: #3B82F6;
    font-weight: 500;
}

.ba-select-dropdown__item.is-selected::after {
    content: '';
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M13.5 4.5L6 12L2.5 8.5' stroke='%233B82F6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

/* Form Fields Grid */
.ba-search-panel__fields {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr 200px;
    gap: 16px;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
}

/* Individual Field */
.ba-search-panel__field {
    display: flex;
    flex-direction: column;
    position: relative;
    min-width: 0;
}

/* Field with swap - positioned relative for swap button */
.ba-search-panel__field--with-swap {
    position: relative;
    z-index: 5;
}

/* Display panel in field with swap needs right padding for button */
.ba-search-panel__field--with-swap .ba-search-panel__display {
    padding-right: 24px;
}

.ba-search-panel__field label {
    font-family: var(--ba-font-family);
    font-size: var(--ba-font-size-sm);
    color: var(--ba-text-secondary);
    font-weight: var(--ba-font-weight-medium);
    margin-bottom: 8px;
    display: block;
    text-transform: none;
}

.ba-search-panel__field input,
.ba-search-panel__field select,
.ba-search-panel__field .ba-control {
    width: 100%;
    height: 52px;
    padding: 16px;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    font-family: var(--ba-font-family);
    font-size: var(--ba-font-size-md);
    font-weight: var(--ba-font-weight-medium);
    color: var(--ba-text-primary);
    background: #ffffff;
    transition: all 0.2s ease;
}

.ba-search-panel__field input:focus,
.ba-search-panel__field select:focus,
.ba-search-panel__field .ba-control:focus {
    outline: none;
    border-color: var(--ba-text-accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.ba-search-panel__field input::placeholder {
    color: var(--ba-text-muted);
    font-weight: var(--ba-font-weight-normal);
}

/* Field Secondary Text */
.ba-search-panel__field-secondary {
    font-family: var(--ba-font-family);
    font-size: var(--ba-font-size-sm);
    color: var(--ba-text-muted);
    margin-top: 4px;
}

/* Card-Based Display Panel (Material Design Style) */
.ba-search-panel__display {
    width: 100%;
    min-height: 76px;
    height: 76px;
    padding: 8px 16px;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: visible; /* Allow autocomplete dropdown to overflow */
}

.ba-search-panel__display:hover {
    border-color: var(--ba-text-accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.ba-search-panel__display:focus-within {
    outline: none;
    border-color: var(--ba-text-accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.ba-search-panel__display-label {
    font-family: var(--ba-font-family);
    font-size: var(--ba-font-size-sm);
    color: var(--ba-text-secondary);
    font-weight: var(--ba-font-weight-semibold);
    margin-bottom: 2px !important;
    text-transform: none;
    letter-spacing: normal;
    pointer-events: none;
    position: relative;
    z-index: 1;
}

.ba-search-panel__display-value {
    font-family: var(--ba-font-family);
    font-size: var(--ba-font-size-md);
    font-weight: var(--ba-font-weight-medium);
    color: var(--ba-text-primary);
    line-height: var(--ba-line-height-normal);
    pointer-events: none;
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.ba-search-panel__display-value--placeholder {
    color: var(--ba-text-muted);
    font-weight: var(--ba-font-weight-normal);
}

.ba-search-panel__display-secondary {
    font-family: var(--ba-font-family);
    font-size: var(--ba-font-size-sm);
    color: var(--ba-text-muted);
    font-weight: var(--ba-font-weight-normal);
    pointer-events: none;
    margin-top: 2px;
    min-height: 16px;
}

/* Add Return Date - Dönüş Ekle styling */
.ba-search-panel__display--add-return {
    cursor: pointer;
    border-style: dashed;
    border-color: #D1D5DB;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ba-search-panel__add-return-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 4px;
    width: 100%;
}

.ba-search-panel__add-return-label {
    font-size: var(--ba-font-size-sm);
    font-weight: var(--ba-font-weight-normal);
    color: var(--ba-text-muted);
}

.ba-search-panel__add-return-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ba-text-muted);
}

.ba-search-panel__add-return-icon .ba-icon {
    width: 24px;
    height: 24px;
}

.ba-search-panel__return-date-content {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.ba-search-panel__display--add-return:hover {
    border-color: var(--ba-text-accent);
    background: #F8FAFF;
}

.ba-search-panel__display--add-return:hover .ba-search-panel__add-return-label,
.ba-search-panel__display--add-return:hover .ba-search-panel__add-return-icon {
    color: var(--ba-text-accent);
}

/* When return date is selected, remove add-return styling */
.ba-search-panel__display--has-date {
    border-style: solid;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.ba-search-panel__display--has-date .ba-search-panel__add-return-content {
    display: none;
}

.ba-search-panel__display--has-date .ba-search-panel__return-date-content {
    display: flex;
}

/* Simple input inside display panel */
.ba-search-panel__input {
    border: none !important;
    padding: 0 0 0 2px !important; /* Small left padding for cursor visibility */
    margin: 0 !important;
    background: transparent !important;
    font-family: var(--ba-font-family) !important;
    font-size: var(--ba-font-size-md) !important;
    font-weight: var(--ba-font-weight-medium) !important;
    color: #1F2937 !important;
    line-height: 1.4 !important;
    outline: none !important;
    box-shadow: none !important;
    width: 100% !important;
    height: auto !important;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    caret-color: #000 !important; /* Black cursor for visibility */
}

.ba-search-panel__input::placeholder {
    color: #9CA3AF;
    font-weight: 400;
}

/* BA Autocomplete wrapper inside display panel - must not break layout */
.ba-search-panel__display .ba-autocomplete {
    flex: 1;
    min-width: 0;
    position: relative;
}

/* Hide secondary text when typing but keep the space */
.ba-search-panel__display:focus-within .ba-search-panel__display-secondary {
    visibility: hidden;
}

/* Swap Button - Centered between origin and destination fields */
.ba-search-panel__swap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid #D1D5DB;
    background: #ffffff;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.3s ease;
    padding: 0;
    position: absolute;
    z-index: 10;
    top: 50%;
    /* Position at right edge, half outside */
    right: -24px;
    transform: translateY(-50%);
}

.ba-search-panel__swap.is-swapping {
    transform: translateY(-50%) rotate(180deg);
}

.ba-search-panel__swap:hover {
    background: #F9FAFB;
    border-color: #9CA3AF;
}

.ba-search-panel__swap:hover svg {
    transform: rotate(180deg);
}

.ba-search-panel__swap:active {
    background: #F3F4F6;
}

.ba-search-panel__swap svg {
    width: 16px;
    height: 16px;
    color: var(--ba-text-secondary);
    transition: transform 0.2s ease;
}

/* Search Button */
.ba-search-panel__submit {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: flex-end;
    min-width: 180px;
    height: 76px;
    padding: 0 40px;
    background: #2f363e;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-family: var(--ba-font-family);
    font-size: var(--ba-font-size-lg);
    font-weight: var(--ba-font-weight-semibold);
    cursor: pointer;
    transition: all 0.2s ease;
}

.ba-search-panel__submit:hover {
    background: #1F2937;
}

.ba-search-panel__submit:active {
    transform: scale(0.98);
    background: #000000;
}

.ba-search-panel__submit:disabled {
    background: #9CA3AF;
    cursor: not-allowed;
}

/* Bottom Row - Recent Searches & Flight Log */
.ba-search-panel__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #F3F4F6;
}

/* Flight Log Checkbox */
.ba-search-panel__flight-log {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ba-search-panel__flight-log input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #353E48;
}

.ba-search-panel__flight-log label {
    font-family: var(--ba-font-family);
    font-size: var(--ba-font-size-base);
    color: var(--ba-text-secondary);
    font-weight: var(--ba-font-weight-medium);
    cursor: pointer;
    user-select: none;
}

/* Recent Searches */
.ba-search-panel__recent {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.ba-search-panel__recent-label {
    font-family: var(--ba-font-family);
    font-size: var(--ba-font-size-base);
    color: var(--ba-text-secondary);
    font-weight: var(--ba-font-weight-medium);
    white-space: nowrap;
}

.ba-search-panel__recent-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ba-search-panel__recent-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    font-family: var(--ba-font-family);
    font-size: var(--ba-font-size-base);
    color: var(--ba-text-primary);
    font-weight: var(--ba-font-weight-medium);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.ba-search-panel__recent-item:hover {
    background: #F3F4F6;
    border-color: var(--ba-text-accent);
}

.ba-search-panel__recent-item:active {
    background: #E5E7EB;
}

.ba-search-panel__recent-arrow {
    color: var(--ba-text-muted);
    font-size: 11px;
}

/* Multi-point recent searches - may have longer text */
.ba-search-panel__recent-item--multi {
    white-space: nowrap;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ba-search-panel__recent-empty {
    font-size: 13px;
    color: #9CA3AF;
    font-style: italic;
}

/* Airline Filter Row */
.ba-search-panel__airline-filter {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-top: 1px solid #F3F4F6;
}

.ba-search-panel__airline-filter-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #6B7280;
    font-weight: 500;
    white-space: nowrap;
}

.ba-search-panel__airline-filter-info {
    color: #9CA3AF;
    cursor: help;
    font-size: 12px;
}

.ba-search-panel__airline-filter-input {
    position: relative;
    min-width: 160px;
}

.ba-search-panel__airline-filter-input input {
    width: 100%;
    padding: 4px 12px;
    height: 24px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    background: #ffffff;
    box-sizing: border-box;
}

.ba-search-panel__airline-filter-input input:focus {
    outline: none;
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.ba-search-panel__airline-filter-tags {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1;
}

.ba-search-panel__airline-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 10px;
    height: 24px;
    background: #EEF2FF;
    border: 1px solid #C7D2FE;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    color: #4F46E5;
    box-sizing: border-box;
}

.ba-search-panel__airline-tag-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: transparent;
    border: none;
    color: #4F46E5;
    cursor: pointer;
    padding: 0;
    font-size: 14px;
    line-height: 1;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.ba-search-panel__airline-tag-remove:hover {
    background: rgba(79, 70, 229, 0.1);
}

/* Airline Autocomplete Dropdown */
.ba-search-panel__airline-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    margin-top: 4px;
}

.ba-search-panel__airline-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
    transition: background-color 0.15s;
}

.ba-search-panel__airline-dropdown-item:hover {
    background: #F9FAFB;
}

.ba-search-panel__airline-dropdown-item-add {
    color: #6B7280;
    font-size: 16px;
}

/* Field with Icon */
.ba-search-panel__field--with-icon input {
    padding-right: 40px;
}

.ba-search-panel__field-icon {
    position: absolute;
    right: 12px;
    bottom: 18px;
    color: #6B7280;
    pointer-events: none;
}

/* Multi-Point Fields (For Çoklu Uçuş) */
.ba-search-panel__multi-point {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ba-search-panel__multi-point-row {
    display: grid;
    grid-template-columns: 1fr 40px 1fr 1fr auto;
    gap: 12px;
    align-items: end;
}

.ba-search-panel__multi-point-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid #E5E7EB;
    background: #ffffff;
    color: #EF4444;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-bottom: 12px;
}

.ba-search-panel__multi-point-remove:hover {
    background: #FEF2F2;
    border-color: #EF4444;
}

.ba-search-panel__multi-point-add {
    padding: 10px 20px;
    background: transparent;
    border: 1px dashed #D1D5DB;
    color: #3B82F6;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.ba-search-panel__multi-point-add:hover {
    background: #EFF6FF;
    border-color: #3B82F6;
}

/* Flight Log Checkbox (for admin users) */
.ba-search-panel__flight-log {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

.ba-search-panel__flight-log input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #353E48;
}

.ba-search-panel__flight-log label {
    font-size: 13px;
    color: #6B7280;
    cursor: pointer;
}

/* Responsive Layouts */

/* Desktop: Location group and dates-row use display:contents so children participate in parent grid */
.ba-search-panel__location-group {
    display: contents;
}

.ba-search-panel__dates-row {
    display: contents;
}

/* Desktop: 5 columns for flight search */
.ba-search-panel--flight .ba-search-panel__fields {
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr 160px;
}

/* Desktop: 4 columns for bus search (swap is inside origin field) */
.ba-search-panel--bus .ba-search-panel__fields {
    grid-template-columns: 1fr 1fr 1fr 160px;
}

/* Desktop: 4 columns for hotel search */
.ba-search-panel--hotel .ba-search-panel__fields {
    grid-template-columns: 1fr 1fr 1fr 160px;
}

/* Responsive Styles */

/* Tablet and Mobile - stack all fields vertically */
@media (max-width: 768px) {
    .ba-search-panel__form {
        padding: 12px;
        border-radius: 16px;
    }

    .ba-search-panel__trip-type {
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 10px;
    }

    .ba-search-panel__tour-code {
        width: 100%;
        margin-left: 0;
    }

    /* Card padding reduced on mobile */
    .ba-search-panel__card {
        padding: 12px;
        border-radius: 16px;
    }

    /* Mobile layout - override ALL panel types to use flexbox stacking */
    .ba-search-panel__fields,
    .ba-search-panel--flight .ba-search-panel__fields,
    .ba-search-panel--bus .ba-search-panel__fields,
    .ba-search-panel--hotel .ba-search-panel__fields {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: none !important;
        gap: 8px;
    }

    /* Respect is-hidden class even on mobile */
    .ba-search-panel__fields.is-hidden,
    .ba-search-panel--flight .ba-search-panel__fields.is-hidden,
    .ba-search-panel--bus .ba-search-panel__fields.is-hidden,
    .ba-search-panel--hotel .ba-search-panel__fields.is-hidden {
        display: none !important;
    }

    /* All fields full width */
    .ba-search-panel__field {
        width: 100% !important;
        flex-shrink: 0;
    }

    /* ===== Flight Location Group: stacked origin/destination with swap icon ===== */
    .ba-search-panel__location-group {
        display: flex;
        flex-direction: column;
        gap: 0;
        position: relative;
        width: 100%;
    }

    .ba-search-panel__location-group .ba-search-panel__field--origin {
        position: static;
    }

    .ba-search-panel__location-group .ba-search-panel__field--origin .ba-search-panel__display {
        border-radius: 12px 12px 0 0;
        border-bottom: none;
    }

    .ba-search-panel__location-group .ba-search-panel__field--destination .ba-search-panel__display {
        border-radius: 0 0 12px 12px;
    }

    /* Swap button: repositioned to right side overlapping both origin and destination */
    .ba-search-panel__location-group .ba-search-panel__swap {
        position: absolute;
        right: 12px;
        top: 50%;
        transform: translateY(-50%) rotate(90deg);
        z-index: 6;
        width: 36px;
        height: 36px;
        background: white;
        border: 1px solid #E5E7EB;
        border-radius: 50%;
        box-shadow: 0 2px 4px rgba(0,0,0,0.08);
        transition: transform 0.3s ease;
    }

    .ba-search-panel__location-group .ba-search-panel__swap.is-swapping {
        transform: translateY(-50%) rotate(270deg);
    }

    /* ===== Dates Row: side by side 50/50 ===== */
    .ba-search-panel__dates-row {
        display: flex !important;
        flex-direction: row !important;
        gap: 8px;
        width: 100%;
    }

    .ba-search-panel__dates-row > .ba-search-panel__field {
        width: auto !important;
        flex: 1 1 0 !important;
        min-width: 0;
    }

    .ba-search-panel__dates-row > .ba-search-panel__field .ba-search-panel__display {
        min-width: 0;
        overflow: hidden;
    }

    /* Swap button fallback for bus (not in location-group) */
    .ba-search-panel--bus .ba-search-panel__swap {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        margin: -6px auto;
        position: relative;
        z-index: 5;
        background: white;
        border: 1px solid #E5E7EB;
        border-radius: 50%;
        box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    }

    /* Display panels */
    .ba-search-panel__display {
        min-height: 52px;
        padding: 8px 12px;
    }

    .ba-search-panel__display-label {
        font-size: 11px;
    }

    .ba-search-panel__display-value {
        font-size: 15px;
    }

    .ba-search-panel__display-secondary {
        font-size: 11px;
    }

    /* Passenger selector full width on mobile */
    .ba-search-panel__field .ba-passenger-selector__trigger {
        min-height: 52px;
        padding: 8px 40px 8px 12px;
    }

    .ba-search-panel__field .ba-passenger-selector__label {
        font-size: 11px;
    }

    .ba-search-panel__field .ba-passenger-selector__value {
        font-size: 14px;
    }

    /* Submit button full width */
    .ba-search-panel__submit {
        width: 100%;
        height: 48px;
        margin-top: 0;
    }

    .ba-search-panel__bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .ba-search-panel__recent {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
    }

    .ba-search-panel__recent-list {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 8px;
    }

    /* ===== Multi-city Legs: mobile layout matching single-trip design ===== */
    .ba-search-panel__leg {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: none !important;
        padding: 0 !important;
        gap: 0 !important;
        overflow: visible !important;
        width: 100% !important;
        margin: 0 !important;
        border: 1.5px solid #374151 !important;
        border-radius: 12px !important;
        position: relative !important;
    }

    .ba-search-panel__leg--first {
        grid-template-columns: none !important;
    }

    /* Leg number: full width header bar, flush with border */
    .ba-search-panel__leg-number {
        border-radius: 10px 10px 0 0 !important;
        min-height: 30px !important;
        font-size: 13px !important;
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        padding-left: 12px !important;
    }

    /* Leg fields stack vertically */
    .ba-search-panel__leg-field {
        width: 100% !important;
        padding: 0 !important;
        min-height: auto !important;
        border-right: none !important;
    }

    .ba-search-panel__leg-field .ba-search-panel__display {
        border: none !important;
        border-bottom: 1px solid #E5E7EB !important;
        border-radius: 0 !important;
        padding: 8px 12px !important;
        min-height: 52px !important;
    }

    /* Origin + destination: location-group style */
    .ba-search-panel__leg-field--with-swap {
        position: relative !important;
    }

    .ba-search-panel__leg-field--with-swap .ba-search-panel__display {
        border-radius: 0 !important;
        border-bottom: 1px solid #E5E7EB !important;
    }

    .ba-search-panel__leg-field[data-field="destination"] .ba-search-panel__display {
        border-radius: 0 !important;
        border-bottom: 1px solid #E5E7EB !important;
    }

    /* Swap button: overlay on right between origin/destination */
    .ba-search-panel__leg-field--with-swap .ba-search-panel__swap {
        position: absolute !important;
        right: 12px !important;
        top: auto !important;
        bottom: -18px !important;
        transform: rotate(90deg) !important;
        z-index: 6 !important;
        width: 36px !important;
        height: 36px !important;
        background: white !important;
        border: 1px solid #E5E7EB !important;
        border-radius: 50% !important;
        box-shadow: 0 2px 4px rgba(0,0,0,0.08) !important;
        transition: transform 0.3s ease !important;
    }

    /* Date field */
    .ba-search-panel__leg-field[data-field="date"] {
        border-top: none !important;
    }

    .ba-search-panel__leg-field[data-field="date"] .ba-search-panel__display {
        border-bottom: none !important;
        border-radius: 0 0 10px 10px !important;
    }

    /* Remove button - positioned inside leg-number header on mobile */
    .ba-search-panel__leg-remove {
        position: absolute !important;
        top: 0 !important;
        right: 0 !important;
        width: auto !important;
        border: none !important;
        border-radius: 0 10px 0 0 !important;
        padding: 0 10px !important;
        font-size: 12px !important;
        color: #ffffff !important;
        background: transparent !important;
        height: 30px !important;
        display: flex !important;
        align-items: center !important;
        gap: 4px !important;
        z-index: 2 !important;
    }

    .ba-search-panel__leg-remove svg {
        width: 14px !important;
        height: 14px !important;
        color: #ffffff !important;
    }

    /* Keep first two legs non-removable on mobile as well */
    .ba-search-panel__legs .ba-search-panel__leg:nth-child(1) .ba-search-panel__leg-remove,
    .ba-search-panel__legs .ba-search-panel__leg:nth-child(2) .ba-search-panel__leg-remove {
        display: none !important;
    }

    /* Multipoint footer: stack vertically */
    .ba-search-panel__multipoint-footer {
        flex-direction: column;
        gap: 8px;
    }

    .ba-search-panel__multipoint-passenger {
        width: 100%;
    }

    .ba-search-panel__multipoint-submit {
        width: 100%;
    }

    .ba-search-panel__multipoint-submit .ba-search-panel__submit {
        width: 100%;
    }
}

/* Small Mobile (576px and below) */
@media (max-width: 576px) {
    .ba-search-panel__form {
        padding: 12px;
        border-radius: 12px;
    }

    .ba-search-panel__trip-type {
        gap: 6px;
        margin-bottom: 12px;
    }

    .ba-search-panel__trip-option label {
        font-size: 12px;
    }

    .ba-search-panel__fields {
        gap: 10px;
    }

    .ba-search-panel__swap {
        width: 32px;
        height: 32px;
    }

    .ba-search-panel__location-group .ba-search-panel__swap {
        width: 32px;
        height: 32px;
    }

    .ba-search-panel__display {
        min-height: 56px;
        padding: 8px 12px;
    }

    .ba-search-panel__display-label {
        font-size: 10px;
    }

    .ba-search-panel__display-value {
        font-size: 14px;
    }

    .ba-search-panel__display-secondary {
        font-size: 10px;
    }

    .ba-search-panel__field .ba-passenger-selector__trigger {
        min-height: 56px;
        padding: 8px 36px 8px 12px;
    }

    .ba-search-panel__submit {
        height: 48px;
        font-size: 15px;
        border-radius: 10px;
    }

    /* Multi-point legs on small mobile */
    .ba-search-panel__leg {
        padding: 0;
    }

    .ba-search-panel__leg-field--with-swap .ba-search-panel__swap {
        width: 32px;
        height: 32px;
    }

    /* Tour code on mobile */
    .ba-search-panel__tour-code {
        width: 100%;
        order: 10;
        margin-top: 8px;
    }

    .ba-search-panel__tour-code-select {
        width: 100%;
    }

    /* Tour code mobile row - switch and select side by side above submit */
    .ba-search-panel__tour-code-mobile-row {
        display: flex;
        align-items: center;
        gap: 12px;
        width: 100%;
        margin-bottom: 8px;
    }

    .ba-search-panel__tour-code-mobile-row .ba-search-panel__tour-code {
        width: auto;
        margin-top: 0;
        order: 0;
        flex-shrink: 0;
    }

    .ba-search-panel__tour-code-mobile-row .ba-search-panel__tour-code-select {
        flex: 1;
        min-width: 0;
        margin-left: 0;
    }

    /* Autocomplete dropdowns should be full width on mobile */
    .ba-autocomplete__dropdown {
        width: 100vw !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        max-width: none !important;
        border-radius: 0 0 12px 12px;
    }

    /* Keep active multipoint leg above following legs while typing/selecting */
    .ba-search-panel__leg:focus-within {
        z-index: 40 !important;
    }

    .ba-search-panel__leg-field .ba-autocomplete__dropdown {
        z-index: 1300 !important;
    }

    /* Recent searches horizontal scroll */
    .ba-search-panel__recent {
        margin-left: -12px;
        margin-right: -12px;
        padding-left: 12px;
        padding-right: 12px;
    }

    .ba-search-panel__recent-list {
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .ba-search-panel__recent-list::-webkit-scrollbar {
        display: none;
    }
}

/* Touch-friendly tap targets */
@media (hover: none) and (pointer: coarse) {
    .ba-search-panel__trip-option {
        min-height: 44px;
        padding: 8px 0;
    }

    .ba-search-panel__display {
        min-height: 56px;
    }

    .ba-search-panel__swap {
        width: 36px;
        height: 36px;
    }

    .ba-search-panel__submit {
        min-height: 52px;
    }
}

/* Dark Mode */
/*@media (prefers-color-scheme: dark) {
    .ba-search-panel {
        background: #111827;
    }

    .ba-search-panel__form {
        background: #1F2937;
    }

    .ba-search-panel__trip-option label {
        color: #E5E7EB;
    }

    .ba-search-panel__field input,
    .ba-search-panel__field select {
        background: #374151;
        border-color: #4B5563;
        color: #F9FAFB;
    }

    .ba-search-panel__swap {
        background: #374151;
        border-color: #4B5563;
    }

    .ba-search-panel__swap:hover {
        background: #4B5563;
    }

    .ba-search-panel__recent-item {
        background: #374151;
        border-color: #4B5563;
        color: #E5E7EB;
    }

    .ba-search-panel__recent-item:hover {
        background: #4B5563;
    }
}*/

/* Print Styles */
@media print {
    .ba-search-panel {
        display: none;
    }
}

/* Loading State */
.ba-search-panel.is-loading {
    pointer-events: none;
    opacity: 0.6;
}

.ba-search-panel.is-loading .ba-search-panel__submit::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: ba-search-panel-spin 0.6s linear infinite;
}

@keyframes ba-search-panel-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==================== MULTI-POINT FLIGHT (ÇOKLU UÇUŞ) ==================== */

/* Single-point fields container - visible by default */
.ba-search-panel__fields {
    display: grid;
}

.ba-search-panel__fields.is-hidden {
    display: none !important;
}

/* Multi-point container - hidden by default, shown when trip type is multi */
.ba-search-panel__multipoint {
    display: none;
}

.ba-search-panel__multipoint.is-hidden {
    display: none !important;
}

.ba-search-panel__multipoint.is-active {
    display: block;
}

/* Leg container */
.ba-search-panel__legs {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Individual leg row */
.ba-search-panel__leg {
    display: grid;
    grid-template-columns: 40px 1fr 1fr 1fr auto;
    gap: 0;
    align-items: center;
    padding: 0;
    background: #ffffff;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    position: relative;
    overflow: visible;
}

/* First leg - same as others now (passenger moved to footer) */
.ba-search-panel__leg--first {
    grid-template-columns: 40px 1fr 1fr 1fr;
}

/* Leg number badge - full height */
.ba-search-panel__leg-number {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #374151;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    min-height: 100%;
    border-radius: 11px 0 0 11px;
}

/* Leg field wrapper */
.ba-search-panel__leg-field {
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 12px 8px;
    border-right: none;
    min-height: 76px;
    justify-content: center;
    overflow: visible;
}

/* Origin field needs more right padding for swap button */
.ba-search-panel__leg-field--with-swap {
    position: relative;
    z-index: 5;
    overflow: visible;
    padding-right: 0;
}

/* Display in leg field with swap - make it the positioning context */
.ba-search-panel__leg-field--with-swap .ba-search-panel__display {
    position: relative;
    padding-right: 8px;
    overflow: visible;
}

/* Swap button positioned relative to display, not field */
.ba-search-panel__leg-field--with-swap .ba-search-panel__swap {
    position: absolute;
    right: -18px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 32px;
    height: 32px;
    min-width: 32px;
    background: #ffffff;
    border: 1px solid #D1D5DB;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}

.ba-search-panel__leg-field--with-swap .ba-search-panel__swap:hover {
    background: #F3F4F6;
    border-color: #9CA3AF;
}

.ba-search-panel__leg-field--with-swap .ba-search-panel__swap svg {
    color: #6B7280;
}

/* Ensure autocomplete dropdown appears above other elements in legs */
.ba-search-panel__leg-field .ba-autocomplete__results {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    min-width: 300px;
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-height: 300px;
    overflow-y: auto;
}

/* Remove leg button */
.ba-search-panel__leg-remove {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: transparent;
    border: none;
    color: #EF4444;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.ba-search-panel__leg-remove:hover {
    background: rgba(239, 68, 68, 0.1);
}

.ba-search-panel__leg-remove svg {
    width: 16px;
    height: 16px;
}

/* Datepicker in legs - ensure visibility */
.ba-search-panel__leg-field .ba-datepicker__calendar {
    z-index: 1001;
}

/* Hide first two leg remove buttons via CSS */
.ba-search-panel__leg:nth-child(-n+2) .ba-search-panel__leg-remove {
    display: none;
}

/* Hide remove button for first two legs (minimum 2 required) */
.ba-search-panel__leg:nth-child(1) .ba-search-panel__leg-remove,
.ba-search-panel__leg:nth-child(2) .ba-search-panel__leg-remove {
    display: none;
}

/* Add leg button container */
.ba-search-panel__add-leg {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border: 2px dashed #D1D5DB;
    border-radius: 12px;
    margin-top: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.ba-search-panel__add-leg:hover {
    border-color: #9CA3AF;
    background: #F9FAFB;
}

.ba-search-panel__add-leg-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    background: transparent;
    border: none;
    color: #6B7280;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.ba-search-panel__add-leg-btn svg {
    width: 20px;
    height: 20px;
}

.ba-search-panel__add-leg:hover .ba-search-panel__add-leg-btn {
    color: #374151;
}

/* Multi-point footer: Recent searches (left) + passenger selector + submit button (right) */
.ba-search-panel__multipoint-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    gap: 16px;
}

/* Recent searches in multipoint - left aligned */
.ba-search-panel__multipoint-recent {
    flex: 1;
    min-width: 0;
}

/* Right side group: passenger + submit */
.ba-search-panel__multipoint-passenger {
    flex: 0 0 auto;
    min-width: 200px;
}

.ba-search-panel__multipoint-submit {
    display: flex;
    margin-top: 16px;
}

.ba-search-panel__multipoint-submit .ba-search-panel__submit {
    min-width: 200px;
}

/* Responsive adjustments for multi-point */
@media (max-width: 1200px) {
    .ba-search-panel__leg {
        grid-template-columns: 32px 1fr;
        gap: 12px;
    }

    .ba-search-panel__leg--first {
        grid-template-columns: 32px 1fr;
    }

    .ba-search-panel__leg-number {
        grid-row: 1 / 3;
    }
}

@media (max-width: 768px) {
    .ba-search-panel__leg {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .ba-search-panel__leg-number {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .ba-search-panel__add-leg {
        padding: 16px;
    }
}

/* ==========================================================
 * OTOBUS SEARCH PANEL STYLES
 * ========================================================== */

.ba-search-panel--otobus .ba-search-panel__grid--otobus {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 200px;
    gap: 0 16px;
    align-items: center;
}

/* Bus icon style */
.ba-search-panel--otobus .ba-autocomplete__icon svg {
    color: #6B7280;
}

/* ==========================================================
 * OTEL SEARCH PANEL STYLES
 * ========================================================== */

.ba-search-panel--otel .ba-search-panel__grid--otel {
    display: grid;
    /* destination | date-range | guests | nationality | commission | search-btn */
    grid-template-columns: 1.5fr 2fr 1fr 1fr 1fr 180px;
    gap: 0 12px;
    align-items: center;
}

/* Allow autocomplete dropdown to overflow in otel destination field */
.ba-search-panel--otel .ba-search-panel__field[data-field="destination"] {
    position: relative;
    overflow: visible;
}

.ba-search-panel--otel .ba-search-panel__field[data-field="destination"] .ba-search-panel__display {
    overflow: visible;
}

.ba-search-panel--otel .ba-search-panel__field[data-field="destination"] .ba-autocomplete {
    position: static;
}

.ba-search-panel--otel .ba-search-panel__field[data-field="destination"] .ba-autocomplete__dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    min-width: 300px;
    z-index: 1100;
}

/* Wide field for destination */
.ba-search-panel__field--wide {
    grid-column: span 1;
}

/* Date separator (inside date-range) */
.ba-search-panel__date-separator {
    color: #9CA3AF;
    font-size: 16px;
    text-align: center;
    padding: 0 4px;
}

/* Date display styling for range */
.ba-search-panel__display--date-start,
.ba-search-panel__display--date-end {
    border-right: none;
}

/* Label on top style */
.ba-search-panel__display-label-top {
    font-size: 12px;
    color: #6B7280;
    font-weight: 600;
    margin-bottom: 4px;
}

/* Select styling */
.ba-search-panel__select {
    width: 100%;
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4L6 8L10 4' stroke='%239CA3AF' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.ba-search-panel__select:focus {
    outline: none;
    border-color: #3B82F6;
}

/* Clickable Display Field */
.ba-search-panel__display--clickable {
    cursor: pointer;
    position: relative;
}

.ba-search-panel__display--clickable::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #9CA3AF;
    transition: transform 0.2s ease;
}

.ba-search-panel__display--clickable.is-open::after {
    transform: translateY(-50%) rotate(180deg);
}

/* ==================== Unified Date Range Display ==================== */
.ba-search-panel__field--date-range {
    position: relative;
}

.ba-search-panel__date-range {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    height: 76px;
    min-height: 76px;
    box-sizing: border-box;
}

.ba-search-panel__date-range:hover {
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.ba-search-panel__date-range.is-open {
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.ba-search-panel__date-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.ba-search-panel__date-section--start {
    padding-right: 12px;
}

.ba-search-panel__date-section--end {
    padding-left: 12px;
}

.ba-search-panel__date-range .ba-search-panel__display-label {
    font-size: var(--ba-font-size-sm);
    font-weight: var(--ba-font-weight-semibold);
    color: var(--ba-text-secondary);
    text-transform: none;
    letter-spacing: normal;
}

.ba-search-panel__date-range .ba-search-panel__display-value {
    font-size: var(--ba-font-size-md);
    font-weight: var(--ba-font-weight-medium);
    color: var(--ba-text-primary);
    line-height: var(--ba-line-height-normal);
}

.ba-search-panel__date-range .ba-search-panel__display-secondary {
    font-size: var(--ba-font-size-base);
    color: var(--ba-text-secondary);
    font-weight: var(--ba-font-weight-normal);
}

.ba-search-panel__date-range .ba-search-panel__date-separator {
    color: #D1D5DB;
    font-size: 14px;
    font-weight: 300;
    padding: 0 4px;
    flex-shrink: 0;
}

/* Date Range Calendar Positioning */
.ba-search-panel__field--date-range .ba-datepicker {
    position: static;
}

.ba-search-panel__field--date-range .ba-datepicker__calendar {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
}

/* Nationality Dropdown */
.ba-search-panel__field[data-field="nationality"] {
    position: relative;
}

/* Nationality display value - no wrap, ellipsis for overflow */
.ba-search-panel__field[data-field="nationality"] .ba-search-panel__display-value {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.ba-search-panel__nationality-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    min-width: 200px;
    max-height: 300px;
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
    overflow: hidden;
}

.ba-search-panel__nationality-dropdown.is-open {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

.ba-search-panel__dropdown-search {
    padding: 8px 12px;
    border-bottom: 1px solid #E5E7EB;
}

.ba-search-panel__dropdown-search input {
    width: 100%;
    padding: 4px 8px;
    height: 28px;
    font-size: 13px;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    box-sizing: border-box;
}

.ba-search-panel__dropdown-search input:focus {
    outline: none;
    border-color: #3B82F6;
}

.ba-search-panel__dropdown-list {
    max-height: 220px;
    overflow-y: auto;
}

.ba-search-panel__dropdown-item {
    padding: 10px 16px;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    transition: background 0.15s ease;
}

.ba-search-panel__dropdown-item:hover {
    background: #F3F4F6;
}

.ba-search-panel__dropdown-item.is-selected {
    background: #EEF2FF;
    color: #3B82F6;
    font-weight: 500;
}

/* Commission Dropdown */
.ba-search-panel__commission-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    min-width: 180px;
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    padding: 16px;
    display: none;
}

.ba-search-panel__commission-dropdown.is-open {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

.ba-search-panel__commission-type {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
}

.ba-search-panel__radio {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
}

.ba-search-panel__radio input[type="radio"] {
    appearance: none;
    width: 16px;
    height: 16px;
    border: 2px solid #D1D5DB;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    margin: 0;
}

.ba-search-panel__radio input[type="radio"]:checked {
    border-color: #3B82F6;
}

.ba-search-panel__radio input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: #3B82F6;
    border-radius: 50%;
}

.ba-search-panel__commission-input input {
    width: 100%;
    padding: 4px 8px;
    height: 28px;
    font-size: 13px;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    box-sizing: border-box;
}

.ba-search-panel__commission-input input:focus {
    outline: none;
    border-color: #3B82F6;
}

/* Position relative for commission field dropdown */
.ba-search-panel__field[data-field="commission"] {
    position: relative;
}

/* Otel display pointer cursor */
.ba-search-panel--otel .ba-search-panel__display[id="otelCommissionDisplay"] {
    cursor: pointer;
}

/* Responsive for Otobus */
@media (max-width: 1200px) {
    .ba-search-panel--otobus .ba-search-panel__grid--otobus {
        grid-template-columns: 1fr 40px 1fr;
        gap: 16px;
    }

    .ba-search-panel--otobus .ba-search-panel__field[data-field="departure-date"],
    .ba-search-panel--otobus .ba-search-panel__field--button {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .ba-search-panel--otobus .ba-search-panel__grid--otobus {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: none !important;
        gap: 8px;
    }

    .ba-search-panel--otobus .ba-search-panel__field {
        width: 100% !important;
    }

    .ba-search-panel--otobus .ba-search-panel__display {
        min-height: 52px;
        padding: 8px 12px;
    }

    .ba-search-panel--otobus .ba-search-panel__submit {
        width: 100%;
        height: 48px;
    }

    /* Otobus swap: overlay between origin and destination */
    .ba-search-panel--otobus .ba-search-panel__field--with-swap {
        position: relative;
    }

    .ba-search-panel--otobus .ba-search-panel__field--with-swap .ba-search-panel__display {
        border-radius: 12px 12px 0 0;
        border-bottom: none;
    }

    .ba-search-panel--otobus .ba-search-panel__field[data-field="destination"] .ba-search-panel__display {
        border-radius: 0 0 12px 12px;
    }

    .ba-search-panel--otobus .ba-search-panel__field--with-swap .ba-search-panel__swap {
        position: absolute;
        right: 12px;
        top: auto;
        bottom: -18px;
        left: auto;
        transform: rotate(90deg);
        z-index: 6;
        width: 36px;
        height: 36px;
        background: white;
        border: 1px solid #E5E7EB;
        border-radius: 50%;
        box-shadow: 0 2px 4px rgba(0,0,0,0.08);
        transition: transform 0.3s ease;
    }

    .ba-search-panel--otobus .ba-search-panel__field--with-swap .ba-search-panel__swap.is-swapping {
        transform: rotate(270deg);
    }

    /* Remove gap between origin and destination for connected look */
    .ba-search-panel--otobus .ba-search-panel__grid--otobus .ba-search-panel__field[data-field="destination"] {
        margin-top: -8px;
    }
}

/* Responsive for Otel */
@media (max-width: 1400px) {
    .ba-search-panel--otel .ba-search-panel__grid--otel {
        /* destination | date-range | guests | nationality | commission | btn */
        grid-template-columns: 1fr 2fr 1fr;
        gap: 16px;
    }

    .ba-search-panel__field--wide {
        grid-column: span 3;
    }

    .ba-search-panel__field--date-range {
        grid-column: span 2;
    }

    .ba-search-panel--otel .ba-search-panel__field[data-field="nationality"],
    .ba-search-panel--otel .ba-search-panel__field[data-field="commission"],
    .ba-search-panel--otel .ba-search-panel__field--button {
        grid-column: span 1;
    }
}

@media (max-width: 992px) {
    .ba-search-panel--otel .ba-search-panel__grid--otel {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .ba-search-panel__field--wide {
        grid-column: span 2;
    }

    .ba-search-panel__field--date-range {
        grid-column: span 2;
    }

    .ba-search-panel--otel .ba-search-panel__field[data-field="guests"] {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .ba-search-panel--otel .ba-search-panel__grid--otel {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: none !important;
        gap: 8px;
    }

    .ba-search-panel--otel .ba-search-panel__field {
        width: 100% !important;
    }

    .ba-search-panel--otel .ba-search-panel__display {
        min-height: 52px;
        padding: 8px 12px;
    }

    .ba-search-panel__field--wide,
    .ba-search-panel__field--date-range,
    .ba-search-panel--otel .ba-search-panel__field[data-field="guests"] {
        grid-column: span 1;
    }

    .ba-search-panel__date-range {
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .ba-search-panel__date-section {
        flex: 1 1 45%;
        min-width: 120px;
    }

    .ba-search-panel__date-range .ba-search-panel__date-separator {
        flex: 0 0 10%;
        text-align: center;
    }

    .ba-search-panel--otel .ba-search-panel__submit {
        width: 100%;
        height: 48px;
    }
}

/* ==========================================================
 * GRUP REZERVASYONU SEARCH PANEL STYLES
 * ========================================================== */

.ba-search-panel--grup {
    background: transparent;
}

.ba-search-panel--grup .ba-search-panel__form {
    background: #ffffff;
    border-radius: 24px;
    padding: 24px 32px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.ba-search-panel--grup .ba-search-panel__card {
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

.ba-search-panel--grup .ba-search-panel__grid--grup {
    display: grid;
    /* origin (with swap inside) | destination | departure | search-btn (for Tek Yön) */
    grid-template-columns: 1fr 1fr 1fr 1fr 180px;
    gap: 0 12px;
    align-items: center;
}

/* When roundtrip mode is active, show return field */
.ba-search-panel--grup .ba-search-panel__grid--grup.ba-search-panel__grid--roundtrip {
    grid-template-columns: 1fr 1fr 1fr 1fr 180px;
}

/* Origin field with swap button positioning */
.ba-search-panel--grup .ba-search-panel__field--with-swap {
    position: relative;
    overflow: visible;
}

.ba-search-panel--grup .ba-search-panel__field--with-swap .ba-search-panel__swap {
    position: absolute;
    right: -22px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #D1D5DB;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ba-search-panel--grup .ba-search-panel__field--with-swap .ba-search-panel__swap:hover {
    background: #F3F4F6;
    border-color: #9CA3AF;
}

/* Field display panels */
.ba-search-panel--grup .ba-search-panel__display {
    position: relative;
    min-height: 76px;
    height: 76px;
    padding: 8px 16px;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    background: #ffffff;
    transition: all 0.2s ease;
}

/* Only date fields need cursor pointer since autocomplete handles its own input */
.ba-search-panel--grup .ba-search-panel__field[data-field="departure-date"] .ba-search-panel__display,
.ba-search-panel--grup .ba-search-panel__field[data-field="return-date"] .ba-search-panel__display {
    cursor: pointer;
}

/* Autocomplete wrapper in Grup Rez display */
.ba-search-panel--grup .ba-search-panel__display .ba-autocomplete {
    flex: 1;
    min-width: 0;
    position: relative;
}

/* Ensure autocomplete dropdown is visible above other elements */
.ba-search-panel--grup .ba-autocomplete__dropdown {
    z-index: 1100;
}

/* Hidden input for datepicker binding */
.ba-search-panel__hidden-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 1px;
    height: 1px;
    bottom: 0;
    left: 50%;
}

/* BADatePicker wrapper inside display element */
.ba-search-panel--grup .ba-search-panel__display .ba-datepicker {
    position: absolute;
    width: 1px;
    height: 1px;
    bottom: 0;
    left: 50%;
}

.ba-search-panel--grup .ba-search-panel__display:hover {
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Return date "Dönüş Ekle" button style */
.ba-search-panel--grup .ba-search-panel__display--add-return {
    cursor: pointer;
}

.ba-search-panel--grup .ba-search-panel__display--add-return .ba-search-panel__display-value {
    color: #9CA3AF;
}

.ba-search-panel--grup .ba-search-panel__display--add-return svg {
    color: #9CA3AF;
}

/* When return date is active/has value */
.ba-search-panel--grup .ba-search-panel__field--active .ba-search-panel__display--add-return {
    cursor: pointer;
}

.ba-search-panel--grup .ba-search-panel__field--active .ba-search-panel__display--add-return .ba-search-panel__display-value {
    color: #1F2937;
}

/* Swap button animation */
.ba-search-panel--grup .ba-search-panel__swap--rotating {
    transform: rotate(180deg);
}

/* Recent searches row */
.ba-search-panel--grup .ba-search-panel__recent {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #F3F4F6;
}

.ba-search-panel__recent-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 20px;
    font-family: var(--ba-font-family);
    font-size: var(--ba-font-size-base);
    color: var(--ba-text-primary);
    font-weight: var(--ba-font-weight-medium);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.ba-search-panel__recent-chip:hover {
    background: #EEF2FF;
    border-color: var(--ba-text-accent);
    color: var(--ba-text-accent);
}

/* Button field alignment */
.ba-search-panel--grup .ba-search-panel__field--button {
    display: flex;
    align-items: stretch;
}

.ba-search-panel--grup .ba-search-panel__submit {
    width: 100%;
    height: 76px;
    min-width: auto;
}

/* Responsive adjustments for Grup Rez */
@media (max-width: 1200px) {
    .ba-search-panel--grup .ba-search-panel__grid--grup {
        grid-template-columns: 1fr 0px 1fr 1fr 1fr 160px;
    }
}

@media (max-width: 992px) {
    .ba-search-panel--grup .ba-search-panel__grid--grup {
        grid-template-columns: 1fr 0px 1fr 1fr 1fr;
        gap: 16px;
    }

    .ba-search-panel--grup .ba-search-panel__field--button {
        grid-column: 1 / -1;
    }

    .ba-search-panel--grup .ba-search-panel__submit {
        height: 56px;
    }
}

@media (max-width: 768px) {
    .ba-search-panel--grup .ba-search-panel__grid--grup {
        display: flex;
        flex-direction: column;
        grid-template-columns: none;
        gap: 8px;
    }

    .ba-search-panel--grup .ba-search-panel__field {
        width: 100% !important;
    }

    .ba-search-panel--grup .ba-search-panel__display {
        min-height: 52px;
        padding: 8px 12px;
    }

    .ba-search-panel--grup .ba-search-panel__field[data-field="departure-date"],
    .ba-search-panel--grup .ba-search-panel__field[data-field="return-date"] {
        grid-column: span 1;
    }

    .ba-search-panel--grup .ba-search-panel__field--button {
        grid-column: 1 / -1;
        margin-top: 0;
    }

    .ba-search-panel--grup .ba-search-panel__card {
        padding: 8px;
    }

    .ba-search-panel--grup .ba-search-panel__form {
        padding: 12px 10px;
        border-radius: 16px;
    }

    .ba-search-panel--grup .ba-search-panel__recent {
        flex-wrap: wrap;
    }

    .ba-search-panel--grup .ba-search-panel__submit {
        width: 100%;
        height: 48px;
    }

    .ba-search-panel--grup .ba-search-panel__swap-wrapper {
        display: none;
    }

    /* Grup swap: overlay between origin and destination */
    .ba-search-panel--grup .ba-search-panel__field--with-swap {
        position: relative;
    }

    .ba-search-panel--grup .ba-search-panel__field--with-swap .ba-search-panel__display {
        border-radius: 12px 12px 0 0;
        border-bottom: none;
    }

    .ba-search-panel--grup .ba-search-panel__field[data-field="destination"] .ba-search-panel__display {
        border-radius: 0 0 12px 12px;
    }

    .ba-search-panel--grup .ba-search-panel__field--with-swap .ba-search-panel__swap {
        position: absolute;
        right: 12px;
        top: auto;
        bottom: -18px;
        left: auto;
        transform: rotate(90deg);
        z-index: 6;
        width: 36px;
        height: 36px;
        background: white;
        border: 1px solid #E5E7EB;
        border-radius: 50%;
        box-shadow: 0 2px 4px rgba(0,0,0,0.08);
        transition: transform 0.3s ease;
    }

    .ba-search-panel--grup .ba-search-panel__field--with-swap .ba-search-panel__swap.is-swapping {
        transform: rotate(270deg);
    }

    /* Remove gap between origin and destination for connected look */
    .ba-search-panel--grup .ba-search-panel__grid--grup .ba-search-panel__field[data-field="destination"] {
        margin-top: -8px;
    }
}

@media (max-width: 576px) {
    .ba-search-panel--grup .ba-search-panel__swap-wrapper {
        display: none;
    }
}

/* ==========================================================
 * INPUT CARET VISIBILITY
 * ========================================================== */

/* Make cursor more visible in all input fields */
.ba-search-panel__input,
.ba-search-panel input[type="text"],
.ba-autocomplete__input {
    caret-color: #000 !important; /* Black caret for maximum visibility */
}

/* Ensure focus state has visible caret */
.ba-search-panel__input:focus,
.ba-search-panel input[type="text"]:focus,
.ba-autocomplete__input:focus {
    caret-color: #1D4ED8 !important; /* Strong blue when focused */
    outline: none;
}

/* Fix cursor visibility - add padding so caret doesn't get cut off */
.ba-autocomplete__input {
    padding-left: 4px !important;
    box-sizing: border-box;
    font-size: 14px !important; /* Consistent font size makes caret more proportional */
}
