/* ============================================================
   WooCommerce Product FAQs – Frontend styles
   Matches the card-based accordion design with blue left-border
   on expanded items. Easily overridable via Divi custom CSS.
   ============================================================ */

.wc-product-faqs {
    margin: -5% 0 5%;
}

.wc-product-faqs__title {
    font-size: 1.5em;
    margin-bottom: 0.75em;
}

/* ── FAQ list: vertical stack with gap ───────────────────────
   Each item is its own card, separated by whitespace          */

.wc-product-faqs__list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ── Individual item card ─────────────────────────────────── */

.wc-product-faqs__item {
    border: 1px solid #151E9C;
    border-radius: 0;
    overflow: hidden;
    color: #151E9C;
}

/* Blue left accent when the item is open */
.wc-product-faqs__item.is-open {
    border-color: black;
}

/* ── Heading wrapper (h2–h6) ──────────────────────────────────
   The semantic heading wraps the button per the WAI-ARIA
   Accordion pattern. Reset all heading styles so it acts as
   a neutral container — all visual styling lives on the button. */

.wc-product-faqs__heading {
    margin: 0;
    padding: 0;
    font-size: 1.25em;
    font-weight: inherit;
    line-height: inherit;
    border: none;
    background: none;
}

/* ── Question button ──────────────────────────────────────── */

.wc-product-faqs__question {
    /* Reset browser button styles */
    all: unset;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 18px 20px;
    font-size: 1em;
    font-weight: 600;
    color: #2d3a8c;                        /* navy */
    cursor: pointer;
    line-height: 1.4;
}

.wc-product-faqs__question:focus-visible {
    outline: 2px solid #2d3a8c;
    outline-offset: -2px;
}

/* ── Chevron icon (SVG via CSS) ───────────────────────────── */

.wc-product-faqs__icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    margin-left: 16px;
    border: 1.5px solid #9ba8cc;
    border-radius: 50%;
    position: relative;
    transition: border-color 0.2s ease;
}

/* The chevron arrow — drawn with a rotated pseudo-element */
.wc-product-faqs__icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 7px;
    height: 7px;
    border-right: 2px solid #2d3a8c;
    border-bottom: 2px solid #2d3a8c;
    transform: translate( -50%, -65% ) rotate( 45deg );
    transition: transform 0.25s ease;
}

/* Flip chevron upward when expanded */
.wc-product-faqs__question[aria-expanded="true"] .wc-product-faqs__icon::before {
    transform: translate( -50%, -35% ) rotate( -135deg );
}

/* ── Answer panel ─────────────────────────────────────────── */

.wc-product-faqs__answer {
    padding: 0 20px 20px 20px;
    color: #3a3a3a;
    line-height: 1.75;
    font-size: 16px;
}

.wc-product-faqs__answer p:last-child {
    margin-bottom: 0;
}
