/* Flight Search Component Styles - Clean & Modern Design */

/* Ana container */
.booking .content .booking-info {
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
    display: inherit;
}

.flight-search-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 50px 32px 10px 32px;
    position: relative;
}


/* Trip Type Selection - Üst satır */
.trip-type-selection {
    display: flex;
    gap: 0;
    background: rgba(248, 250, 252, 0.8);
    border-radius: 12px;
    padding: 4px;
    border: 1px solid #e2e8f0;
    position: absolute;
    left: 15px;
    top: -20px;
}

.trip-type-button {
    padding: 5px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-width: 120px;
    text-align: center;
}

.trip-type-button.active {
    color: #4D73FC;
    background: white;
    box-shadow: 0 2px 8px rgba(77, 115, 252, 0.15);
}

.trip-type-button.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg, #4D73FC, #6366F1);
    border-radius: 2px;
    animation: underlineSlide 0.3s ease;
}

@keyframes underlineSlide {
    0% {
        width: 0%;
    }
    100% {
        width: 60%;
    }
}

.trip-type-button:hover:not(.active) {
    color: #4D73FC;
    background: rgba(77, 115, 252, 0.05);
}

/* Input Row - Orta satır */
.input-row {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: nowrap;
    justify-content: center;
    width: 100%;
}

/* Arama alanları */
.search-field {
    display: flex;
    flex-direction: column;
    min-width: 140px;
    flex: 1;
    position: relative;
    max-width: 200px;
}

.field-label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 8px;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-input {
    width: 100%;
    height: 52px;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: white;
    font-size: 14px;
    color: #1e293b;
    transition: all 0.3s ease;
    font-weight: 500;
}

.search-input:focus {
    outline: none;
    border-color: #4D73FC;
    box-shadow: 0 0 0 3px rgba(77, 115, 252, 0.1);
    transform: translateY(-1px);
}

.search-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.search-input:hover {
    border-color: #cbd5e1;
}

/* Swap butonu */
.swap-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 52px;
    background: linear-gradient(135deg, #e2e8fb, #d5d6f9);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(77, 115, 252, 0.3);
    margin: 0 4px;
}

.swap-button:hover {
    background: linear-gradient(135deg, #3d5fd8, #5b5bd6);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(77, 115, 252, 0.4);
}

.swap-button:hover .arrow-icon path {
    fill: white;
}

.arrow-icon {
    transition: transform 0.3s ease;
}

.arrow-icon.rotate {
    transform: rotate(180deg);
}

/* Yolcular alanı */
.passenger-trigger {
    width: 100%;
    height: 52px;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    color: #1e293b;
    transition: all 0.3s ease;
    font-weight: 500;
    cursor: pointer;
}

.passenger-trigger:hover {
    border-color: #4D73FC;
    box-shadow: 0 0 0 3px rgba(77, 115, 252, 0.1);
    transform: translateY(-1px);
}

.passenger-trigger i {
    color: #4D73FC;
    transition: transform 0.3s ease;
}

.passenger-trigger:hover i {
    transform: rotate(180deg);
}

.passenger-modal {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 20px;
    margin-top: 8px;
    border: 1px solid #e2e8f0;
    z-index: 1000;
    min-width: 350px;
    max-width: 400px;
}

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

/* Masaüstü için modal content düzenlemesi */
.passenger-modal .modal-content {
    background: transparent;
    border-radius: 0;
    padding: 0;
    width: 100%;
    max-width: none;
    max-height: none;
    overflow-y: visible;
    box-shadow: none;
    margin: 0;
}

.passenger-modal .passenger-header {
    margin-bottom: 16px;
    text-align: left;
}

.passenger-modal .passenger-header h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.passenger-modal .passenger-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
}

.passenger-modal .passenger-box .row {
    margin: 0;
    align-items: center;
}

.passenger-modal .passenger-box .col-md-7,
.passenger-modal .passenger-box .col-sm-6,
.passenger-modal .passenger-box .col-6 {
    padding: 0 8px;
}

.passenger-modal .passenger-box .content-box h5 {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 2px 0;
}

.passenger-modal .passenger-box .content-box p {
    font-size: 12px;
    color: #64748b;
    margin: 0;
}

.passenger-modal .quantity-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 2px;
}

