/* Ammonit Split Badge v5.0 — виджет Яндекс Сплит */

/* ============================================================
   КАТАЛОГ — бейдж под ценой
   ============================================================ */
.ammonit-split-loop {
    margin: 6px 0 2px;
    line-height: 1;
    min-height: 20px;
    cursor: pointer;
}
.ammonit-split-loop yandex-pay-badge { pointer-events: none; }

/* ============================================================
   СТРАНИЦА ТОВАРА — бейдж под ценой
   ============================================================ */
.ammonit-split-single {
    margin-top: 10px;
    margin-bottom: 6px;
    cursor: pointer;
}
.ammonit-split-single yandex-pay-badge { pointer-events: none; display: none !important; }

.asb-custom-text {
    font-size: 14px;
    color: #333;
    line-height: 1.4;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 3px;
}

/* ============================================================
   ОВЕРЛЕЙ-ОБЁРТКА
   ============================================================ */
.asb-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}
.asb-overlay__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.asb-overlay__dialog {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 24px 64px rgba(0,0,0,.18);
    animation: asbIn .25s ease;
    overflow: hidden;
}
@keyframes asbIn {
    from { opacity: 0; transform: translateY(16px) scale(.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Крестик — строго справа */
.asb-overlay__close {
    position: absolute !important;
    top: 16px !important;
    right: 16px !important;
    left: auto !important;
    inset-inline-start: auto !important;
    inset-inline-end: 16px !important;
    z-index: 3;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    margin: 0 !important;
    float: none !important;
    background: rgba(0,0,0,.06) !important;
    border: none !important;
    border-radius: 50% !important;
    color: #333;
    cursor: pointer;
    transition: background .15s;
}
.asb-overlay__close:hover { background: rgba(0,0,0,.1) !important; }
.asb-overlay__close svg { width: 18px; height: 18px; }

/* Тело модалки — виджет Яндекс Сплит */
.asb-overlay__body {
    padding: 16px;
}
.asb-overlay__widget {
    min-height: 120px;
    width: 100%;
}
.asb-overlay__widget iframe {
    width: 100% !important;
    border: none !important;
}

/* ============================================================
   АДАПТИВ
   ============================================================ */
@media (max-width: 768px) {
    .asb-overlay {
        padding: 0;
        align-items: flex-end;
    }
    .asb-overlay__dialog {
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        animation: asbUp .3s ease;
        max-height: 90vh;
        overflow-y: auto;
    }
    @keyframes asbUp {
        from { transform: translateY(100%); }
        to   { transform: translateY(0); }
    }
    .asb-overlay__body { padding: 12px; }
}

body.asb-open { overflow: hidden; }
