/*
 * FAQ Snippets — Global Web Concepts
 *
 * Copyright (C) 2026 Global Web Concepts
 *
 * The disclosure triangle is drawn with a CSS border, not a font glyph: this
 * store carries two different Font Awesome versions and a rule that picks the
 * wrong one renders an empty box, silently. Same reasoning as the tick in
 * gwcbulletpoints and the chevrons on the checkout bar.
 *
 * The default marker is removed rather than restyled because browsers disagree
 * about what it is — a triangle, a disclosure arrow, or nothing at all — and
 * ::-webkit-details-marker does not exist in Firefox.
 */

.gwcfaq {
    margin: 2rem 0;
}

/*
 * No heading rule here on purpose: the heading uses the theme's own
 * `page-product-heading` so it matches Data Sheet, More Info and Reviews and
 * follows any future change to them. Styling it again in this file would
 * override the very thing that keeps it consistent.
 */

.gwcfaq-item {
    border-top: 1px solid #e4e6e8;
}

.gwcfaq-item:last-child {
    border-bottom: 1px solid #e4e6e8;
}

.gwcfaq-question {
    position: relative;
    display: block;
    padding: 0.85rem 2rem 0.85rem 0;
    cursor: pointer;
    font-weight: 600;
    line-height: 1.4;
    list-style: none;
}

.gwcfaq-question::-webkit-details-marker {
    display: none;
}

/* The triangle: two borders on an empty box, rotated. No font required. */
.gwcfaq-question::after {
    content: "";
    position: absolute;
    right: 6px;
    top: 50%;
    width: 8px;
    height: 8px;
    margin-top: -6px;
    border-right: 2px solid #8c949c;
    border-bottom: 2px solid #8c949c;
    transform: rotate(45deg);
    transition: transform 0.15s ease;
}

.gwcfaq-item[open] > .gwcfaq-question::after {
    transform: rotate(-135deg);
    margin-top: -2px;
}

.gwcfaq-question:focus-visible {
    outline: 2px solid #166b3a;
    outline-offset: 2px;
}

.gwcfaq-answer {
    padding: 0 2rem 1rem 0;
    line-height: 1.55;
}

.gwcfaq-answer > :first-child { margin-top: 0; }
.gwcfaq-answer > :last-child  { margin-bottom: 0; }

/*
 * Printing collapses nothing: a printed FAQ with every answer hidden behind a
 * triangle is a page of questions and no answers.
 */
@media print {
    .gwcfaq-item > .gwcfaq-answer { display: block !important; }
    .gwcfaq-question::after { content: none; }
}