.passenger-modal .quantity-wrap button {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 4px;
    background: linear-gradient(135deg, #4D73FC, #6366F1);
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.passenger-modal .quantity-wrap button:hover {
    background: linear-gradient(135deg, #3d5fd8, #5b5bd6);
    transform: scale(1.05);
}

.passenger-modal .quantity-wrap button:disabled {
    background: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
    transform: none;
}

.passenger-modal .quantity-wrap input {
    width: 40px;
    height: 32px;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

.passenger-modal .alert {
    margin-bottom: 12px;
    padding: 8px 12px;
    font-size: 12px;
    border-radius: 6px;
}

/* Arama butonu */
.search-button {
    width: 100%;
    height: 52px;
    background: linear-gradient(135deg, #4D73FC, #6366F1);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(77, 115, 252, 0.3);
    flex-shrink: 0;
}

.search-button:hover {
    background: linear-gradient(135deg, #3d5fd8, #5b5bd6);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(77, 115, 252, 0.4);
}

.search-button svg {
    width: 16px;
    height: 16px;
}

/* Checkbox alanı - Alt satır */


.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #1e293b;
    cursor: pointer;
    user-select: none;
    font-weight: 500;
    padding: 12px 20px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.checkbox-label:hover {
    background: rgba(77, 115, 252, 0.05);
    border-color: #4D73FC;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e1;
    border-radius: 4px;
    background: white;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: linear-gradient(135deg, #4D73FC, #6366F1);
    border-color: #4D73FC;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label:hover .checkmark {
    border-color: #4D73FC;
}

/* Trip input gizleme */
.trip-input input:disabled {
    background: rgba(248, 250, 252, 0.8);
    color: #94a3b8;
    cursor: not-allowed;
    border-color: #e2e8f0;
}

.trip-input input:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Passenger warning */
.passenger-warning {
    font-size: 14px;
    margin-bottom: 15px;
    padding: 12px 16px;
    border-radius: 12px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 1px solid #f59e0b;
    color: #92400e;
    font-weight: 500;
}

/* Autocomplete stilleri */
.ui-autocomplete {
    max-height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 99999 !important;
    position: absolute !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.ui-autocomplete .ui-menu-item {
    padding: 10px 15px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: background-color 0.2s ease;
}

.ui-autocomplete .ui-menu-item:last-child {
    border-bottom: none;
}

.ui-autocomplete .ui-menu-item:hover,
.ui-autocomplete .ui-menu-item.ui-state-focus {
    background-color: #4D73FC;
    color: white;
}

.ui-autocomplete .ui-menu-item div {
    padding: 0px 10px;
}

/* Autocomplete'in gizlenmesi için */
.ui-autocomplete.ui-widget.ui-widget-content {
    display: none !important;
}

/* Autocomplete'in görünür olması için */
.ui-autocomplete.ui-widget.ui-widget-content.ui-corner-all {
    display: block !important;
}

/* Basit autocomplete stilleri */
.simple-autocomplete {
    position: absolute !important;
    z-index: 999999 !important;
    background: white !important;
    border: 2px solid #4D73FC !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    max-height: 200px !important;
    overflow-y: auto !important;
    min-width: 200px !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.simple-autocomplete .autocomplete-option {
    padding: 10px 15px !important;
    cursor: pointer !important;
    border-bottom: 1px solid #f0f0f0 !important;
    transition: all 0.2s ease !important;
}

.simple-autocomplete .autocomplete-option:hover {
    background-color: #4D73FC !important;
    color: white !important;
}

/* Checkbox alanı */
.checkbox-field {
    position: absolute;
    bottom: -40px;
    right: 0;
}

.checkbox-label:hover {
    background: rgba(77, 115, 252, 0.05);
    border-color: #4D73FC;
    transform: translateX(4px);
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    background: white;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: linear-gradient(135deg, #4D73FC, #6366F1);
    border-color: #4D73FC;
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(77, 115, 252, 0.3);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    animation: checkmark 0.3s ease;
}

@keyframes checkmark {
    0% {
        opacity: 0;
        transform: rotate(45deg) scale(0);
    }
    100% {
        opacity: 1;
        transform: rotate(45deg) scale(1);
    }
}

.checkbox-label:hover .checkmark {
    border-color: #4D73FC;
    transform: scale(1.05);
}

/* Modern loading states and micro-interactions */
.search-input:focus + .field-label::before {
    background: linear-gradient(135deg, #4D73FC, #6366F1);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Enhanced autocomplete styling */
.simple-autocomplete {
    border-radius: 16px !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(77, 115, 252, 0.2) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15), 0 8px 16px rgba(0, 0, 0, 0.08) !important;
}

.simple-autocomplete .autocomplete-option {
    border-radius: 8px !important;
    margin: 4px !important;
    transition: all 0.2s ease !important;
}

.simple-autocomplete .autocomplete-option:hover {
    background: linear-gradient(135deg, #4D73FC, #6366F1) !important;
    color: white !important;
    transform: translateX(4px) !important;
    box-shadow: 0 4px 12px rgba(77, 115, 252, 0.3) !important;
}

/* Floating label effect */
.search-field {
    position: relative;
}

.search-field:focus-within .field-label {
    color: #4D73FC;
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

/* Subtle hover effects for better UX */
.search-field:hover .field-label::before {
    background: linear-gradient(135deg, #4D73FC, #6366F1);
    transition: all 0.3s ease;
}

/* Enhanced passenger modal styling */
.passenger-modal .passenger-box {
    background: rgba(248, 250, 252, 0.8);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.passenger-modal .passenger-box:hover {
    background: rgba(77, 115, 252, 0.05);
    border-color: #4D73FC;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(77, 115, 252, 0.15);
}

/* Modern quantity controls */
.quantity-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    border-radius: 12px;
    padding: 4px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.quantity-wrap button {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #4D73FC, #6366F1);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-wrap button:hover {
    background: linear-gradient(135deg, #3d5fd8, #5b5bd6);
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(77, 115, 252, 0.3);
}

.quantity-wrap button:disabled {
    background: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.quantity-wrap input {
    width: 40px;
    text-align: center;
    border: none;
    background: transparent;
    font-weight: 600;
    color: #1e293b;
}

/* Responsive tasarım */

@media (min-width: 1025px) and (max-width: 1600px) {
    .checkbox-field {
        bottom: -30px;
    }
}

@media (max-width: 1200px) {
    .flight-search-container {
        gap: 20px;
        padding: 24px;
    }

    .input-row {
        gap: 8px;
    }

    .search-field {
        min-width: 120px;
        max-width: 180px;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .flight-search-container {
        gap: 16px;
        padding: 20px;
    }

    .input-row {
        gap: 6px;
        flex-wrap: wrap;
    }

    .search-field {
        min-width: 120px;
        max-width: 160px;
    }

    .search-button {
        min-width: 140px;
    }
}

@media (max-width: 768px) {
    .flight-search-container {
        gap: 16px;
        padding: 20px;
        margin-top: 20px;
    }

    /* Trip type butonları mobilde kare alanın içinde */
    .trip-type-selection {
        margin-bottom: 20px;
        width: 100%;
        justify-content: center;
        bottom: inherit;
        top: 0;
        left: 0;
    }

    .trip-type-button {
        flex: 1;
        min-width: 120px;
        padding: 14px 20px;
        font-size: 14px;
    }

    .input-row {
        flex-direction: column;
        gap: 16px;
    }

    .search-field {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
    }

    /* Mobil için özel düzenleme - Tarih, Yolcu ve Arama butonu yan yana */
    .mobile-bottom-row {
        display: none; /* Masaüstünde gizli */
    }

    .swap-button {
        position: absolute;
        top: -20px;
        left: 50%;
        transform: translateX(-50%) rotate(90deg);
        width: 36px;
        height: 36px;
        border-radius: 10px;
        z-index: 10;
        background: linear-gradient(135deg, #4D73FC, #6366F1);
        border: 2px solid white;
        box-shadow: 0 4px 12px rgba(77, 115, 252, 0.3);
    }
    
    .swap-button:hover {
        background: linear-gradient(135deg, #3d5fd8, #5b5bd6);
        transform: translateX(-50%) rotate(90deg) scale(1.1);
        box-shadow: 0 6px 16px rgba(77, 115, 252, 0.4);
    }
    
    /* Varış input'unun üstüne swap button'ı konumlandır */
    .search-field:nth-of-type(3) {
        position: relative;
    }
    
    /* Yolcu seçimi mobil optimizasyonu */
    .passenger-trigger {
        height: 48px;
        padding: 12px 16px;
        font-size: 14px;
    }

    .passenger-modal {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        max-width: none !important;
        min-width: none !important;
        z-index: 10000 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        background: rgba(0, 0, 0, 0.5) !important;
        display: none !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .passenger-modal.show {
        display: flex !important;
    }

    .passenger-modal .modal-content {
        background: white !important;
        border-radius: 16px !important;
        padding: 20px !important;
        width: 100% !important;
        max-width: 400px !important;
        max-height: 80vh !important;
        overflow-y: auto !important;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3) !important;
        margin: 20px !important;
    }

    .passenger-header {
        margin-bottom: 20px !important;
        text-align: center !important;
    }

    .passenger-header h4 {
        font-size: 18px !important;
        font-weight: 600 !important;
        color: #1e293b !important;
        margin: 0 !important;
    }

    .passenger-warning {
        margin-bottom: 15px !important;
        padding: 10px 12px !important;
        font-size: 13px !important;
        border-radius: 8px !important;
    }

    .passenger-box {
        background: #f8fafc !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 12px !important;
        padding: 16px !important;
        margin-bottom: 12px !important;
    }

    .passenger-box .row {
        margin: 0 !important;
        align-items: center !important;
    }

    .passenger-box .col-md-7,
    .passenger-box .col-sm-6,
    .passenger-box .col-6 {
        padding: 0 !important;
        flex: 1 !important;
    }

    .passenger-box .content-box h5 {
        font-size: 16px !important;
        font-weight: 600 !important;
        color: #1e293b !important;
        margin: 0 0 4px 0 !important;
    }

    .passenger-box .content-box p {
        font-size: 13px !important;
        color: #64748b !important;
        margin: 0 !important;
    }

    .quantity-wrap {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        background: white !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 8px !important;
        padding: 4px !important;
    }

    .quantity-wrap button {
        width: 40px !important;
        height: 40px !important;
        border: none !important;
        border-radius: 6px !important;
        background: linear-gradient(135deg, #4D73FC, #6366F1) !important;
        color: white !important;
        font-size: 18px !important;
        font-weight: 600 !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .quantity-wrap button:hover {
        background: linear-gradient(135deg, #3d5fd8, #5b5bd6) !important;
        transform: scale(1.05) !important;
    }

    .quantity-wrap button:disabled {
        background: #e2e8f0 !important;
        color: #94a3b8 !important;
        cursor: not-allowed !important;
        transform: none !important;
    }

    .quantity-wrap input {
        width: 60px !important;
        height: 40px !important;
        border: none !important;
        background: transparent !important;
        text-align: center !important;
        font-size: 16px !important;
        font-weight: 600 !important;
        color: #1e293b !important;
    }

    .passenger-modal .alert {
        margin-bottom: 15px !important;
        padding: 10px 12px !important;
        font-size: 13px !important;
        border-radius: 8px !important;
    }
    .input-row{
        margin-top: 70px;
    }
}

@media (max-width: 480px) {
    .goDateInput{
        width: 50%;
    }
    .tripDateInput{
        width: 50%;
    }
    
    .flight-search-container {
        padding: 16px;
        margin-top: 15px;
    }

    .trip-type-selection {
        margin-bottom: 15px;
        bottom: inherit;
        top: 0;
        left: 0;

    }

    .trip-type-button {
        padding: 12px 16px;
        font-size: 13px;
        min-width: 100px;
    }

    .search-input,
    .passenger-trigger {
        height: 48px;
        font-size: 14px;
        padding: 12px 16px;
    }
    
    .search-button {
        height: 48px;
        font-size: 14px;
    }
    
    .swap-button {
        width: 32px;
        height: 32px;
        top: -16px;
    }
    
    .field-label {
        font-size: 11px;
    }
    
    .checkbox-label {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    /* Mobil alt satır küçük ekranlar için */
    .mobile-bottom-row {
        display: flex !important;
        flex-direction: column;
        gap: 8px;
    }

    .mobile-bottom-row .search-field {
        width: 100%;
    }

    /* Yolcu modal küçük ekranlar için */
    .passenger-modal {
        padding: 0 !important;
        margin: 0 !important;
    }

    .passenger-modal .modal-content {
        width: 95% !important;
        max-width: 350px !important;
        min-width: 280px !important;
        padding: 16px !important;
        margin: 10px !important;
    }

    .passenger-box {
        padding: 8px !important;
        margin-bottom: 6px !important;
    }

    .quantity-wrap button {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .quantity-wrap input {
        width: 45px;
        font-size: 14px;
    }
}
