/* ---------------------------------------------------------------------------
 * Product FAQ - "[Product] questions, answered"
 *
 * Split out of product-enhanced.css on 2026-08-09 so it can load on every
 * treatment product, not just the three enhanced ones. That file also styles
 * the hero, trust rows, dose tables and journey timeline, none of which the
 * other fifteen products have.
 *
 * Two presentations of the same content, and only ever one at a time:
 *   >= 900px  a two-column tab layout, built by js/product-faq.js
 *   <  900px  a stack of disclosure cards, which is also what the server sends
 *             and what a scriptless browser gets
 *
 * The tab rules below are unchanged from the original apart from dropping the
 * `.ps-enhanced-product` prefix, which scoped them to a body class only three
 * products carry. The card rules are restyled to the shared accordion tokens
 * so they match the nine .ps-accordion instances elsewhere on the site.
 * ------------------------------------------------------------------------- */

/* The --ps-* set is defined by product-enhanced.css on the .ps-enhanced-product
 * body class, which the other fifteen products do not have. Same values,
 * scoped to this section so they resolve everywhere it renders. */
.ps-faq {
    --ps-ink: #14142B;
    --ps-muted: #5b6182;
    --ps-line: #e4e6f0;
    --ps-tint: #F5F6FB;
    --ps-accent: #3a52f7;
    --ps-accent-soft: #E7E9FC;

    /* Astra floats the gallery and summary inside div.product, so without an
     * explicit clear this section renders on top of them. */
    clear: both;

    /* And where div.product is a flex container - which the enhanced CSS makes
     * it - a flex item shrinks to its content instead of filling the row. This
     * is the rule whose absence left the BMI calculator at 55% width. Inert in
     * a non-flex context, so it is safe on all eighteen. */
    flex: 0 0 100%;
    width: 100%;

    padding: 56px 0;
    border-top: 1px solid var(--ps-line);
}

/* Mirrors .ps-sec h2 / .ps-wrap from product-enhanced.css at identical values,
 * so the three enhanced pages are unchanged and the other fifteen match them. */
.ps-faq .ps-wrap {
    width: 100%;
    max-width: 1460px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.ps-faq h2 {
    font-size: 30px;
    line-height: 1.25;
    font-weight: 700;
    color: var(--ps-ink);
    margin: 0 0 10px;
    letter-spacing: -.4px;
}

/* ---------------------------------------------------------------- cards
 * Shown below 900px, and whenever the script has not run. Restyled to the
 * shared accordion tokens: card, hover border, circular badge, and a plus that
 * becomes a MINUS on open rather than rotating into a cross - this was the last
 * accordion on the site still showing a cross.
 * --------------------------------------------------------------------- */

.ps-faq-list {
    margin-top: 22px;
}

.ps-faq-item {
    background: var(--ps-acc-bg);
    border: var(--ps-acc-border-w) solid var(--ps-acc-border);
    border-radius: var(--ps-acc-radius);
    box-shadow: var(--ps-acc-shadow);
    margin-bottom: 10px;
    overflow: hidden;
    transition: border-color var(--ps-acc-speed), box-shadow var(--ps-acc-speed);
}

.ps-faq-item:hover {
    border-color: var(--ps-acc-accent);
    box-shadow: var(--ps-acc-shadow-hover);
}

.ps-faq-item[open] {
    border-color: var(--ps-acc-accent);
}

.ps-faq-item > summary {
    list-style: none;
    cursor: pointer;
    /* Right padding reserves the badge's column so a long question never runs
     * underneath it. */
    padding: 20px 72px 20px 25px;
    position: relative;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.4;
    color: #07103C;
}

.ps-faq-item > summary::-webkit-details-marker {
    display: none;
}

.ps-faq-item > summary:focus-visible {
    outline: 2px solid var(--ps-acc-accent);
    outline-offset: 3px;
    border-radius: 4px;
}

.ps-faq-mark {
    position: absolute;
    right: 20px;
    top: 50%;
    width: var(--ps-acc-icon-size);
    height: var(--ps-acc-icon-size);
    margin-top: calc(var(--ps-acc-icon-size) / -2);
    border-radius: 100px;
    background: var(--ps-acc-icon-bg);
    transition: background-color var(--ps-acc-speed);
}

.ps-faq-mark::before,
.ps-faq-mark::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    border-radius: 1px;
    background: var(--ps-acc-accent);
    transition: background-color var(--ps-acc-speed), opacity var(--ps-acc-speed);
}

.ps-faq-mark::before {
    width: var(--ps-acc-glyph);
    height: 2px;
    margin: -1px 0 0 calc(var(--ps-acc-glyph) / -2);
}

