/*
 * Alicom Support — стили модалки «Підтримка», блока с плитками, кнопки в бот,
 * подписанных ссылок на бот/канал и плавающей кнопки.
 * Отдельный файл модуля (не в dist темы) — переносится на другие сайты как есть.
 * Цвета и шрифт — в переменных ниже, при переносе правятся только они.
 */
:root {
    --asup-fg: #111;
    --asup-bg: #fff;
    --asup-muted: #595959;
    --asup-text: #333;
    --asup-line: #e5e5e5;
    --asup-accent: #e4f5a6;
    --asup-error: #e01818;        /* как .form__error темы */
    --asup-input-line: rgba(0, 0, 0, .6);
    --asup-input-line-hover: rgba(0, 0, 0, .4);
    --asup-font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.asup [hidden],
.asup[hidden],
.asup-modal[hidden] {
    display: none !important;
}

/* ------------------------------------------------------------------ блок */
.asup {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    padding: 36px 32px 28px;
    background: var(--asup-bg);
    color: var(--asup-fg);
    font-family: var(--asup-font);
    font-size: 15px;
    line-height: 1.5;
    text-align: left;
}

.asup *,
.asup *::before,
.asup *::after {
    box-sizing: border-box;
}

.asup a {
    color: var(--asup-fg);
    text-decoration: underline;
}

@media (any-hover: hover) {
    .asup a:hover {
        color: #555;
    }
}

.asup__screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.asup__icon {
    flex: none;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--asup-accent);
    color: var(--asup-fg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.asup__title {
    margin: 0;
    padding: 0 28px;
    font-size: 22px;
    line-height: 1.25;
    font-weight: 700;
    text-align: center;
    text-transform: none;
    color: var(--asup-fg);
}

.asup__text {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
    text-align: center;
    color: var(--asup-text);
}

.asup__text a {
    font-weight: 700;
}

.asup__note {
    margin: -8px 0 0;
    font-size: 13px;
    line-height: 1.45;
    text-align: center;
    color: var(--asup-muted);
}

.asup__close,
.asup__back {
    position: absolute;
    top: 14px;
    z-index: 2;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none !important;
    box-shadow: none;
    color: var(--asup-fg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity .2s;
}

/* Без тёмного кружка — как крестик попапов темы: при наведении только прозрачность. */
@media (any-hover: hover) {
    .asup__close:hover,
    .asup__back:hover {
        opacity: .5;
    }
}

.asup__close {
    right: 14px;
}

.asup__back {
    left: 14px;
}

.asup__close:focus-visible,
.asup__back:focus-visible,
.asup__tile:focus-visible,
.asup__btn:focus-visible,
.asup__link:focus-visible {
    outline: 2px solid var(--asup-fg);
    outline-offset: 2px;
}

/* плитки */
.asup__tiles {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.asup__tile {
    width: 100%;
    min-height: 52px;
    margin: 0;
    padding: 10px 16px;
    border: 1px solid var(--asup-fg);
    border-radius: 0;
    background: var(--asup-bg);
    color: var(--asup-fg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font: 500 15px/1.3 var(--asup-font);
    text-align: left;
    text-transform: none;
    cursor: pointer;
    transition: background-color .2s, color .2s;
}

.asup__tile svg {
    flex: none;
}

@media (any-hover: hover) {
    .asup__tile:hover {
        background: var(--asup-fg);
        color: var(--asup-bg);
    }
}

.asup__foot {
    width: 100%;
    padding-top: 16px;
    border-top: 1px solid var(--asup-line);
    font-size: 13px;
    line-height: 1.45;
    text-align: center;
    color: var(--asup-muted);
}

.asup__foot a {
    font-weight: 600;
}

.asup__link {
    min-height: 44px;
    padding: 0 8px;
    border: 0;
    background: none;
    color: var(--asup-muted);
    font: 400 13px/1.45 var(--asup-font);
    text-decoration: underline;
    cursor: pointer;
}

@media (any-hover: hover) {
    .asup__link:hover {
        color: var(--asup-fg);
    }
}

/* кнопки */
.asup__btn {
    width: 100%;
    min-height: 52px;
    margin: 0;
    padding: 10px 16px;
    border: 1px solid var(--asup-fg);
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font: 600 13px/1.2 var(--asup-font);
    letter-spacing: .08em;
    text-transform: uppercase;
    text-align: center;
    text-decoration: none !important;
    cursor: pointer;
    position: relative;
    z-index: 0;
    overflow: hidden;
    transition: color .3s ease;
}

/* Наведение как у кнопок темы ([class*="--btn"]): заливка противоположного цвета выезжает слева. */
.asup__btn::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    transform: translateX(-105%);
    transition: transform .3s ease-in-out;
}

.asup__btn--dark,
.asup a.asup__btn--dark {
    background: var(--asup-fg);
    color: var(--asup-bg);
}

.asup__btn--dark::before {
    background: var(--asup-bg);
}

.asup__btn--light {
    background: var(--asup-bg);
    color: var(--asup-fg);
}

.asup__btn--light::before {
    background: var(--asup-fg);
}

@media (any-hover: hover) {
    .asup__btn:hover::before {
        transform: none;
    }

    .asup__btn--dark:hover,
    .asup a.asup__btn--dark:hover {
        color: var(--asup-fg);
    }

    .asup__btn--light:hover {
        color: var(--asup-bg);
    }
}

.asup__btn:active {
    opacity: .85;
}

.asup__btn[disabled],
.asup__btn--busy {
    background: rgba(0, 0, 0, .3);
    border-color: transparent;
    color: var(--asup-bg);
    pointer-events: none;
    cursor: wait;
}

.asup__btn[disabled]::before,
.asup__btn--busy::before {
    display: none;
}

/* форма */
.asup__form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.asup__field {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.asup__label {
    font-size: 13px;
    line-height: 1.3;
    color: var(--asup-muted);
}

.asup__input {
    width: 100%;
    height: 48px;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid var(--asup-input-line);
    border-radius: 4px;
    background: var(--asup-bg);
    color: var(--asup-fg);
    font: 300 16px/1.4 var(--asup-font); /* 16px — iOS не увеличивает страницу при фокусе */
    letter-spacing: .3px;
    box-shadow: none;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color .2s ease-in-out;
}

.asup .asup__input::placeholder {
    color: #757575;
}

.asup__input--area {
    height: 96px;
    resize: none;
}

/* Состояния как у полей темы. .asup .asup__input — сильнее, чем input:hover / input:valid темы. */
.asup .asup__input:valid {
    border-color: var(--asup-fg);
}

@media (any-hover: hover) {
    .asup .asup__input:hover {
        border-color: var(--asup-input-line-hover);
    }
}

.asup .asup__input:focus {
    border-color: var(--asup-fg);
    outline: none;
}

/* Ошибка под полем — как .form__error темы, поверх отступа: окно не прыгает и кнопка
   «Надіслати» остаётся на месте (раньше повторный клик попадал в ссылку согласия). */
.asup__field-error {
    position: absolute;
    top: calc(100% + 3px);
    left: 0;
    width: 100%;
    font-size: 12px;
    font-weight: 300;
    line-height: 1.2;
    letter-spacing: .3px;
    color: var(--asup-error);
}

.asup__error {
    font-size: 12px;
    font-weight: 300;
    line-height: 1.35;
    letter-spacing: .3px;
    color: var(--asup-error);
}

.asup__hint {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
    color: var(--asup-muted);
}

.asup__hint a {
    font-weight: 600;
}

.asup__consent {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
    color: var(--asup-muted);
}

.asup__consent a {
    color: inherit;
}

/* скрытое поле-ловушка для ботов */
.asup__hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
}

/* блок на странице */
.asup--inline {
    max-width: 440px;
    margin: 40px auto;
    border: 1px solid var(--asup-line);
}

/* ------------------------------------------------------------------ модалка */
html.asup-lock,
html.asup-lock body {
    overflow: hidden;
}

.asup-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.asup-modal__overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    opacity: 0;
    transition: opacity .2s;
}

.asup-modal__dialog {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: auto;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .2s, transform .2s;
}

.asup-modal__dialog:focus {
    outline: none;
}

.asup-modal--open .asup-modal__overlay,
.asup-modal--open .asup-modal__dialog {
    opacity: 1;
    transform: none;
}

/* телефон от 360 px: модалка целиком помещается */
@media (max-width: 479.98px) {
    .asup-modal {
        padding: 8px;
    }

    .asup {
        padding: 28px 20px 20px;
    }

    .asup__screen {
        gap: 16px;
    }

    .asup__form {
        gap: 18px; /* под полем помещается текст ошибки */
    }

    .asup__icon {
        width: 48px;
        height: 48px;
    }

    .asup__title {
        font-size: 20px;
    }

    .asup__close,
    .asup__back {
        top: 8px;
    }

    .asup__close {
        right: 8px;
    }

    .asup__back {
        left: 8px;
    }

    .asup__tile,
    .asup__btn {
        min-height: 48px;
    }

    .asup__input--area {
        height: 84px;
    }

    .asup--inline {
        margin: 24px auto;
    }
}

/* ------------------------------------------------------------------ кнопка «Підтримка» в хедере */
/* Иконка чата вместо трубки — та же, что у плавающей кнопки темы (.button-holder__icon,
   dist/img/button-holder/message.svg). Маска + currentColor: цвет берётся из текста кнопки темы. */
.asup-header-btn.asup-header-btn::before {
    content: "";
    width: 18px;
    height: 18px;
    flex: none;
    background: currentColor !important;
    -webkit-mask: url("data:image/svg+xml,%3Csvg width='28' height='28' viewBox='0 0 28 28' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M5.60467 25.2513C6.06515 25.3342 6.53213 25.3756 7 25.375C8.47871 25.377 9.92785 24.9608 11.1802 24.1745C12.0832 24.3868 13.0282 24.5 14 24.5C20.209 24.5 25.375 19.8683 25.375 14C25.375 8.13167 20.209 3.5 14 3.5C7.791 3.5 2.625 8.13167 2.625 14C2.625 16.8105 3.82083 19.3515 5.74467 21.224C6.01533 21.4877 6.06783 21.7233 6.041 21.8575C5.89682 22.5832 5.56997 23.2602 5.09133 23.8245C4.99197 23.9418 4.92526 24.0832 4.89793 24.2345C4.87061 24.3858 4.88362 24.5416 4.93566 24.6863C4.98771 24.8309 5.07694 24.9593 5.19439 25.0585C5.31183 25.1577 5.45334 25.2242 5.60467 25.2513ZM9.625 12.6875C9.2769 12.6875 8.94306 12.8258 8.69692 13.0719C8.45078 13.3181 8.3125 13.6519 8.3125 14C8.3125 14.3481 8.45078 14.6819 8.69692 14.9281C8.94306 15.1742 9.2769 15.3125 9.625 15.3125C9.9731 15.3125 10.3069 15.1742 10.5531 14.9281C10.7992 14.6819 10.9375 14.3481 10.9375 14C10.9375 13.6519 10.7992 13.3181 10.5531 13.0719C10.3069 12.8258 9.9731 12.6875 9.625 12.6875ZM12.6875 14C12.6875 13.6519 12.8258 13.3181 13.0719 13.0719C13.3181 12.8258 13.6519 12.6875 14 12.6875C14.3481 12.6875 14.6819 12.8258 14.9281 13.0719C15.1742 13.3181 15.3125 13.6519 15.3125 14C15.3125 14.3481 15.1742 14.6819 14.9281 14.9281C14.6819 15.1742 14.3481 15.3125 14 15.3125C13.6519 15.3125 13.3181 15.1742 13.0719 14.9281C12.8258 14.6819 12.6875 14.3481 12.6875 14ZM18.375 12.6875C18.0269 12.6875 17.6931 12.8258 17.4469 13.0719C17.2008 13.3181 17.0625 13.6519 17.0625 14C17.0625 14.3481 17.2008 14.6819 17.4469 14.9281C17.6931 15.1742 18.0269 15.3125 18.375 15.3125C18.7231 15.3125 19.0569 15.1742 19.3031 14.9281C19.5492 14.6819 19.6875 14.3481 19.6875 14C19.6875 13.6519 19.5492 13.3181 19.3031 13.0719C19.0569 12.8258 18.7231 12.6875 18.375 12.6875Z' fill='%23000'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg width='28' height='28' viewBox='0 0 28 28' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M5.60467 25.2513C6.06515 25.3342 6.53213 25.3756 7 25.375C8.47871 25.377 9.92785 24.9608 11.1802 24.1745C12.0832 24.3868 13.0282 24.5 14 24.5C20.209 24.5 25.375 19.8683 25.375 14C25.375 8.13167 20.209 3.5 14 3.5C7.791 3.5 2.625 8.13167 2.625 14C2.625 16.8105 3.82083 19.3515 5.74467 21.224C6.01533 21.4877 6.06783 21.7233 6.041 21.8575C5.89682 22.5832 5.56997 23.2602 5.09133 23.8245C4.99197 23.9418 4.92526 24.0832 4.89793 24.2345C4.87061 24.3858 4.88362 24.5416 4.93566 24.6863C4.98771 24.8309 5.07694 24.9593 5.19439 25.0585C5.31183 25.1577 5.45334 25.2242 5.60467 25.2513ZM9.625 12.6875C9.2769 12.6875 8.94306 12.8258 8.69692 13.0719C8.45078 13.3181 8.3125 13.6519 8.3125 14C8.3125 14.3481 8.45078 14.6819 8.69692 14.9281C8.94306 15.1742 9.2769 15.3125 9.625 15.3125C9.9731 15.3125 10.3069 15.1742 10.5531 14.9281C10.7992 14.6819 10.9375 14.3481 10.9375 14C10.9375 13.6519 10.7992 13.3181 10.5531 13.0719C10.3069 12.8258 9.9731 12.6875 9.625 12.6875ZM12.6875 14C12.6875 13.6519 12.8258 13.3181 13.0719 13.0719C13.3181 12.8258 13.6519 12.6875 14 12.6875C14.3481 12.6875 14.6819 12.8258 14.9281 13.0719C15.1742 13.3181 15.3125 13.6519 15.3125 14C15.3125 14.3481 15.1742 14.6819 14.9281 14.9281C14.6819 15.1742 14.3481 15.3125 14 15.3125C13.6519 15.3125 13.3181 15.1742 13.0719 14.9281C12.8258 14.6819 12.6875 14.3481 12.6875 14ZM18.375 12.6875C18.0269 12.6875 17.6931 12.8258 17.4469 13.0719C17.2008 13.3181 17.0625 13.6519 17.0625 14C17.0625 14.3481 17.2008 14.6819 17.4469 14.9281C17.6931 15.1742 18.0269 15.3125 18.375 15.3125C18.7231 15.3125 19.0569 15.1742 19.3031 14.9281C19.5492 14.6819 19.6875 14.3481 19.6875 14C19.6875 13.6519 19.5492 13.3181 19.3031 13.0719C19.0569 12.8258 18.7231 12.6875 18.375 12.6875Z' fill='%23000'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ------------------------------------------------------------------ кнопка в бот (инфо-страницы) */
.asup-cta,
.asup-cta *,
.asup-fab,
.asup-fab * {
    box-sizing: border-box;
}

.asup-cta {
    margin: 0 0 32px;
    font-family: var(--asup-font);
}

.asup-cta__title {
    margin: 0 0 12px;
    font-size: 16px;
    line-height: 1.4;
    font-weight: 600;
    color: var(--asup-fg);
}

/* Кнопка — общая кнопка темы (класс main__link--btn → [class*="--btn"]: чёрная, 56 px,
   13 px заглавными, белая заливка выезжает слева). Здесь только то, что ломает текст страницы:
   .content__body * красит всё серым, ставит вес 400 и подчёркивает ссылки. */
.asup-cta .asup-cta__btn {
    gap: 12px;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5384615385;
    text-decoration: none !important;
}

.asup-cta .asup-cta__btn * {
    color: inherit !important;
    font: inherit;
    letter-spacing: inherit;
}

.asup-cta__btn svg {
    flex: none;
    width: 20px;
    height: 20px;
}

@media (min-width: 61.99875em) {
    .asup-cta .asup-cta__btn.asup-cta__btn:hover {
        color: #000;
    }
}

/* На телефоне надпись длинная — кнопка во всю ширину, текст переносится. */
@media (max-width: 479.98px) {
    .asup-cta .asup-cta__btn {
        width: 100%;
        height: auto;
        min-height: 56px;
        padding: 12px 16px;
    }
}

/* ------------------------------------------------------------------ подписанные ссылки на бот и канал */
/* Добавляется к классам темы: <a class="header-…-social__item asup-labeled asup-labeled--menu"> */
.asup-labeled {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    width: auto !important;
    color: inherit;
    text-decoration: none;
    transition: .3s all;
}

.asup-labeled--menu {
    gap: 8px;
    padding: 0 14px 0 10px;
    border-radius: 18px;
    /* фон у кнопок соцсетей в меню темы белый — текст тёмный, как иконка */
    color: #000 !important;
}

.asup-labeled__text {
    font-size: 14px;
    line-height: 1.2;
    white-space: nowrap;
}

.asup-labeled-wrap {
    flex-wrap: wrap;
    gap: 10px;
}

.asup-contact-hint {
    margin: 6px 0 0;
    font-size: 14px;
    line-height: 1.45;
    color: inherit;
    opacity: .8;
}

/* «Контакти»: бот со строкой под ним */
.asup-contact-bot {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 320px;
    text-align: center;
}

.asup-contact-bot .asup-contact-hint {
    margin-top: 10px;
    text-transform: none;
    letter-spacing: 0;
}

@media (max-width: 767.98px) {
    .asup-contacts-socials.asup-contacts-socials {
        max-width: none;
        justify-content: center;
    }
}

/* ------------------------------------------------------------------ чекаут: звонить / не звонить */
.asup-call {
    position: relative;
    outline: 1px solid transparent;
    outline-offset: 8px;
    transition: outline-color .2s;
}

/* outline, а не border — блок не сдвигается при появлении ошибки */
.asup-call--error {
    outline-color: var(--asup-error);
}

.asup-call__error {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.35;
    color: var(--asup-error);
}

.asup-call__error[hidden] {
    display: none;
}

/* согласие под кнопкой «Оформити замовлення» */
.asup-checkout-consent {
    margin-top: 12px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--asup-muted);
    text-align: center;
}

.asup-checkout-consent a {
    color: inherit;
    text-decoration: underline;
}

/* ------------------------------------------------------------------ плавающая кнопка */
/* Вид, место и поведение — как у кнопки онлайн-чата на adidas.pl.ua (.button-holder темы sneakers). */
.asup-fab {
    position: fixed;
    right: 57px; /* 50px + внутренний отступ 7px у .button-holder */
    bottom: 107px;
    z-index: 9999;
    width: 64px; /* у .button-holder 56px — «ПІДТРИМКА»/«ПОДДЕРЖКА» туда не помещаются */
    height: 64px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #000;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-family: var(--asup-font);
    transition: opacity .3s, visibility .3s;
}

/* Неподвижный полупрозрачный ореол (как у .button-holder) и пульсирующее кольцо поверх. */
.asup-fab::before,
.asup-fab::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: #000;
    opacity: .15;
    transform: scale(1.15);
    z-index: -1;
    pointer-events: none;
}

.asup-fab::after {
    animation: asup-fab-pulse 2.4s ease-out infinite;
}

@keyframes asup-fab-pulse {
    0% {
        opacity: .3;
        transform: scale(1);
    }
    70%,
    100% {
        opacity: 0;
        transform: scale(1.6);
    }
}

@media (prefers-reduced-motion: reduce) {
    .asup-fab::after {
        animation: none;
    }
}

.asup-fab__icon,
.asup-fab__text {
    position: absolute;
    opacity: 0;
    transition: opacity .3s, transform .3s; /* не all: иначе подгонка шрифта меряет старую ширину */
}

.asup-fab__icon {
    width: 28px;
    height: 28px;
}

.asup-fab__icon svg {
    display: block;
}

.asup-fab__text {
    white-space: nowrap;
    font-weight: 600;
    font-size: 10px; /* JS уменьшает, если слово не помещается с отступами */
    line-height: 1.2;
    letter-spacing: -.04em;
    text-transform: uppercase;
    text-align: center;
    color: #fff;
}

.asup-fab__icon._active,
.asup-fab__text._active {
    opacity: 1;
    transform: perspective(400px) rotateY(0) scale(1);
}

.asup-fab:focus-visible {
    outline: 2px solid #000;
    outline-offset: 6px;
}

/* Над тёмным футером — белая кнопка с чёрной иконкой и текстом (класс ставит JS). */
.asup-fab {
    transition: opacity .3s, visibility .3s, background-color .3s, color .3s;
}

.asup-fab--light {
    background: #fff;
    color: #000;
}

.asup-fab--light::before,
.asup-fab--light::after {
    background: #fff;
}

.asup-fab--light .asup-fab__text {
    color: #000;
}

.asup-fab--light:focus-visible {
    outline-color: #fff;
}

.asup-fab--hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

@media (max-width: 767.98px) {
    .asup-fab {
        right: 32px; /* 25px + 7px */
        bottom: 97px; /* 90px + 7px */
        z-index: 6;
    }
}

html.asup-lock .asup-fab {
    visibility: hidden;
}
