.afs-page {
    position: relative;
    left: 50%;
    width: min(1500px, calc(100vw - 24px));
    min-height: 0;
    margin: 0;
    padding: clamp(12px, 2vw, 32px) 0;
    transform: translateX(-50%);
}

.afs-widget {
    --afs-accent: #f5a623;
    --afs-accent-light: #ffc044;
    --afs-border: #3a404a;
    --afs-field-bg: #232831;
    --afs-field-hover: #292f38;
    --afs-panel-bg: #1e2229;
    --afs-text: #f4f5f7;
    --afs-muted: #aeb5c0;

    width: 100%;
    color: var(--afs-text);
    color-scheme: dark;
    font-family: inherit;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    background: linear-gradient(
            145deg,
            rgba(18, 21, 27, 0.96),
            rgba(28, 32, 39, 0.96)
    );
    box-shadow:
            0 28px 70px rgba(0, 0, 0, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(14px);
}

.afs-widget,
.afs-widget * {
    box-sizing: border-box;
}

.afs-widget button,
.afs-widget input,
.afs-widget select {
    font: inherit;
}

.afs-widget__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 24px 28px 0;
}

.afs-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #f7f8fa;
    font-size: 18px;
    font-weight: 850;
}

.afs-brand__icon {
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    color: var(--afs-accent);
    border-radius: 14px;
    background: rgba(245, 166, 35, 0.14);
}

.afs-brand__icon svg {
    display: block;
    width: 28px;
    height: 28px;
}

.elementor.elementor-3121 {
    position: absolute;
    top: 8.8%;
    left: 50%;
    z-index: 99;

    width: min(1600px, calc(100% - 40px));

    display: flex;
    align-items: center;
    justify-content: center;

    transform: translateX(-50%) scale(0.8);
    transform-origin: top center;

    pointer-events: none;
}

.afs-trip {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-width: min(100%, 310px);
    padding: 4px;
    border: 1px solid var(--afs-border);
    border-radius: 13px;
    background: #15181e;
}

.afs-trip input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.afs-trip label {
    padding: 10px 14px;
    color: #989faa;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 750;
    text-align: center;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.afs-trip input:checked + label {
    color: #ffc052;
    background: #292e36;
    box-shadow: 0 5px 16px rgba(0, 0, 0, 0.25);
}

.afs-trip input:focus-visible + label {
    outline: 2px solid var(--afs-accent);
    outline-offset: 2px;
}

.afs-form {
    padding: 24px 28px 28px;
}

.afs-grid {
    display: grid;
    grid-template-columns: repeat(14, minmax(0, 1fr));
    gap: 14px;
}

.afs-route {
    display: grid;
    grid-column: span 6;
    grid-template-columns: minmax(0, 1fr) 46px minmax(0, 1fr);
    align-items: end;
    gap: 10px;
    min-width: 0;
}

.afs-field {
    position: relative;
    min-width: 0;
}

.afs-field--date {
    grid-column: span 3;
}

.afs-field--select {
    grid-column: span 2;
}

.afs-label {
    display: block;
    margin: 0 0 7px 3px;
    color: var(--afs-muted);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0.065em;
    text-transform: uppercase;
}

.afs-widget #afs-form input.afs-control,
.afs-widget #afs-form select.afs-control {
    display: block !important;
    width: 100% !important;
    height: 58px !important;
    min-height: 58px !important;
    margin: 0 !important;
    padding: 0 42px 0 46px !important;
    color: var(--afs-text) !important;
    border: 1px solid var(--afs-border) !important;
    border-radius: 15px !important;
    outline: none !important;
    background-color: var(--afs-field-bg) !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    box-shadow: none !important;
    appearance: auto;
    transition:
            border-color 0.2s ease,
            background-color 0.2s ease,
            box-shadow 0.2s ease;
}

.afs-widget #afs-form input.afs-control::placeholder {
    color: #818a98 !important;
    opacity: 1 !important;
}

.afs-widget #afs-form input.afs-control:hover,
.afs-widget #afs-form select.afs-control:hover {
    border-color: #59616d !important;
    background-color: var(--afs-field-hover) !important;
}

