@import url('faq_accordion_block.css');
@import url('../../common/css/primary_button_block.css');
@import url('../../common/css/horizontal_images_block.css');
@import url('../../common/css/page_responsive.css');

/* Override */
.button-primary.button-block {
    min-width: unset;
    width: 100%;
}

/* ========================================
   Mobile Layout (default)
======================================== */
.faq-section-wrapper {
    scroll-margin-top: 10px;
}

.faq-section__question {
    scroll-margin-top: 10px;
}

.faq-toc {
    display: none; /* Hidden on mobile */
}

.faq-toc__section-link.active {
    background-color: rgba(0, 121, 207, 0.15);
    color: #0056b3;
}

.faq-toc__question-link.active {
    background-color: rgba(0, 121, 207, 0.2);
    color: #0079CF;
    font-weight: 600;
}

/* ========================================
   Desktop Layout (1024px+)
======================================== */

@media (min-width: 1024px) {
    .faq-section-wrapper {
        margin-bottom: 32px;
        scroll-margin-top: 80px; /* Account for sticky positioning */
    }

    .faq-section__question {
        scroll-margin-top: 80px; /* Account for sticky positioning */
    }

    .faq-toc {
        display: block;
        width: 280px;
        flex-shrink: 0;
    }

    .faq-toc__content {
        position: sticky;
        top: 32px;
        background: #fff;
        border-radius: 12px;
        padding: 12px;
        border: 1px solid #e9ecef;
    }

    .faq-toc__title {
        font-size: 18px;
        font-weight: 600;
        color: #434343;
        margin: 0 0 16px 0;
    }

    .faq-toc__list {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .faq-toc__section {
        margin-bottom: 20px;
    }

    .faq-toc__section-link {
        display: block;
        font-weight: 600;
        color: #0079CF;
        text-decoration: none;
        padding: 8px 4px;
        font-size: 14px;
        line-height: 1.4;
        border-bottom: 1px solid #e9ecef;
        margin-bottom: 8px;
    }

    .faq-toc__section-link:hover {
        background-color: rgba(0, 121, 207, 0.1);
        border-radius: 4px;
        padding-left: 8px;
        transition: all 0.2s ease;
    }

    .faq-toc__questions {
        list-style: none;
        padding-left: 16px;
        margin: 0;
    }

    .faq-toc__question {
        margin-bottom: 6px;
    }

    .faq-toc__question-link {
        display: block;
        color: #6c757d;
        text-decoration: none;
        padding: 4px 8px;
        font-size: 13px;
        line-height: 1.3;
        border-radius: 4px;
        transition: all 0.2s ease;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .faq-toc__question-link:hover {
        background-color: rgba(0, 121, 207, 0.1);
        color: #0079CF;
    }
}

/* ========================================
   Large Desktop (1400px+)
======================================== */

@media (min-width: 1400px) {
    .faq-toc {
        width: 320px;
    }
}

/* Print styles */
@media print {
    .faq-toc {
        display: none;
    }

    .faq-section__question,
    .faq-section__answer {
        break-inside: avoid;
    }
}