.safa-fs,
.safa-fs * {
    box-sizing: border-box;
}

.safa-fs {
    --safa-navy: #0a335b;
    --safa-yellow: #fcd116;
    --safa-red: #ef2b2d;
    --safa-white: #ffffff;
    --safa-ink: #0b1e3f;
    position: relative;
    z-index: 8;
    isolation: isolate;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 27px 28px 25px;
    color: var(--safa-ink);
    background: var(--safa-yellow);
    border: 0;
    border-radius: 24px;
    box-shadow: 0 14px 34px rgba(10, 51, 91, .12);
    font-family: Inter, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.4;
    text-align: left;
}

.safa-fs__form {
    width: 100%;
    margin: 0;
    padding: 0;
}

.safa-fs__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 15px;
}

.safa-fs__heading {
    min-width: 0;
}

.safa-fs__heading h2 {
    margin: 0;
    color: var(--safa-navy);
    font-family: Inter, Arial, sans-serif;
    font-size: clamp(22px, 1.8vw, 26px);
    font-weight: 800;
    letter-spacing: -.025em;
    line-height: 1.15;
}

.safa-fs__trip {
    display: flex;
    flex: 0 0 auto;
    gap: 3px;
    padding: 3px;
    background: rgba(255, 255, 255, .66);
    border: 1px solid rgba(10, 51, 91, .12);
    border-radius: 999px;
}

.safa-fs__trip label {
    position: relative;
    margin: 0;
    cursor: pointer;
}

.safa-fs__trip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.safa-fs__trip span {
    display: block;
    padding: 7px 13px;
    color: var(--safa-navy);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.2;
    transition: color .18s ease, background-color .18s ease;
}

.safa-fs__trip input:checked + span {
    color: var(--safa-white);
    background: var(--safa-navy);
}

.safa-fs__trip input:focus-visible + span {
    outline: 3px solid rgba(10, 51, 91, .25);
    outline-offset: 2px;
}

.safa-fs__grid {
    display: grid;
    grid-template-columns:
        minmax(330px, 2.25fr)
        minmax(122px, .72fr)
        minmax(122px, .72fr)
        minmax(220px, 1.22fr)
        minmax(150px, .82fr);
    align-items: stretch;
    gap: 1px;
    padding: 3px;
    background: rgba(10, 51, 91, .12);
    border: 1px solid rgba(10, 51, 91, .11);
    border-radius: 18px;
    box-shadow: 0 10px 26px rgba(10, 51, 91, .1);
    transition:
        grid-template-columns .24s cubic-bezier(.4, 0, .2, 1),
        opacity .16s ease,
        transform .16s ease;
}

.safa-fs.is-changing-trip .safa-fs__grid {
    opacity: .58;
    transform: translateY(2px);
}

.safa-fs.is-oneway .safa-fs__grid {
    grid-template-columns:
        minmax(380px, 2.7fr)
        minmax(145px, .78fr)
        minmax(250px, 1.4fr)
        minmax(160px, .86fr);
}

.safa-fs__route {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-width: 0;
    background: var(--safa-white);
    border-radius: 14px 3px 3px 14px;
}

.safa-fs__field,
.safa-fs__travellers {
    position: relative;
    min-width: 0;
    min-height: 74px;
    margin: 0;
    padding: 10px 13px;
    background: var(--safa-white);
}

.safa-fs__field {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
}

.safa-fs__field--route + .safa-fs__field--route {
    padding-left: 27px;
    border-left: 1px solid rgba(10, 51, 91, .12);
}

.safa-fs__field--route:first-child {
    border-radius: 14px 0 0 14px;
}

.safa-fs__field--route:last-child {
    border-radius: 0 3px 3px 0;
}

.safa-fs__field > label:first-child,
.safa-fs__date-field > span:first-child,
.safa-fs__group-label {
    display: block;
    margin: 0;
    color: rgba(10, 51, 91, .7);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .01em;
    line-height: 1.2;
}