.afs-widget #afs-form input.afs-control:focus,
.afs-widget #afs-form select.afs-control:focus {
    border-color: var(--afs-accent) !important;
    background-color: var(--afs-field-hover) !important;
    box-shadow: 0 0 0 4px rgba(245, 166, 35, 0.14) !important;
}

.afs-widget #afs-form input.afs-control:disabled {
    color: #757d89 !important;
    border-color: #343a43 !important;
    background-color: #1d2128 !important;
    cursor: not-allowed;
}

.afs-widget #afs-form input.afs-control.afs-control--loading {
    background-image: linear-gradient(
            90deg,
            transparent,
            rgba(245, 166, 35, 0.09),
            transparent
    ) !important;
    background-size: 200% 100% !important;
    animation: afs-loading 1s linear infinite;
}

.afs-widget #afs-form input.afs-control.afs-control--invalid {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.14) !important;
}

@keyframes afs-loading {
    from {
        background-position: 200% 0;
    }

    to {
        background-position: -200% 0;
    }
}

.afs-widget #afs-form .afs-field--date input.afs-control {
    padding-right: 10px !important;
    white-space: nowrap;
}

.afs-widget #afs-form .afs-field--select select.afs-control {
    padding-right: 28px !important;
}

.afs-widget #afs-form .afs-field--date input[type="date"] {
    position: relative;
    cursor: pointer;
}

.afs-widget #afs-form .afs-field--date input[type="date"]::-webkit-calendar-picker-indicator {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    margin: 0;
    padding: 0;

    opacity: 0;
    cursor: pointer;
}

.afs-widget #afs-form .afs-field__icon {
    position: absolute !important;
    z-index: 2;
    left: 16px !important;
    bottom: 18px !important;
    width: 21px !important;
    height: 21px !important;
    margin: 0 !important;
    color: #8e9aae;
    pointer-events: none;
}

.afs-field:focus-within .afs-field__icon {
    color: var(--afs-accent) !important;
}

.afs-widget #afs-form button.afs-swap {
    display: grid !important;
    place-items: center !important;
    width: 46px !important;
    min-width: 46px !important;
    max-width: 46px !important;
    height: 46px !important;
    min-height: 46px !important;
    margin: 0 0 6px !important;
    padding: 0 !important;
    color: var(--afs-accent) !important;
    border: 1px solid #404751 !important;
    border-radius: 50% !important;
    background: #252a32 !important;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.3) !important;
    line-height: 1 !important;
    cursor: pointer;
    transition: transform 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.afs-widget #afs-form button.afs-swap:hover {
    color: #17191e !important;
    border-color: var(--afs-accent) !important;
    background: var(--afs-accent) !important;
    transform: rotate(180deg);
}

.afs-widget #afs-form button.afs-swap svg {
    display: block;
    width: 20px !important;
    height: 20px !important;
    margin: 0 !important;
}

.afs-passengers {
    grid-column: span 9;
    min-width: 0;
    padding: 15px 17px 17px;
    color: var(--afs-text);
    border: 1px solid var(--afs-border);
    border-radius: 18px;
    background: var(--afs-panel-bg);
}

.afs-passengers legend {
    padding: 0 7px;
    color: var(--afs-muted);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0.065em;
    text-transform: uppercase;
}

.afs-passengers__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.afs-passenger label {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin: 0 2px 7px;
    font-size: 13px;
    font-weight: 800;
}

.afs-passenger label span {
    color: #f3f4f6;
}

.afs-passenger label small {
    color: #939ba7;
    font-weight: 550;
}

.afs-widget #afs-form .afs-passengers .afs-passenger input[type="number"] {
    display: block !important;
    width: 100% !important;
    height: 52px !important;
    margin: 0 !important;
    padding: 0 15px !important;
    color: #f7f8fa !important;
    -webkit-text-fill-color: #f7f8fa !important;
    border: 1px solid var(--afs-border) !important;
    border-radius: 13px !important;
    outline: none !important;
    background: #282d35 !important;
    font-weight: 700 !important;
    box-shadow: none !important;
}

.afs-widget #afs-form .afs-passengers .afs-passenger input[type="number"]:hover {
    border-color: #59616d !important;
    background: #2d333c !important;
}

