.acf-faq-search-bar {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;;
    gap: 3rem;
    margin-bottom: 3rem;
}

/* new wrapper for icon + input */
.acf-faq-search-input-wrap {
    position: relative;
    width:100%;
    max-width:600px;
    margin:auto;
}

/* the input itself */
.acf-faq-search-input {
    width: 100%;
    padding: 8px 10px 8px 50px!important;
    font-size: 16px;
    width:100%;
    border-radius: 4rem;
}
.acf-faq-search-input::placeholder{
    color:#ababab;
}

/* the magnifier icon */
.acf-faq-search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    pointer-events: none; /* click goes to input */
}

.acf-faq-search-icon svg {
    width: 14px;
    height: 14px;
    fill: #454576;
}


.acf-faq-clear-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color:var(--link-color);
    font-weight:600;
    text-decoration: underline;
    background:none;
    outline:none;
}

.acf-faq-search-meta{
    display:flex;
    flex-wrap:wrap;
    gap:2rem;
    justify-content: center;
    align-items: center;
}

/* Add trash icon after the clear button text */
.acf-faq-clear-btn::after {
    content: "";
    width: 20px;
    height: 20px;
    background-color: currentColor;

    -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><g fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'><path d='M3 6h18'/><path d='M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2'/><path d='M19 6l-1 13a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6'/><path d='M10 11v6M14 11v6'/></g></svg>");
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;

    mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><g fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'><path d='M3 6h18'/><path d='M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2'/><path d='M19 6l-1 13a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6'/><path d='M10 11v6M14 11v6'/></g></svg>");
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
}



/* Category bar */
.acf-faq-categories {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.acf-faq-category-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.acf-faq-cat-btn,
.acf-faq-category-select-wrap select
{
    border: 1px solid transparent;
    background: #fff;
    padding: 1rem 1.6rem;
    cursor: pointer;
    border-radius: 3px;
    box-shadow: 0 1px 3px 0 rgba(0,0,0,0.3);
    border-radius:4rem;
}
.acf-faq-cat-btn:focus,
.acf-faq-category-select-wrap select:focus,
.acf-faq-show-all:focus
{
    box-shadow: 0 1px 3px 0 rgba(0,0,0,0.3)!important;
}


.acf-faq-cat-btn:hover,
.acf-faq-category-select-wrap select:hover,
.acf-faq-show-all:hover{
    box-shadow: 0 1px 6px 0 rgba(0,0,0,0.4);
}



/* 1. Hide native arrow */
.acf-faq-category-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 32px; /* space for custom arrow */
    background: none;
    line-height: initial!important;
}

.acf-faq-category-select::-ms-expand {
    display: none; /* old IE/Edge */
}

/* 2. Position wrapper + custom SVG arrow */
.acf-faq-category-select-wrap {
    position: relative;
    display: inline-block;
}

.acf-faq-category-select-wrap::after {
    content: "";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    pointer-events: none;

    background: no-repeat center center;
    background-size: 24px 24px;
    /* inline SVG as background image (note: # -> %23) */
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' height='30' width='30' viewBox='0 0 24 24'><path d='M0 0h24v24H0V0z' fill='none'/><path d='M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z' fill='%23454576'/></svg>");
}


.acf-faq-cat-btn.is-active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}


/* Results & accordions */


.acf-faq-results{
    margin-top:7rem;
    max-width:1000px;
    margin-left:auto;
    margin-right:auto;
}

.acf-faq-category-block{
    margin-bottom:7rem;
}

.acf-faq-category-block + .acf-faq-category-block {
    margin-top: 32px;
}

.acf-faq-category-title {
  text-transform: uppercase;
  font-size: 1.95em;
  text-align: center;
  line-height: 1.4em;
  letter-spacing: 0.025em;
  font-weight:500;
  color:var(--accent);
  margin-bottom:3rem;
}

.acf-faq-show-all {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    margin-right: auto;
    margin-top: -2rem;
    margin-bottom:4rem;
    box-shadow: 0 1px 3px 0 rgba(0,0,0,0.3);
    background: #fff;
    border-radius: 4rem;
    padding: 6px 14px;
    border: none;
    cursor: pointer;
}

/* arrow icon after the text */
.acf-faq-show-all::after {
    content: "";
    width: 18px;
    height: 18px;
    background-color: currentColor;

    -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' height='30' width='30' viewBox='0 0 24 24'><path d='M0 0h24v24H0V0z' fill='none'></path><path d='M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z' fill='%23454576'></path></svg>");
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;

    mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' height='30' width='30' viewBox='0 0 24 24'><path d='M0 0h24v24H0V0z' fill='none'></path><path d='M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z' fill='%23454576'></path></svg>");
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
}


/* .acf-faq-item + .acf-faq-item {
    border-top: 1px solid #eee;
} */

.acf-faq-item{
    margin-top:2rem;
    margin-bottom:2rem;
    background:#fff;
    padding:0 2rem;
}

.acf-faq-question {
    width: 100%;
    text-align: left;
    padding: 10px 0;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.acf-faq-question-text {
    color: var(--fr-text-dark);
    margin-right: 10px;
    font-weight:500;
}

.acf-faq-arrow svg {
    transition: transform 0.2s ease;
}

.acf-faq-question.is-open .acf-faq-arrow svg {
    transform: rotate(180deg);
}


.acf-faq-answer {
    padding: 0 0 12px;
}

.acf-faq-no-results {
    font-style: italic;
}

/* Loading state */
.acf-faq-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px 0;
    font-size: 14px;
    color: #555;
}

.acf-faq-loading-spinner {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 4px solid #ddd;
    border-top-color: #454576;
    animation: acf-faq-spin 0.6s linear infinite;
    flex-shrink: 0;
}

@keyframes acf-faq-spin {
    to {
        transform: rotate(360deg);
    }
}

