/* ==========================================================================
   FAQ page styles.

   EVERY rule in this file is scoped to .pm-faq, the wrapper <div> around the
   page body in faq.php. This matters: lawyers.php reuses the same .faq__acc
   and .faq__tabs classes and is styled by scss/pages/_faq.scss (compiled into
   main.css). Nothing here may leak into that page, so never write a bare
   .faq__acc / .card / .card-body selector below - always prefix with .pm-faq.

   The base look still comes from main.css. This file only:
     1. drops the "?" glyph and replaces it with a chevron toggle
     2. tightens row padding (36 questions per tab is a long scroll)
     3. adds the category label rows and the search box
     4. adds visible keyboard focus
   ========================================================================== */


/* --------------------------------------------------------------------------
   1. Accordion rows - tighter rhythm, no "?" icon
   -------------------------------------------------------------------------- */

/* Base is `padding: 20px 70px; margin-bottom: 30px` - the 70px left inset only
   existed to make room for the "?" glyph, which we remove below. */
.pm-faq .faq__acc .card {
    padding: 16px 26px;
    margin-bottom: 10px;
    border-radius: 4px;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.12);
}

.pm-faq .faq__acc .card > h5 {
    position: relative;
    padding-right: 30px;
    font-size: 17px;
    line-height: 1.45;
}

/* Kill the FontAwesome "\f059" question mark from _faq.scss. */
.pm-faq .faq__acc .card > h5:before {
    content: none;
}

/* ...and replace it with a chevron on the right that flips when open.
   Drawn in pure CSS rather than FontAwesome: the base rule uses FA4 syntax
   (`font: ... FontAwesome`) while the site now loads FA6, so icon fonts are
   unreliable here. */
.pm-faq .faq__acc .card > h5:after {
    content: "";
    position: absolute;
    right: 4px;
    top: 50%;
    width: 9px;
    height: 9px;
    border-right: 2px solid #7dc43b;
    border-bottom: 2px solid #7dc43b;
    transform: translateY(-70%) rotate(45deg);
    transition: transform 0.25s ease;
}

.pm-faq .faq__acc .card > h5:not(.collapsed):after {
    transform: translateY(-25%) rotate(-135deg);
}

.pm-faq .faq__acc .card > h5:hover {
    color: #7dc43b;
}

/* Keyboard focus. The headers are role="button" tabindex="0", so they must
   show where focus is. :focus-visible keeps the ring off mouse clicks. */
.pm-faq .faq__acc .card > h5:focus {
    outline: none;
}

.pm-faq .faq__acc .card > h5:focus-visible {
    outline: 2px solid #7dc43b;
    outline-offset: 4px;
    border-radius: 2px;
}

.pm-faq .faq__acc .card .card-body {
    padding-top: 18px;
    margin-top: 14px;
}


/* --------------------------------------------------------------------------
   2. Answer body copy

   Replaces the unscoped <style> block that used to sit at the top of faq.php
   (it targeted a bare .card-body). `padding: 0` there also clipped the bullets.
   -------------------------------------------------------------------------- */
.pm-faq .faq__acc .card-body p {
    margin-bottom: 14px;
}

.pm-faq .faq__acc .card-body p:last-child {
    margin-bottom: 0;
}

.pm-faq .faq__acc .card-body ul,
.pm-faq .faq__acc .card-body ol {
    margin: 0 0 14px;
    padding-left: 20px;
}

.pm-faq .faq__acc .card-body ul:last-child,
.pm-faq .faq__acc .card-body ol:last-child {
    margin-bottom: 0;
}

.pm-faq .faq__acc .card-body li {
    list-style: disc;
    margin-bottom: 7px;
    padding: 0;
}

.pm-faq .faq__acc .card-body ol li {
    list-style: decimal;
}

.pm-faq .faq__acc .card-body li:last-child {
    margin-bottom: 0;
}


/* --------------------------------------------------------------------------
   3. Category label rows ("Getting Started", etc.)

   Plain label between question groups - deliberately not a redesign.
   -------------------------------------------------------------------------- */
.pm-faq__group {
    margin: 34px 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e3edf2;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: #7dc43b;
}

.pm-faq__group:first-child {
    margin-top: 6px;
}


/* --------------------------------------------------------------------------
   4. Search / filter box
   -------------------------------------------------------------------------- */