.afs-widget #afs-form .afs-passengers .afs-passenger input[type="number"]:focus {
    border-color: var(--afs-accent) !important;
    background: #2d333c !important;
    box-shadow: 0 0 0 4px rgba(245, 166, 35, 0.14) !important;
}

.afs-submit-wrap {
    display: flex;
    grid-column: span 5;
    align-items: stretch;
    min-width: 0;
}

.afs-widget #afs-form button.afs-submit {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 11px;
    width: 100% !important;
    min-height: 112px !important;
    margin: 0 !important;
    padding: 18px 24px !important;
    color: #191b20 !important;
    border: 0 !important;
    border-radius: 18px !important;
    background: linear-gradient(135deg, var(--afs-accent), var(--afs-accent-light)) !important;
    box-shadow: 0 14px 32px rgba(245, 166, 35, 0.2) !important;
    font-size: 16px !important;
    font-weight: 900 !important;
    letter-spacing: 0.01em;
    white-space: nowrap;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.afs-widget #afs-form button.afs-submit:hover {
    background: linear-gradient(135deg, #ffb535, #ffcc64) !important;
    box-shadow: 0 18px 38px rgba(245, 166, 35, 0.28) !important;
    filter: saturate(1.08);
    transform: translateY(-2px);
}

.afs-widget #afs-form button.afs-submit:active {
    transform: translateY(0);
}

.afs-widget #afs-form button.afs-submit svg {
    flex: 0 0 21px;
    width: 21px;
    height: 21px;
}

.afs-error {
    margin: 12px 0 0;
    color: #ff7b72;
    font-size: 13px;
    font-weight: 700;
}

.afs-widget__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 15px 28px;
    color: #aab1bc;
    border-top: 1px solid #343a43;
    border-radius: 0 0 15px 15px;
    background: #191d23;
    font-size: 13px;
}

.afs-benefit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.afs-benefit svg {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    color: var(--afs-accent);
}

.afs-widget #afs-form input[type="date"]:not(:disabled) {
    cursor: pointer;
}

/* Закрываем браузерную маску mm/dd/yyyy у пустого поля обычным слоем.
   Иконка остаётся видимой, а всё поле продолжает открывать календарь. */
.afs-widget #afs-form .afs-field--date.afs-date-empty::after {
    content: "";
    position: absolute;
    z-index: 1;
    right: 2px;
    bottom: 2px;
    left: 42px;
    height: 54px;
    border-radius: 0 13px 13px 0;
    background: var(--afs-field-bg);
    pointer-events: none;
}

.afs-widget #afs-form .afs-field--date.afs-date-empty:hover::after,
.afs-widget #afs-form .afs-field--date.afs-date-empty:focus-within::after {
    background: var(--afs-field-hover);
}

.afs-widget #afs-form .afs-field--date.afs-date-empty.afs-date-disabled::after {
    background: #1d2128;
}

/* jQuery UI добавляет меню городов в body, поэтому эти правила не вложены в .afs-widget. */
.afs-city-menu {
    position: absolute !important;
    z-index: 999999 !important;
    max-height: 300px;
    margin: 8px 0 0 !important;
    padding: 6px !important;
    overflow-x: hidden;
    overflow-y: auto;
    color: #f3f4f6 !important;
    list-style: none !important;
    border: 1px solid #404650 !important;
    border-radius: 14px !important;
    background: #20242b !important;
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.48);
}

.afs-city-menu .ui-menu-item {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    border: 0 !important;
    background: none !important;
}

.afs-city-menu .ui-menu-item::before,
.afs-city-menu .ui-menu-item::after {
    display: none !important;
    content: none !important;
}

.afs-city-menu .ui-menu-item-wrapper {
    display: block !important;
    margin: 0 !important;
    padding: 11px 13px !important;
    color: #e9ebee !important;
    border: 0 !important;
    border-radius: 9px !important;
    background: transparent !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    white-space: normal;
    cursor: pointer;
}

.afs-city-menu .ui-menu-item-wrapper:hover,
.afs-city-menu .ui-menu-item-wrapper.ui-state-active {
    color: #ffc052 !important;
    background: #303640 !important;
}

