@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");

@font-face {
    font-family: "Gotham Pro";
    src: url("../fonts/gothampro.ttf");
    src: local("Gotham Pro"), local("Gotham Pro"),
        url("../fonts/gothampro.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
}

:root {
    --color-grey: #f6f6f6;
    --color-grey2: #c4c4c4;
    --color-white: #ffffff;
    --color-red: #e20101;
    --color-violet: #5b41f5;
    --color-violet-hover: #876fff;

    --color-dark-grey: #3e3e3d;
    --color-disabled: #bababa;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

* {
    -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Safari */
    -khtml-user-select: none; /* Konqueror HTML */
    -moz-user-select: none; /* Old versions of Firefox */
    -ms-user-select: none; /* Internet Explorer/Edge */
    user-select: none; /* Non-prefixed version, currently
                                    supported by Chrome, Edge, Opera and Firefox */
}

* {
    /* Синяя подсветка исчезает без следа */
    -webkit-tap-highlight-color: transparent;
}

.visually-hidden:not(:focus):not(:active),
input[type="checkbox"].visually-hidden,
input[type="ratio"].visually-hidden {
    display: none;
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    border: 0;
    padding: 0;
    white-space: nowrap;
    clip-path: insert(100%);
    clip: rect(0 0 0 0);
    overflow: hidden;
}

body {
    background: var(--color-grey);
    min-width: 390px;
}

.main__container {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    max-width: 390px;
    margin: 0 auto;
    padding: 32px 10px;
}

.header__container {
    position: relative;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    padding: 0 15px;
    margin-bottom: 25px;
}

.header__logo {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 68px;
}

.logo {
    width: 100%;
    object-fit: contain;
    object-position: center;
}

.header__title-block {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    margin-left: 16px;
    width: 100%;
    padding-top: 2px;
}

.header__title {
    font-family: Roboto;
    font-size: 33.93px;
    font-weight: 700;
    line-height: 35px;
    letter-spacing: -0.01em;
    text-align: left;
}
.header__subtitle {
    font-family: Roboto;
    font-size: 22.62px;
    font-weight: 400;
    line-height: 29px;
    letter-spacing: -0.01em;
    text-align: left;
}

section {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    border-radius: 10px;
    box-shadow: 0px 0px 5px 0px #0000001a;
    background: var(--color-white);
    padding: 24px 24px 0 24px;
    margin-bottom: 32px;
}

.block__title {
    font-family: Roboto;
    font-size: 20px;
    font-weight: 700;
    line-height: 25.8px;
    letter-spacing: -0.01em;
    text-align: left;
    margin-bottom: 20px;
}

.item__title {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 4px;
    font-family: Roboto;
    font-size: 16px;
    font-weight: 400;
    line-height: 20.64px;
    letter-spacing: -0.01em;
    text-align: left;
    margin-bottom: 16px;
    color: var(--color-dark-grey);
    width: 100%;
}

li::marker {
    font-size: 16px;
    font-family: "Roboto";
    color: var(--color-dark-grey);
}

.item__notice {
    font-family: Roboto;
    font-size: 16px;
    font-style: italic;
    font-weight: 400;
    line-height: 20.64px;
    letter-spacing: -0.01em;
    text-align: left;
    margin-left: 26px;
    margin-bottom: 16px;
    color: var(--color-dark-grey);
}

.first__block .item__notice {
    margin-left: 16px;
}

.input {
    width: 100%;
    height: 45px;
    border-radius: 10px;
    margin-bottom: 24px;
    border: 0.5px solid var(--color-grey2);
    background-color: var(--color-grey);
    padding: 0 16px;
    font-family: Roboto;
    font-size: 18px;
    font-weight: 400;
    line-height: 23.22px;
    letter-spacing: -0.01em;
    text-align: left;
}

.input:disabled {
    border: 0.5px solid var(--color-grey2);
    background-color: var(--color-disabled);
}

.input.error {
    border: 1px solid var(--color-red);
}

.notice__policy {
    font-family: Roboto;
    font-size: 13px;
    font-weight: 400;
    line-height: 16.77px;
    letter-spacing: -0.01em;
    text-align: left;
    color: var(--color-dark-grey);
    margin-top: 48px;
}

.btn-form {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 48px;
    padding: 8px;
    gap: 20px;
    border-radius: 8px;
    background: var(--color-violet);
    border: none;
    margin: 32px 0 0;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    color: var(--color-white);
    font-family: Gotham Pro;
    font-size: 15px;
    font-weight: 500;
    line-height: 14.36px;
    letter-spacing: -0.025em;
}

#shareButton2 {
    margin-bottom: 40px;
}

.btn-form:hover {
    background: var(--color-violet-hover);
}

.btn-form:active {
    background: var(--color-violet-hover);
}

.btn__text {
    color: var(--color-white);
    font-family: Gotham Pro;
    font-size: 15px;
    font-weight: 500;
    line-height: 14.36px;
    letter-spacing: -0.025em;
    text-align: left;
}

.red__notice {
    position: relative;
    display: flex;
    width: 322px;
    font-family: Roboto;
    font-size: 13px;
    font-weight: 400;
    line-height: 16.77px;
    letter-spacing: -0.01em;
    text-align: left;
    color: var(--color-red);
    margin-left: 26px;
    margin-bottom: 16px;
}

.footer__container {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 30px;
    max-width: 390px;
    margin: 0 auto;
}

.refresh__link {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 48px;
    padding: 8px 48px;
    gap: 20px;
    border-radius: 8px;
    background: #f0efef;
    border: none;
    margin: 8px 0 40px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
}

.refresh__link:hover {
    background: #ffffff;
}

.refresh__link:active {
    background: #ffffff;
}

.link-text {
    font-family: Gotham Pro;
    font-size: 15px;
    font-weight: 600;
    line-height: 14.36px;
    letter-spacing: -0.025em;
    text-align: left;
    color: var(--color-violet);
}

.options {
    position: relative;
    display: flex;
    justify-content: flex-start;
    gap: 32px;
    margin-left: 16px;
    margin-bottom: 16px;
}

.options__row {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
}

.options__column {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

.options__item {
    font-family: Roboto;
    font-size: 15px;
    font-weight: 300;
    line-height: 19.35px;
    letter-spacing: -0.01em;
    text-align: left;
}

.options__input {
    display: none;
}

.options__input:checked + .options__label::after {
    transform: scale(1);
}

.options__label {
    position: relative;
    display: inline-flex;
    align-items: center;
    font-family: Roboto;
    font-size: 18px;
    font-weight: 300;
    line-height: 23.22px;
    letter-spacing: -0.01em;
    text-align: left;
    cursor: pointer;
}

.options__label::before {
    content: url(/themes/myvisa/assets/forms/hotel-form-new/img/ion_checkbox_unchecked.svg);
    align-self: flex-start;
    flex: 0 0 23px;
    height: 23px;
    margin: 0 10px 0 0;
}

.options__label::after {
    content: url(/themes/myvisa/assets/forms/hotel-form-new/img/ion_checkbox_checked.svg);
    position: absolute;
    align-self: flex-start;
    flex: 0 0 23px;
    height: 23px;
    margin: 0 10px 0 0;
    transform: scale(0);
}

.options.error .options__label::before {
    content: url(/themes/myvisa/assets/forms/hotel-form-new/img/ion_checkbox_unchecked_error.svg);
}

.options__origin {
    margin-left: 0;
    gap: 16px;
}
.options__origin .options__label {
    font-size: 15px;
}

.options__origin .options__label::after,
.options__origin .options__label::before {
    margin: 0 7px 0 0;
}

/* popup */

.overlay {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
}

.overlay.active {
    z-index: 999;
    opacity: 1;
    visibility: visible;
}

.popup {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    padding: 22px 52px;
    background: white;
    border: 1px solid #ccc;
    border-radius: 10px;
    box-shadow: 0px 0px 5px 0px #0000001a;
    z-index: -1;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
}

.popup.active {
    z-index: 1000;
    opacity: 1;
    visibility: visible;
}

#closeBtn {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    background: #d9d9d9;
    padding: 12px 33px;
    border-radius: 8px;
    font-family: Gotham Pro;
    font-size: 15px;
    font-weight: 600;
    line-height: 14.36px;
    letter-spacing: -0.025em;
    text-align: center;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
}

#closeBtn:hover {
    background: #e5e5e5;
}

