/* =========================================================
   FAQ TRIGGER
   ========================================================= */

.sc-faq-trigger {
    font-family: "Inter", "Helvetica Neue", sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    font-weight: 200;
    margin-left: 6px;
    letter-spacing: 2px;
    font-size: 10px;
    cursor: pointer;
    transition: .2s;
}

/* =========================================================
   MODAL BACKGROUND
   ========================================================= */

.sc-faq-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);

    font-weight: 200;
    line-height: 1.6;

    padding: 14px;
    overflow: hidden;
}

.sc-faq-modal.active {
    display: block;
}

/* =========================================================
   BOX
   ========================================================= */

.sc-faq-box {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);

    background: #2b2f36;
    padding: 20px;
    border-radius: 12px;

    width: 90%;
    max-width: 400px;
    max-height: 85vh;

    color: #fff;

    overflow: hidden;
    box-sizing: border-box;
}

/* =========================================================
   TEXT (СКРОЛЛ)
   ========================================================= */

.sc-faq-text {
    max-height: calc(85vh - 20px);
    overflow-y: auto;
    overflow-x: hidden;

    -webkit-overflow-scrolling: touch;

    text-align: left;
    word-break: break-word;

    padding-right: 6px;

    /* 🔥 фикс Chrome + iPhone */
    padding-bottom: calc(40px + env(safe-area-inset-bottom));
}

/* текст */

.sc-faq-text p {
    margin: 12px 0;
}

.sc-faq-text strong {
    font-weight: 600;
}

/* =========================================================
   CLOSE BUTTON
   ========================================================= */

.sc-faq-close {
    position: absolute;
    right: 10px;
    top: 8px;
    font-size: 22px;
    cursor: pointer;
    color: #aaa;
    z-index: 5;
    line-height: 1;
}

.sc-faq-close:hover {
    color: #fff;
}

/* =========================================================
   MOBILE FIX
   ========================================================= */

@media (max-width: 767px) {

    .sc-faq-modal {
        padding: 10px;
    }

    .sc-faq-box {
        left: 10px;
        right: 10px;
        top: 10px;
        transform: none;

        width: auto;
        max-width: none;

        max-height: calc(100vh - 20px);

        padding: 18px 16px 16px;
        border-radius: 14px;
    }

    .sc-faq-text {
        max-height: calc(100vh - 80px);

        font-size: 15px;
        line-height: 1.65;

        padding-right: 4px;

        /* 🔥 ключевой фикс для Chrome */
        padding-bottom: calc(60px + env(safe-area-inset-bottom));
    }

    .sc-faq-close {
        right: 12px;
        top: 10px;
        font-size: 28px;
    }
}