﻿.flight-search-container {
    background: white;
    border-radius: 12px;
    padding: 0;
    margin: 20px;
}

.journey-type-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 20px;
}

.journey-type-group {
    display: flex;
    align-items: baseline;
    gap: 32px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: black;
}

    .radio-option input[type="radio"] {
        width: 20px;
        height: 20px;
        cursor: pointer;
        margin: 0;
    }

    .radio-option input[type="checkbox"] {
        width: 18px;
        height: 18px;
        cursor: pointer;
        margin: 0;
    }

    .radio-option label {
        cursor: pointer;
        margin: 0;
        font-weight: 400;
        line-height: 1;
    }

.search-inputs-row {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.input-wrapper {
    position: relative;
    width: 100%;
    height: 64px;
}

.input-label {
    position: absolute;
    top: 8px;
    left: 16px;
    font-size: 11px;
    color: #6b7280;
    font-weight: 500;
    pointer-events: none;
    z-index: 1;
    line-height: 1;
    display: flex;
    align-items: center;
    gap: 4px;
}

    .input-label i {
        font-size: 14px;
        color: #6b7280;
    }

.input-wrapper:has(.form-control:focus) .input-label:not(.location-placeholder),
.input-wrapper:has(.form-control:not(:placeholder-shown)) .input-label:not(.location-placeholder) {
    color: black;
    font-weight: bold !important;
}

    .input-wrapper:has(.form-control:focus) .input-label:not(.location-placeholder) i,
    .input-wrapper:has(.form-control:not(:placeholder-shown)) .input-label:not(.location-placeholder) i {
        color: black;
        font-weight: bold !important;
    }

.location-placeholder {
    position: absolute;
    left: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    z-index: 1;
    transition: top 0.2s ease, font-size 0.2s ease, color 0.2s ease, font-weight 0.2s ease, transform 0.2s ease;
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    color: #9ca3af;
    font-weight: 400;
}

    .location-placeholder i {
        font-size: 16px;
        color: inherit;
        transition: font-size 0.2s ease;
    }

.input-wrapper:has(#fromLocation:focus) .location-placeholder,
.input-wrapper:has(#fromLocation:not(:placeholder-shown)) .location-placeholder,
.input-wrapper:has(#toLocation:focus) .location-placeholder,
.input-wrapper:has(#toLocation:not(:placeholder-shown)) .location-placeholder {
    top: 8px;
    font-size: 11px;
    color: black;
    font-weight: 600;
}

    .input-wrapper:has(#fromLocation:focus) .location-placeholder i,
    .input-wrapper:has(#fromLocation:not(:placeholder-shown)) .location-placeholder i,
    .input-wrapper:has(#toLocation:focus) .location-placeholder i,
    .input-wrapper:has(#toLocation:not(:placeholder-shown)) .location-placeholder i {
        font-size: 14px;
    }

.input-wrapper:has(#fromLocation:focus) .location-placeholder,
.input-wrapper:has(#fromLocation:not(:placeholder-shown)) .location-placeholder,
.input-wrapper:has(#toLocation:focus) .location-placeholder,
.input-wrapper:has(#toLocation:not(:placeholder-shown)) .location-placeholder {
    top: 1px;
    font-size: 11px;
    color: black;
    font-weight: 600;
    transform: translateY(0);
}

.form-control {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #f9fafb;
    height: 64px;
    width: 100%;
    box-sizing: border-box;
    line-height: normal;
}

    .form-control:focus {
        outline: none;
        border-color: black;
        background: white;
    }

    .form-control::placeholder {
        color: transparent;
    }

input[type="text"].form-control {
    padding: 20px 16px 0 16px;
    display: block;
    line-height: 44px;
}

input#fromLocation.form-control,
input#toLocation.form-control {
    padding: 24px 16px 8px 16px;
    line-height: normal;
}

.location-group {
    display: flex;
    align-items: center;
    gap: 0;
    position: relative;
}

.location-wrapper {
    width: 220px;
}

    .location-wrapper:first-child input#fromLocation.form-control {
        padding-right: 24px;
    }

    .location-wrapper:last-child input#toLocation.form-control {
        padding-left: 24px;
    }

.date-wrapper {
    position: relative;
    width: 160px;
}

    .date-wrapper .form-control {
        padding-right: 40px !important;
    }

.passenger-wrapper {
    width: 200px;
}

form input[type="text"] {
    height: 65px !important;
}

.swap-button {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin: 0 -10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 2;
    flex-shrink: 0;
    position: relative;
    align-self: center;
}

    .swap-button:hover {
        background: #f9fafb;
    }

.calendar-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 18px;
    pointer-events: none;
}

.add-return-btn {
    background: #f3f4f6;
    border: 2px dashed #e5e7eb;
    color: #6b7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 500;
    padding: 12px 16px;
    height: 64px;
    box-sizing: border-box;
    width: 100%;
}

    .add-return-btn:hover {
        background: #e5e7eb;
        border-color: #d1d5db;
    }

.passenger-input.form-control {
    background: #f9fafb;
    cursor: pointer;
}

.search-button {
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 64px;
    box-sizing: border-box;
}


.direct-option {
    margin-right: 168px;
}

/* Media Query for screens below 1400px */
@media (max-width: 1399px) {
    .direct-option {
        margin-right: 123px !important;
    }

    .location-wrapper {
        width: 200px;
    }

    .date-wrapper {
        width: 150px;
    }

    .passenger-wrapper {
        width: 180px;
    }
}

/* Media Query for screens below 1200px */
@media (max-width: 1199px) {
    .journey-type-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .direct-option {
        margin-right: 0;
    }

    .search-inputs-row {
        flex-direction: column;
        gap: 15px;
    }

    .location-group {
        width: 100%;
        order: 1;
    }

    .location-wrapper {
        width: calc(50% - 16px);
    }

    .date-wrapper {
        width: 100%;
        order: 2;
    }

    .passenger-wrapper {
        width: 100%;
        order: 3;
    }

    .search-button {
        width: 100%;
        order: 4;
        margin-top: 10px;
    }

    #myTabContent {
        /*margin-bottom: -250px !important;*/
    }
}



/* Media Query for tablets and smaller screens (768px and below) */
@media (max-width: 767px) {
    .flight-search-container {
        margin: 10px;
        padding: 20px;
        border-radius: 8px;
    }

    #myTabContent {
        /*margin-bottom: -100px !important;*/
    }

    .journey-type-group {
        gap: 20px;
        flex-wrap: wrap;
    }

    .radio-option {
        font-size: 14px;
    }

    .location-group {
        flex-direction: column;
        gap: 15px;
    }

    .location-wrapper {
        width: 100%;
    }

    .swap-button {
        align-self: center;
        margin: -10px 0;
        order: 2;
    }

    .location-wrapper:first-child {
        order: 1;
    }

    .location-wrapper:last-child {
        order: 3;
    }

    .location-wrapper input {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    .input-wrapper {
        height: 56px;
    }

    .form-control {
        height: 56px;
        font-size: 14px;
    }

    form input[type="text"] {
        height: 56px !important;
    }

    .add-return-btn {
        height: 56px;
        font-size: 14px;
    }

    .search-button {
        height: 56px;
        font-size: 15px;
        padding: 12px 24px;
    }

    .input-label {
        font-size: 10px;
        top: 6px;
    }

    .location-placeholder {
        top: 20px;
        font-size: 14px;
    }

    .input-wrapper:has(#fromLocation:focus) .location-placeholder,
    .input-wrapper:has(#fromLocation:not(:placeholder-shown)) .location-placeholder,
    .input-wrapper:has(#toLocation:focus) .location-placeholder,
    .input-wrapper:has(#toLocation:not(:placeholder-shown)) .location-placeholder {
        top: 6px;
        font-size: 10px;
    }
}

/* Media Query for mobile phones (480px and below) */
@media (max-width: 480px) {
    .flight-search-container {
        margin: 5px;
        padding: 15px;
    }

    .journey-type-group {
        gap: 15px;
    }

    .radio-option {
        font-size: 13px;
    }

        .radio-option input[type="radio"] {
            width: 18px;
            height: 18px;
        }

        .radio-option input[type="checkbox"] {
            width: 16px;
            height: 16px;
        }

    .search-inputs-row {
        gap: 12px;
    }

    .input-wrapper {
        height: 52px;
    }

    .form-control {
        height: 52px;
        font-size: 13px;
        padding: 16px 14px 0 14px;
    }

    input#fromLocation.form-control,
    input#toLocation.form-control {
        padding: 20px 14px 6px 14px;
    }

    form input[type="text"] {
        height: 52px !important;
    }

    .add-return-btn {
        height: 52px;
        font-size: 13px;
        padding: 10px 14px;
    }

    .search-button {
        height: 52px;
        font-size: 14px;
        padding: 10px 20px;
    }

    .swap-button {
        width: 28px;
        height: 28px;
        min-width: 28px;
        min-height: 28px;
    }

    .input-label {
        font-size: 9px;
        top: 5px;
        left: 14px;
    }

    .location-placeholder {
        top: 18px;
        font-size: 13px;
        left: 14px;
    }

    .input-wrapper:has(#fromLocation:focus) .location-placeholder,
    .input-wrapper:has(#fromLocation:not(:placeholder-shown)) .location-placeholder,
    .input-wrapper:has(#toLocation:focus) .location-placeholder,
    .input-wrapper:has(#toLocation:not(:placeholder-shown)) .location-placeholder {
        top: 5px;
        font-size: 9px;
    }

    .calendar-icon {
        right: 14px;
        font-size: 16px;
    }
}