.popup__title {
    font-family: Roboto;
    font-size: 20px;
    font-weight: 700;
    line-height: 25.8px;
    letter-spacing: -0.01em;
    text-align: center;
    margin-bottom: 12px;
    white-space: nowrap;
}

.popup__text {
    font-family: Roboto;
    font-size: 14px;
    font-weight: 400;
    line-height: 18.06px;
    letter-spacing: -0.01em;
    text-align: center;
    color: var(--color-red);
    margin-bottom: 24px;
    white-space: nowrap;
}


.loader {
    width: 48px;
    height: 48px;
    border: 5px solid;
    border-color: var(--color-violet) transparent;
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.loader-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s, opacity 0.3s linear;
}

.loader-wrapper.active {
    visibility: visible;
    opacity: 1;
}
/* ===========================================================================
   Подсказки и сообщения под полями
   =========================================================================== */

.field__hint {
    /* подпись поля имеет margin-bottom 16px, поле ввода — 24px:
       подтягиваем подсказку к заголовку, а сообщение — к полю */
    margin: -8px 0 14px;
    font-family: Roboto, sans-serif;
    font-size: 13px;
    line-height: 1.35;
    color: #8a8a88;
}

.field__notice {
    margin: -16px 0 22px;
    font-family: Roboto, sans-serif;
    font-size: 13px;
    line-height: 1.35;
    color: var(--color-dark-grey);
}

