/**
 * Product FAQ.
 *
 * Rendered by hehku_product_faq_render() in inc/woocommerce-product.php.
 * Colours come from the theme scheme tokens in css/themes/, so the block
 * follows the active colour scheme without hardcoding anything.
 */

.hehku-faq {
    max-width: 820px;
    margin: 48px auto 8px;
    padding: 0 15px;
    clear: both;
}

.hehku-faq__heading {
    font: 400 28px/34px "Roboto", sans-serif;
    color: var(--onBackground);
    margin: 0 0 20px;
}

.hehku-faq__list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hehku-faq__item {
    border: 1px solid var(--outline);
    border-radius: 6px;
    background: var(--background);
    overflow: hidden;
}

.hehku-faq__question {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 20px;
    cursor: pointer;
    font: 500 18px/26px "Roboto", sans-serif;
    color: var(--onBackground);
    list-style: none;
    transition: color .15s ease;
}

/* Hide the native disclosure triangle in every engine. */
.hehku-faq__question::-webkit-details-marker {
    display: none;
}

.hehku-faq__question::marker {
    content: "";
}

.hehku-faq__question:hover {
    color: var(--primary);
}

.hehku-faq__question:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: -2px;
}

/* Chevron, drawn with borders so no icon font is needed. */
.hehku-faq__question::after {
    content: "";
    width: 9px;
    height: 9px;
    margin: 8px 2px 0 auto;
    flex: 0 0 auto;
    border-right: 2px solid var(--primary);
    border-bottom: 2px solid var(--primary);
    transform: rotate(45deg);
    transform-origin: center;
    transition: transform .2s ease;
}

.hehku-faq__item[open] > .hehku-faq__question::after {
    transform: rotate(-135deg);
    margin-top: 12px;
}

.hehku-faq__answer {
    padding: 0 20px 18px;
    color: var(--onBackground);
}

.hehku-faq__answer p {
    font: 400 16px/26px "Roboto", sans-serif;
    margin: 0 0 12px;
}

.hehku-faq__answer p:last-child {
    margin-bottom: 0;
}

.hehku-faq__answer a {
    color: var(--primary);
}

@media (prefers-reduced-motion: reduce) {
    .hehku-faq__question,
    .hehku-faq__question::after {
        transition: none;
    }
}

@media (max-width: 600px) {
    .hehku-faq {
        margin-top: 34px;
    }

    .hehku-faq__heading {
        font-size: 24px;
        line-height: 30px;
    }

    .hehku-faq__question {
        font-size: 16px;
        line-height: 24px;
        padding: 14px 16px;
    }

    .hehku-faq__answer {
        padding: 0 16px 16px;
    }
}