.afs-city-menu::-webkit-scrollbar {
    width: 7px;
}

.afs-city-menu::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background: #59616d;
}

.afs-city-menu::-webkit-scrollbar-track {
    background: transparent;
}

.ui-helper-hidden-accessible {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@media (max-width: 1280px) {
    .afs-route {
        grid-column: 1 / -1;
    }

    .afs-field--date {
        grid-column: span 5;
    }

    .afs-field--select {
        grid-column: span 4;
    }
}

@media (max-width: 800px) {
    .afs-widget__top {
        align-items: stretch;
        flex-direction: column;
        padding: 20px 18px 0;
    }

    .afs-trip {
        width: 100%;
        min-width: 0;
    }

    .afs-form {
        padding: 20px 18px 22px;
    }

    .afs-field--date {
        grid-column: span 7;
    }

    .afs-field--select,
    .afs-passengers,
    .afs-submit-wrap {
        grid-column: 1 / -1;
    }

    .afs-widget #afs-form button.afs-submit {
        min-height: 64px !important;
    }

    .afs-widget__footer {
        align-items: flex-start;
        flex-direction: column;
        padding: 14px 18px;
    }
}

@media (max-width: 560px) {
    .afs-page {
        width: calc(100vw - 16px);
        padding: 8px 0;
    }

    .afs-grid {
        grid-template-columns: 1fr;
    }

    .afs-route,
    .afs-field--date,
    .afs-field--select,
    .afs-passengers,
    .afs-submit-wrap {
        grid-column: 1;
    }

    .afs-route {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .afs-widget #afs-form button.afs-swap {
        justify-self: end;
        margin: -4px 12px !important;
        transform: rotate(90deg);
    }

    .afs-widget #afs-form button.afs-swap:hover {
        transform: rotate(270deg);
    }

    .afs-passengers__grid {
        grid-template-columns: 1fr;
    }


}

/* Родитель не перекрывает стрелки слайдера */
.elementor.elementor-3121 {
    pointer-events: none;
}

/* Интерактивные элементы формы продолжают работать */
.elementor.elementor-3121 input,
.elementor.elementor-3121 select,
.elementor.elementor-3121 button,
.elementor.elementor-3121 label,
.elementor.elementor-3121 a {
    pointer-events: auto;
}

/* На планшетах убираем форму со слайдера */
@media (max-width: 1024px) {
    .elementor.elementor-3121 {
        position: relative;
        top: 12%;
        left: auto;
        width: calc(100% - 24px);
        margin: 16px auto;

        transform: none;
    }
}

/* Телефоны */
@media (max-width: 560px) {
    .elementor.elementor-3121 {
        width: calc(100% - 16px);
        margin: 8px auto 20px;
    }

}

.afs-widget #afs-form input.afs-control.afs-date-empty {
    color: transparent !important;
    -webkit-text-fill-color: transparent !important;
}

.afs-widget #afs-form .afs-field--date.afs-date-empty::after {
    content: attr(data-date-placeholder);
    position: absolute;
    z-index: 3;
    bottom: 0;
    left: 46px;
    right: 10px;
    height: 58px;

    display: flex;
    align-items: center;

    color: #818a98;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;

    pointer-events: none;
}

.afs-widget #afs-form .afs-field--date.afs-date-empty.afs-date-disabled::after {
    color: #757d89;
}

img.attachment-jetblack-slider.size-jetblack-slider.wp-post-image {
    object-fit: cover;
    max-height: 600px;
    object-position: bottom;
}

#afs-return-field {
    cursor: pointer;
}


.afs-no-return-button {
    display: block;
    width: calc(100% - 16px);
    margin: 8px;
    padding: 10px 12px;

    border: 0;
    border-radius: 6px;

    background: #ffb22b;
    color: #171b22;

    font: inherit;
    font-weight: 700;
    text-align: center;

    cursor: pointer;
    transition:
            background-color 0.2s ease,
            transform 0.1s ease;
}

.afs-no-return-button:hover {
    background: #ffc04d;
}

.afs-no-return-button:active {
    transform: scale(0.98);
}

.flatpickr-calendar .flatpickr-months {
    position: relative;
}