.field__notice--error {
    color: var(--color-red);
}

.field__notice--hidden {
    display: none;
}

/* ===========================================================================
   Автодополнение города (по образцу формы билетов и самого Trip.com)
   =========================================================================== */

/* Глобальное правило user-select: none перебивает выделение текста —
   разрешаем явно для полей ввода и списка */
.input,
.autocomplete__list,
.autocomplete__list * {
    -webkit-user-select: text;
    user-select: text;
}

.autocomplete {
    position: relative;
}

.autocomplete__list {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 20;
    max-height: 340px;
    overflow-y: auto;
    margin: 0;
    padding: 4px 0 8px;
    list-style: none;
    background: var(--color-white);
    border: 0.5px solid var(--color-grey2);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.autocomplete__list.active {
    display: block;
}

.autocomplete__pin {
    flex: 0 0 16px;
    width: 16px;
    height: 18px;
    background-repeat: no-repeat;
    background-position: center;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='%23c9ced8'%3E%3Cpath d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5A2.5 2.5 0 1 1 12 6.5a2.5 2.5 0 0 1 0 5z'/%3E%3C/svg%3E");
}

.autocomplete__pin--city {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='%233e3e3d'%3E%3Cpath d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5A2.5 2.5 0 1 1 12 6.5a2.5 2.5 0 0 1 0 5z'/%3E%3C/svg%3E");
}

.autocomplete__group {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px 10px;
    font-family: Roboto, sans-serif;
    font-size: 15px;
    color: var(--color-grey2);
}

.autocomplete__group b {
    font-weight: 500;
    color: var(--color-grey2);
}

.autocomplete__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 18px;
    margin: 0 18px;
    border-top: 1px solid #eef0f3;
    font-family: Roboto, sans-serif;
    font-size: 15px;
    color: var(--color-dark-grey);
    cursor: pointer;
}

.autocomplete__item:hover,
.autocomplete__item.active {
    background: #f5f7fa;
}

.autocomplete__city {
    flex: 1 1 auto;
}

.autocomplete__item b {
    font-weight: 600;
    color: var(--color-violet);
}

.autocomplete__code {
    flex: 0 0 auto;
    font-size: 12px;
    letter-spacing: 0.04em;
    color: var(--color-grey2);
}

.autocomplete__empty {
    padding: 8px 16px;
    font-family: Roboto, sans-serif;
    font-size: 14px;
    color: var(--color-grey2);
}

/* ===========================================================================
   Кнопки
   =========================================================================== */

/* Форма BTC временно не используется — кнопка скрыта, но остаётся в разметке */
.btn-form--hidden {
    display: none;
}

/* Состояние «файл готов, отправьте» — второе касание мобильного сценария.
   Зелёный цвет и однократная пульсация подсказывают, что нужно нажать ещё раз. */
.btn-form.btn__ready {
    background: #16b364;
    animation: btnReadyPulse 0.6s ease-out 1;
}

.btn-form.btn__ready:hover,
.btn-form.btn__ready:active {
    background: #12a058;
}

@keyframes btnReadyPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.03);
    }
    100% {
        transform: scale(1);
    }
}

/* Блок формы задан с padding-bottom: 0 — кнопка упиралась в нижнюю границу.
   Отбиваем её так же, как поля отбиты сверху. */
.first__block,
.second__block {
    padding-bottom: 24px;
}

.btn-form {
    margin: 32px 0 0;
}

.btn-form + .btn-form {
    margin-top: 12px;
}

/* ===========================================================================
   Узкие экраны
   ---------------------------------------------------------------------------
   У body был min-width: 390px — на телефонах 360 и 375 px это давало
   горизонтальный скрол всей страницы. Ширину отдаём экрану, а 390 px
   оставляем как максимум для крупных экранов.
   =========================================================================== */

body {
    min-width: 320px;
}

.main__container {
    width: 100%;
    max-width: 390px;
}

/* Длинные названия отелей и номеров не должны распирать блок */
.input,
select.input {
    max-width: 100%;
}

/* Страховка от случайного выхода за экран на узких телефонах */
html,
body {
    overflow-x: hidden;
}

/* Подсказка вверху была задана жёсткими 322 px плюс отступ 26 px слева —
   на экранах 320 px это вылезало за край. Отдаём ширину экрану. */
.red__notice {
    width: auto;
    max-width: 322px;
    margin-right: 10px;
}