.safa-fs__field input:not([type="date"]) {
    width: 100%;
    height: 24px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    color: var(--safa-ink);
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    -webkit-appearance: none;
    appearance: none;
    font: inherit;
    font-size: 14px;
    font-weight: 750;
    outline: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.safa-fs__field input::placeholder {
    color: rgba(11, 30, 63, .54);
    opacity: 1;
}

.safa-fs__airport-meta {
    display: block;
    overflow: hidden;
    color: rgba(10, 51, 91, .58);
    font-size: 10px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.safa-fs__suggestions {
    position: absolute;
    z-index: 30;
    top: calc(100% + 9px);
    left: 0;
    width: min(370px, 82vw);
    max-height: 330px;
    overflow-y: auto;
    padding: 6px;
    background: var(--safa-white);
    border: 1px solid rgba(10, 51, 91, .12);
    border-radius: 15px;
    box-shadow: 0 18px 45px rgba(10, 51, 91, .2);
}

.safa-fs__field--route:last-child .safa-fs__suggestions {
    right: 0;
    left: auto;
}

.safa-fs__suggestions button {
    display: grid;
    grid-template-columns: 45px 1fr;
    align-items: center;
    width: 100%;
    min-height: 50px;
    margin: 0;
    padding: 7px 9px;
    color: var(--safa-ink);
    background: transparent;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    text-align: left;
}

.safa-fs__suggestions button:hover,
.safa-fs__suggestions button.is-active {
    color: var(--safa-ink);
    background: rgba(10, 51, 91, .075);
}

.safa-fs__suggestions button > strong {
    color: var(--safa-navy);
    font-size: 12px;
    font-weight: 850;
}

.safa-fs__suggestions button > span {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.safa-fs__suggestions b,
.safa-fs__suggestions small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.safa-fs__suggestions b {
    color: var(--safa-ink);
    font-size: 13px;
    font-weight: 750;
}

.safa-fs__suggestions small {
    color: rgba(10, 51, 91, .62);
    font-size: 10px;
}

.safa-fs__suggestion-empty {
    margin: 0;
    padding: 13px 11px;
    color: rgba(10, 51, 91, .72);
    font-size: 12px;
    font-weight: 650;
}

.safa-fs__date-field {
    cursor: pointer;
    outline: none;
}

.safa-fs__date-field:focus-visible {
    box-shadow: inset 0 0 0 3px rgba(10, 51, 91, .2);
}

.safa-fs__date-display {
    overflow: hidden;
    color: rgba(11, 30, 63, .58);
    font-size: 13px;
    font-weight: 750;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.safa-fs__date-display.has-value {
    color: var(--safa-ink);
}

.safa-fs__date-field input[type="date"] {
    position: absolute;
    z-index: 3;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    cursor: pointer;
    opacity: 0;
}

.safa-fs__travellers {
    padding: 9px 10px 8px;
}

.safa-fs__group-label {
    display: block;
    margin-bottom: 5px;
}

.safa-fs__traveller-controls {
    display: grid;
    grid-template-columns: .56fr .56fr 1.35fr;
    gap: 5px;
}

.safa-fs__traveller-controls label {
    display: flex;
    min-width: 0;
    margin: 0;
    flex-direction: column;
}

.safa-fs__traveller-controls label > span {
    display: none;
}

.safa-fs__traveller-controls select {
    width: 100%;
    height: 30px;
    margin: 0;
    padding: 0 4px;
    color: var(--safa-ink);
    background: rgba(10, 51, 91, .055);
    border: 0;
    border-radius: 7px;
    box-shadow: none;
    appearance: auto;
    font: inherit;
    font-size: 11px;
    font-weight: 750;
}

.safa-fs__submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 74px;
    min-width: 0;
    margin: 0;
    padding: 0 16px;
    color: var(--safa-white);
    background: var(--safa-navy);
    border: 0;
    border-radius: 3px 16px 16px 3px !important;
    overflow: hidden;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
    transition: transform .18s ease, background-color .18s ease;
}

.safa-fs__submit::before,
.safa-fs__submit::after {
    display: none !important;
    content: none !important;
}

.safa-fs__submit:hover,
.safa-fs__submit:focus-visible {
    color: var(--safa-white);
    background: #082b4d;
    transform: translateY(-1px);
}

.safa-fs__children-ages {
    margin-top: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, .6);
    border-radius: 12px;
}

.safa-fs__children-ages p {
    margin: 0 0 8px;
    color: var(--safa-navy);
    font-size: 12px;
    font-weight: 800;
}

.safa-fs__age-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.safa-fs__age-grid label {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    font-size: 12px;
    font-weight: 700;
}

.safa-fs__age-grid select {
    height: 36px;
    padding: 0 9px;
    background: var(--safa-white);
    border: 1px solid rgba(10, 51, 91, .18);
    border-radius: 8px;
}

.safa-fs__message {
    display: none;
    margin: 11px 0 0;
    padding: 9px 11px;
    color: #8a1b1d;
    background: rgba(255, 255, 255, .75);
    border-left: 4px solid var(--safa-red);
    border-radius: 7px;
    font-size: 12px;
    font-weight: 700;
}

.safa-fs__message.is-visible {
    display: block;
}

.safa-fs__notice {
    margin: 8px 2px 0;
    color: rgba(11, 30, 63, .7);
    font-size: 10px;
    line-height: 1.4;
}

.safa-fs.is-oneway .safa-fs__return-field {
    display: none;
}

@media (max-width: 1180px) {
    .safa-fs {
        padding: 24px;
    }

    .safa-fs__grid,
    .safa-fs.is-oneway .safa-fs__grid {
        grid-template-columns: 1.55fr 1fr 1fr;
        gap: 3px;
    }

    .safa-fs__route {
        grid-column: span 2;
    }

    .safa-fs__travellers {
        grid-column: span 2;
        border-radius: 3px 3px 3px 14px;
    }

    .safa-fs__submit {
        border-radius: 3px 3px 14px 3px;
    }

    .safa-fs.is-oneway .safa-fs__route {
        grid-column: span 2;
    }

    .safa-fs.is-oneway .safa-fs__travellers {
        grid-column: auto;
        border-radius: 3px;
    }
}

@media (max-width: 720px) {
    .safa-fs {
        margin: 0;
        padding: 17px 12px;
        border-radius: 18px;
    }

    .safa-fs__top {
        display: block;
    }

    .safa-fs__heading {
        margin-bottom: 12px;
    }

    .safa-fs__heading h2 {
        font-size: 21px;
    }

    .safa-fs__trip {
        width: max-content;
    }

    .safa-fs__grid,
    .safa-fs.is-oneway .safa-fs__grid {
        grid-template-columns: 1fr;
        gap: 3px;
        padding: 3px;
        border-radius: 15px;
    }

    .safa-fs__route,
    .safa-fs__field,
    .safa-fs__travellers,
    .safa-fs__submit,
    .safa-fs.is-oneway .safa-fs__route,
    .safa-fs.is-oneway .safa-fs__travellers {
        grid-column: 1;
    }

    .safa-fs__route {
        grid-template-columns: 1fr;
        border-radius: 12px 12px 3px 3px;
    }

    .safa-fs__field--route:first-child {
        border-radius: 12px 12px 0 0;
    }

    .safa-fs__field--route:last-child {
        border-radius: 0;
    }

    .safa-fs__field--route + .safa-fs__field--route {
        padding-left: 13px;
        border-top: 1px solid rgba(10, 51, 91, .12);
        border-left: 0;
    }

    .safa-fs__field,
    .safa-fs__travellers {
        min-height: 61px;
    }

    .safa-fs__suggestions,
    .safa-fs__field--route:last-child .safa-fs__suggestions {
        right: 0;
        left: 0;
        width: 100%;
    }

    .safa-fs__travellers {
        border-radius: 3px;
    }

    .safa-fs__submit {
        min-height: 53px;
        border-radius: 3px 3px 12px 12px;
    }

    .safa-fs__notice {
        font-size: 9px;
    }
}