.ps-faq-mark::after {
    width: 2px;
    height: var(--ps-acc-glyph);
    margin: calc(var(--ps-acc-glyph) / -2) 0 0 -1px;
}

/* Open: solid accent circle, white glyph, and the upright bar is dropped so a
 * plus becomes a minus. Keyed to [open] - the native state attribute - never
 * to the wording. */
.ps-faq-item[open] .ps-faq-mark {
    background: var(--ps-acc-accent);
}

.ps-faq-item[open] .ps-faq-mark::before {
    background: #ffffff;
}

.ps-faq-item[open] .ps-faq-mark::after {
    opacity: 0;
}

.ps-faq-body {
    padding: 0 25px 20px;
}

.ps-faq-body p {
    font-size: 15px;
    line-height: 25px;
    color: #1A3C34;
    margin: 0;
    max-width: 78ch;
}

/* Marks an answer that has not been written yet. Deliberately conspicuous: on
 * a pharmacy page, unwritten copy must never read as advice. Remove nothing -
 * the marker disappears on its own once real copy replaces the placeholder in
 * ps_product_faqs(). */
.ps-faq-todo {
    display: inline-block;
    margin-right: 6px;
    padding: 2px 9px;
    border-radius: 100px;
    background: #FFF3D6;
    border: 1px solid #E8C670;
    color: #7A5A00;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .2px;
    text-transform: uppercase;
    vertical-align: 1px;
}

@media (max-width: 767px) {
    /* Mirrors the .ps-sec / .ps-sec h2 shrink in product-enhanced.css so the
     * three enhanced products are unchanged and the other fifteen match. */
    .ps-faq {
        padding: 40px 0;
    }

    .ps-faq h2 {
        font-size: 24px;
    }

    .ps-faq-item > summary {
        font-size: 16px;
        padding: 18px 62px 18px 18px;
    }

    .ps-faq-mark {
        right: 15px;
    }

    .ps-faq-body {
        padding: 0 18px 18px;
    }
}

/* ----------------------------------------------------------------- tabs
 * Wide screens only. Unchanged from the original beyond dropping the
 * `.ps-enhanced-product` prefix.
 * --------------------------------------------------------------------- */

.ps-faq-tabs[hidden],
.ps-faq-list[hidden] {
    display: none;
}

.ps-faq-tabs {
    display: grid;
    grid-template-columns: minmax(220px, 300px) 1fr;
    border: 1px solid var(--ps-line);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.ps-faq-rail {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px;
    background: var(--ps-tint);
    border-right: 1px solid var(--ps-line);
}

.ps-faq-tab {
    /* Astra styles bare buttons; every property it sets has to be answered
     * here or the tabs inherit a dark pill. */
    appearance: none;
    -webkit-appearance: none;
    display: block;
    width: 100%;
    margin: 0;
    text-align: left;
    font: inherit;
    font-size: 15px;
    line-height: 1.4;
    padding: 12px 14px;
    border: 0;
    border-left: 3px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--ps-muted);
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}

.ps-faq-tab:hover,
.ps-faq-tab:focus {
    background: #fff;
    color: var(--ps-ink);
}

.ps-faq-tab:focus-visible {
    outline: 2px solid var(--ps-accent);
    outline-offset: -2px;
}

.ps-faq-tab.is-active,
.ps-faq-tab[aria-selected="true"] {
    background: #fff;
    color: var(--ps-ink);
    font-weight: 600;
    border-left-color: var(--ps-accent);
    box-shadow: 0 1px 2px rgba(20, 20, 43, .06);
}

.ps-faq-panels {
    padding: 30px 34px;
}

.ps-faq-panel[hidden] {
    display: none;
}

.ps-faq-panel:focus-visible {
    outline: 2px solid var(--ps-accent);
    outline-offset: 4px;
}

.ps-faq-panel-title {
    margin: 0 0 14px;
    font-size: 21px;
    line-height: 1.3;
    color: var(--ps-ink);
}

.ps-faq-panel .ps-faq-body {
    color: var(--ps-muted);
    font-size: 17px;
    line-height: 1.75;
}

.ps-faq-panel .ps-faq-body p {
    margin: 0 0 16px;
    max-width: 70ch;
    font-size: inherit;
    line-height: inherit;
}

.ps-faq-panel .ps-faq-body li {
    margin-bottom: 8px;
    line-height: inherit;
}

.ps-faq-panel .ps-faq-body p:last-child {
    margin-bottom: 0;
}

@media (max-width: 899px) {
    /* Belt and braces: if the script never runs, the tab block is not in the
     * document at all; if it ran and the viewport then narrowed, JS re-hides
     * it. This covers the gap between those two. */
    .ps-faq-tabs {
        display: none;
    }
}
