/**
 * Стили страницы-заглушки 8ka.by.
 * Высокая специфичность (body.stub-page) — защита от глобальных стилей темы.
 */

/* --- Сброс страницы --- */
html.stub-page,
body.stub-page {
    margin: 0 !important;
    padding: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    overflow-x: hidden !important;
    font-family: "Golos Text", "Segoe UI", Arial, sans-serif !important;
    color: #000 !important;
    background: #fff !important;
}

/* Скрытые попапы темы не должны увеличивать высоту документа на iOS */
body.stub-page .popup:not(.popup--show) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
}

body.stub-page .popup.popup--show {
    display: flex !important;
    position: fixed !important;
    inset: 0 !important;
    z-index: 1000000 !important;
    height: auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

body.stub-page > .mod {
    display: none !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* --- Фон: высота страницы = высота изображения --- */
body.stub-page .stub {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0 !important;
    background: rgba(255, 255, 255, 0.94);
}

body.stub-page .stub__bg {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0 !important;
}

body.stub-page .stub__bg-image {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 0.91;
    vertical-align: top;
}

/* --- Карточка: фиксированный слой по центру экрана --- */
body.stub-page .stub__panel-layer {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    z-index: 100 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 16px !important;
    pointer-events: none !important;
    transform: none !important;
}

body.stub-page .stub__panel {
    position: relative !important;
    width: 100% !important;
    max-width: 1184px !important;
    max-height: calc(100vh - 32px) !important;
    max-height: calc(100dvh - 32px) !important;
    margin: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    pointer-events: auto !important;
    background: rgba(255, 255, 255, 0.7) !important;
    border-radius: 30px !important;
    padding: 48px 77px 32px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 28px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    -webkit-overflow-scrolling: touch;
}

body.stub-page .stub__content {
    display: flex !important;
    flex-direction: column !important;
    gap: 28px !important;
}

/* Сброс типографики темы внутри карточки */
body.stub-page .stub__panel h1.stub__title {
    margin: 0 !important;
    font-size: 32px !important;
    font-weight: 400 !important;
    line-height: 1.25 !important;
    color: #000 !important;
    text-align: left !important;
    font-family: inherit !important;
}

body.stub-page .stub__panel p.stub__text {
    margin: 0 !important;
    font-size: 32px !important;
    font-weight: 400 !important;
    line-height: 40px !important;
    color: #000 !important;
    text-align: center !important;
    position: static !important;
    z-index: auto !important;
    font-family: inherit !important;
}

body.stub-page .stub__cta {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 32px !important;
    min-height: 99px;
    padding: 19px 24px !important;
    background: #e80000 !important;
    border-radius: 20px !important;
}

body.stub-page .stub__panel p.stub__cta-text {
    margin: 0 !important;
    max-width: 416px;
    font-size: 20px !important;
    font-weight: 400 !important;
    line-height: 20px !important;
    color: #ccc !important;
    text-align: left !important;
    position: static !important;
    z-index: auto !important;
}

body.stub-page .stub__button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0;
    width: 344px;
    height: 61px;
    padding: 14px 21px !important;
    border: 0 !important;
    border-radius: 6px !important;
    background: #b1b4d7 !important;
    color: #fff !important;
    font-family: inherit !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    line-height: 15px !important;
    text-decoration: none !important;
    text-align: center !important;
    white-space: nowrap;
    cursor: pointer;
}

body.stub-page .stub__button:hover,
body.stub-page .stub__button:focus {
    background: #9a9ec4 !important;
    color: #fff !important;
    text-decoration: none !important;
}

/* --- Реквизиты (аккордеон) --- */
body.stub-page .stub__requisites {
    border-radius: 16px !important;
    background: rgba(255, 255, 255, 0.85) !important;
    overflow: visible;
    flex-shrink: 0;
}

body.stub-page .stub__requisites-toggle {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    padding: 16px 20px !important;
    border: 0 !important;
    background: transparent !important;
    color: #111 !important;
    font-family: inherit !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    line-height: 1.3 !important;
    text-align: left !important;
    cursor: pointer;
}

body.stub-page .stub__requisites-toggle:hover,
body.stub-page .stub__requisites-toggle:focus {
    background: rgba(0, 0, 0, 0.03) !important;
    outline: none;
}

body.stub-page .stub__requisites-toggle-text {
    flex: 1;
}

body.stub-page .stub__requisites-icon {
    flex-shrink: 0;
    width: 10px;
    height: 10px;
    border-right: 2px solid #333;
    border-bottom: 2px solid #333;
    transform: rotate(45deg);
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1), margin-top 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

body.stub-page .stub__requisites-toggle[aria-expanded="true"] .stub__requisites-icon {
    transform: rotate(-135deg);
    margin-top: 4px;
}

body.stub-page .stub__requisites-collapse {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

body.stub-page .stub__requisites-content {
    padding: 0 20px 20px !important;
    opacity: 0;
    transform: translateY(-8px);
    transition:
        opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

body.stub-page .stub__requisites-toggle[aria-expanded="true"] + .stub__requisites-collapse .stub__requisites-content {
    opacity: 1;
    transform: translateY(0);
}

body.stub-page .stub__requisites-block + .stub__requisites-block {
    margin-top: 24px !important;
    padding-top: 24px !important;
    border-top: 1px solid rgba(0, 0, 0, 0.12);
}

body.stub-page .stub__requisites-lead {
    margin: 0 0 12px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    color: #111 !important;
    position: static !important;
    z-index: auto !important;
}

body.stub-page .stub__requisites-list {
    margin: 0 !important;
    padding: 0 !important;
}

body.stub-page .stub__requisites-row {
    display: grid !important;
    grid-template-columns: 140px 1fr;
    gap: 8px 16px;
    padding: 8px 0 !important;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

body.stub-page .stub__requisites-row:first-child {
    border-top: 0;
    padding-top: 0 !important;
}

body.stub-page .stub__requisites-row dt {
    margin: 0 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
    color: #666 !important;
}

body.stub-page .stub__requisites-row dd {
    margin: 0 !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.45 !important;
    color: #111 !important;
    position: static !important;
    z-index: auto !important;
}

body.stub-page .stub__requisites-row a {
    color: #1265ac !important;
    text-decoration: none !important;
}

body.stub-page .stub__requisites-row a:hover {
    text-decoration: underline !important;
}

@media (prefers-reduced-motion: reduce) {
    body.stub-page .stub__requisites-collapse,
    body.stub-page .stub__requisites-content,
    body.stub-page .stub__requisites-icon {
        transition: none !important;
    }
}

body.stub-page .stub__requisites-collapse.stub__requisites-collapse--open {
    overflow: visible;
}

@media (max-width: 1280px) {
    body.stub-page .stub__panel {
        padding: 40px 48px 28px !important;
    }

    body.stub-page .stub__panel h1.stub__title,
    body.stub-page .stub__panel p.stub__text {
        font-size: 26px !important;
        line-height: 34px !important;
    }

    body.stub-page .stub__text br {
        display: none;
    }
}

@media (max-width: 900px) {
    /* Фон на всю высоту экрана без белой полосы снизу */
    body.stub-page .stub {
        position: relative !important;
        height: 100dvh !important;
        min-height: 100dvh !important;
        max-height: 100dvh !important;
        overflow: hidden !important;
    }

    body.stub-page .stub__bg {
        position: absolute !important;
        inset: 0 !important;
        width: 100% !important;
        height: 100% !important;
    }

    body.stub-page .stub__bg-image {
        width: 100% !important;
        height: 100% !important;
        min-height: 100% !important;
        object-fit: cover !important;
        object-position: center center !important;
    }

    body.stub-page .stub__panel-layer {
        padding: 12px !important;
    }

    body.stub-page .stub__panel {
        max-height: calc(100vh - 24px) !important;
        max-height: calc(100dvh - 24px) !important;
        padding: 32px 24px 24px !important;
        border-radius: 24px !important;
        gap: 24px !important;
    }

    body.stub-page .stub__panel h1.stub__title {
        font-size: 22px !important;
        line-height: 28px !important;
        text-align: center !important;
    }

    body.stub-page .stub__panel p.stub__text {
        font-size: 18px !important;
        line-height: 26px !important;
    }

    body.stub-page .stub__cta {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 16px !important;
        min-height: 0;
        padding: 20px !important;
    }

    body.stub-page .stub__panel p.stub__cta-text {
        max-width: none;
        font-size: 16px !important;
        line-height: 22px !important;
        text-align: center !important;
    }

    body.stub-page .stub__button {
        width: 100% !important;
        height: 52px;
    }

    body.stub-page .stub__requisites-toggle {
        font-size: 14px !important;
        padding: 14px 16px !important;
    }

    body.stub-page .stub__requisites-content {
        padding: 0 16px 16px !important;
    }

    body.stub-page .stub__requisites-row {
        grid-template-columns: 1fr !important;
        gap: 4px !important;
    }
}
