/*
 * Storefront FAQ layout width.
 *
 * Matches TMBase/Blackwing main content (.tm-content-container / .page-main .columns):
 * max-width 96rem (1536px) + px-4 / sm:px-6. Do not use Tailwind `container`
 * (Blackwing 2xl caps it at 1400px).
 *
 * Soft-depend: the template also adds class `tm-content-container` when present.
 * Fallback rules below keep the same box without TMBase.
 * When nested inside .page-main .columns (typical Hyvä PDP), drop the outer
 * max-width/padding so we do not double-inset against the parent content box.
 */

.tm-product-faq {
    box-sizing: border-box;
    width: 100%;
    max-width: 96rem;
    margin: 64px auto;
    padding: 0 1rem; /* px-4 */
    background: #fff;
}

@media (min-width: 640px) {
    .tm-product-faq {
        padding: 0 1.5rem; /* sm:px-6 */
    }
}

.page-main .columns .tm-product-faq {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
}

.tm-product-faq__inner {
    width: 100%;
    max-width: none;
    margin: 0;
}

.tm-product-faq__header {
    width: 100%;
    max-width: none;
    margin: 0 0 34px;
    text-align: center;
}

.tm-product-faq__heading {
    margin: 0 0 14px;
    color: #111827;
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -.02em;
}

.tm-product-faq__subheading {
    max-width: 42rem;
    margin: 0 auto;
    color: #6b7280;
    font-size: 15px;
    line-height: 1.65;
}

.tm-product-faq__items {
    display: grid;
    gap: 14px;
    width: 100%;
    max-width: none;
    margin: 0;
}

.tm-product-faq__item {
    box-sizing: border-box;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(17, 24, 39, .03);
    overflow: hidden;
}

.tm-product-faq__item[open] {
    box-shadow: 0 6px 24px rgba(17, 24, 39, .06);
}

.tm-product-faq__toggle {
    box-sizing: border-box;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    padding: 21px 22px;
    border: 0;
    background: transparent;
    color: #111827;
    font: inherit;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    text-align: left;
    cursor: pointer;
    list-style: none;
}

.tm-product-faq__toggle::-webkit-details-marker {
    display: none;
}

.tm-product-faq__toggle::marker {
    content: '';
}

.tm-product-faq__toggle:focus-visible {
    outline: 2px solid #008060;
    outline-offset: -2px;
}

.tm-product-faq__question {
    flex: 1 1 auto;
    color: #111827;
}

.tm-product-faq__icon {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    color: #9ca3af;
    transition: color .2s ease, transform .2s ease;
}

.tm-product-faq__icon svg,
.tm-product-faq__chevron {
    display: block;
    width: 18px;
    height: 18px;
    max-width: 18px;
    max-height: 18px;
    flex-shrink: 0;
}

.tm-product-faq__item[open] .tm-product-faq__icon {
    color: #008060;
    transform: rotate(180deg);
}

.tm-product-faq__content {
    padding: 0 22px 22px;
}

.tm-product-faq__item[open] .tm-product-faq__content {
    padding-top: 2px;
}

.tm-product-faq__answer {
    max-width: 70rem;
    color: #6b7280;
    font-size: 15px;
    line-height: 1.7;
    padding-top: 18px;
    border-top: 1px solid #f1f5f9;
}

.tm-product-faq__answer p {
    margin: 0;
}

.tm-product-faq__support {
    margin-top: 36px;
    text-align: center;
}

.tm-product-faq__support-copy {
    margin: 0 0 14px;
    color: #6b7280;
    font-size: 15px;
}

.tm-product-faq__support-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;
    border-radius: 12px;
    background: #f3f4f6;
    color: #008060;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color .2s ease, color .2s ease;
}

.tm-product-faq__support-link:hover,
.tm-product-faq__support-link:focus-visible {
    background: #ebf8f4;
    color: #006b50;
}

.tm-product-faq__support-icon {
    width: 18px;
    height: 18px;
}

.tm-product-faq__support-icon svg,
.tm-product-faq__support-svg {
    display: block;
    width: 18px;
    height: 18px;
    max-width: 18px;
    max-height: 18px;
    flex-shrink: 0;
}

@media (max-width: 767px) {
    .tm-product-faq {
        margin: 40px auto;
    }

    .tm-product-faq__toggle {
        padding: 18px;
        font-size: 16px;
    }

    .tm-product-faq__content {
        padding: 0 18px 18px;
    }

    .tm-product-faq__answer {
        font-size: 15px;
    }
}