/* 30px top gap matches the .faq__acc rhythm in main.css - without it the box
   sits flush against the For Innovators / For Clients tabs. */
.pm-faq__search {
    position: relative;
    margin-top: 30px;
    margin-bottom: 6px;
}

.pm-faq__search input {
    width: 100%;
    padding: 13px 44px 13px 16px;
    border: 1px solid #cfe6ef;
    border-radius: 4px;
    background-color: #f8fcfe;
    font-size: 15px;
    color: inherit;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.pm-faq__search input::placeholder {
    color: #90a4ae;
}

.pm-faq__search input:focus {
    outline: none;
    border-color: #7dc43b;
    background-color: #ffffff;
}

/* Magnifier. Inline SVG rather than a CSS-drawn circle + box-shadow handle -
   the box-shadow approach rendered as a blob rather than a clean glyph. */
.pm-faq__search:after {
    content: "";
    position: absolute;
    top: 50%;
    right: 16px;
    width: 17px;
    height: 17px;
    margin-top: -8px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2390a4ae' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cline x1='15.5' y1='15.5' x2='20.5' y2='20.5'/%3E%3C/svg%3E") no-repeat center;
    background-size: 17px 17px;
    pointer-events: none;
}

/* Shown by faq.php's filter script when a query matches nothing. */
.pm-faq__noresults {
    display: none;
    padding: 34px 4px;
    text-align: center;
    color: #78909c;
}


/* --------------------------------------------------------------------------
   5. Closing contact block
   -------------------------------------------------------------------------- */
.pm-faq__contact {
    margin-top: 34px;
    padding: 26px 30px;
    border-left: 3px solid #7dc43b;
    background-color: #f3fafd;
    border-radius: 3px;
}

.pm-faq__contact p {
    margin-bottom: 10px;
}

.pm-faq__contact p:last-child {
    margin-bottom: 0;
}

.pm-faq__contact strong {
    font-weight: 600;
}

.pm-faq__contact a {
    color: #7dc43b;
}


/* --------------------------------------------------------------------------
   6. Small screens

   Breakpoints match the site's own scale (scss/helpers/_mixins.scss):
   ipad 991px, mobile 767px, mobile-s 479px.

   Measured across 320-1024px: the page body never overflows horizontally.
   (The one overflow at ~1024px comes from the header's .sm__icon social strip,
   which is site-wide and outside this page's scope.)
   -------------------------------------------------------------------------- */

/* Tablet - the two tabs are still side by side here, so only the question
   rows need easing in. */
@media only screen and (max-width: 991px) {
    .pm-faq .faq__acc .card {
        padding: 15px 22px;
    }

    .pm-faq__group {
        margin-top: 28px;
    }
}

@media only screen and (max-width: 767px) {
    .pm-faq .faq__acc .card {
        padding: 14px 18px;
    }

    .pm-faq .faq__acc .card > h5 {
        font-size: 16px;
        padding-right: 24px;
    }

    /* The tabs stack below 768px and were 191px tall each - 382px of chrome
       before the first question. Trim the padding and icon so the questions
       are reachable without a long scroll. */
    .pm-faq .faq__tabs .nav-link {
        padding: 18px 15px;
    }

    .pm-faq .faq__tabs .nav-link img {
        height: 42px;
        margin-bottom: 12px;
    }

    .pm-faq .faq__tabs .nav-link h3 {
        font-size: 20px;
    }

    .pm-faq__search {
        margin-top: 20px;
    }

    /* 16px minimum: iOS Safari zooms the page in when a focused input is
       smaller than this. */
    .pm-faq__search input {
        font-size: 16px;
    }

    .pm-faq__group {
        margin-top: 24px;
    }

    .pm-faq__contact {
        padding: 20px 18px;
    }
}

@media only screen and (max-width: 479px) {
    .pm-faq .faq__acc .card {
        padding: 13px 15px;
    }

    .pm-faq .faq__acc .card > h5 {
        font-size: 15.5px;
        padding-right: 22px;
    }

    .pm-faq .faq__tabs .nav-link {
        padding: 14px 12px;
    }

    .pm-faq .faq__tabs .nav-link img {
        height: 36px;
        margin-bottom: 10px;
    }

    .pm-faq .faq__tabs .nav-link h3 {
        font-size: 18px;
    }

    .pm-faq__contact {
        padding: 18px 15px;
    }
}