/* ============================================
   Custom FAQ Plugin — faq-style.css
   Matches Thermolec-style accordion design
   ============================================ */

/* Reset inside wrapper */
.cfaq-wrapper *,
.cfaq-wrapper *::before,
.cfaq-wrapper *::after {
    box-sizing: border-box;
}

/* ── Wrapper ── */
.cfaq-wrapper {
    
    margin: 0 auto;
    padding: 20px 0 40px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    color: #1a1a1a;
}

/* ── Header ── */
.cfaq-header {
    margin-bottom: 18px;
}

.cfaq-header-top {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.cfaq-title {
    font-size: 3.75rem;
    font-weight: 900;
    color: #1a1a1a;
    padding: 6px 16px 6px 0;
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.01em;
    display: inline-block;
}


.cfaq-description {
    color: #444;
    margin: 0;
    line-height: 1.6;
    text-align: left;
    font-size: 1.125rem;
    margin-bottom: 3.75rem;
    margin-top: 2.5rem;
}

/* ── Filter Dropdown ── */
.cfaq-filter-wrap {
    margin-left: auto;
}

.cfaq-filter-select {
    appearance: auto;
    -webkit-appearance: auto;
    font-size: 0.95rem;
    padding: 8px 14px;
    border: 1.5px solid #888;
    border-radius: 3px;
    background: #fff;
    color: #1a1a1a;
    cursor: pointer;
    min-width: 140px;
    outline: none;
    transition: border-color 0.2s;
}

.cfaq-filter-select:focus {
    border-color: #222;
}

/* ── Dividers ── */
.cfaq-divider {
    border: none;
    border-top: 2px solid #1a1a1a;
    margin: 0 0 0 0;
}

.cfaq-item-divider {
    border: none;
    border-top: 1.5px solid #ddd;
    margin: 0;
}

/* ── FAQ List ── */
.cfaq-list {
    margin-top: 0;
}

/* ── FAQ Item ── */
.cfaq-item {
    transition: opacity 0.2s;
}

.cfaq-item.cfaq-hidden {
    display: none;
}

/* ── Question Button ── */
.cfaq-question {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    background: none;
    border: none;
    padding: 22px 8px 18px;
    cursor: pointer;
    text-align: left;
    color: #1a1a1a;
    font-family: inherit;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.4;
    transition: color 0.2s;
}

.cfaq-question[aria-expanded="true"] {
    color: #a51c1c;
}

/* Icon (gear/info svg) */
.cfaq-icon {
    flex-shrink: 0;
    margin-top: 1px;
    color: inherit;
    display: flex;
    align-items: center;
}

.cfaq-question-text {
    flex: 1;
}

/* +/− toggle */
.cfaq-toggle {
    flex-shrink: 0;
    margin-top: 1px;
    margin-left: 12px;
    color: inherit;
    display: flex;
    align-items: center;
}

.cfaq-plus  { display: block; }
.cfaq-minus { display: none;  }

.cfaq-question[aria-expanded="true"] .cfaq-plus  { display: none;  }
.cfaq-question[aria-expanded="true"] .cfaq-minus { display: block; }

/* ── Answer panel ── */
.cfaq-answer {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.32s ease;
}

.cfaq-answer-inner {
    padding: 5px 8px 22px 42px;
    font-size: 1.125rem;
    color: #333;
    line-height: 1.7;
}

.cfaq-answer-inner p:first-child { margin-top: 0; }
.cfaq-answer-inner p:last-child  { margin-bottom: 0; }

/* ── Open state (JS sets max-height inline) ── */

/* ── No results ── */
.cfaq-no-results,
.cfaq-no-match {
    padding: 24px 8px;
    color: #666;
    font-size: 0.95rem;
}

/* ── Highlighted / active category question ── */
.cfaq-question[aria-expanded="true"] .cfaq-icon {
    color: #a51c1c;
}

/* ── Responsive ── */
@media (max-width: 640px) {
    .cfaq-header-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .cfaq-filter-wrap {
        margin-left: 0;
        width: 100%;
    }

    .cfaq-filter-select {
        width: 100%;
    }

    .cfaq-title {
        font-size: 1.5rem;
    }

    .cfaq-answer-inner {
        padding-left: 8px;
    }

    .cfaq-question {
        font-size: 0.82rem;
        padding: 18px 4px 14px;
    }
}

p.wp-block-paragraph {
    text-align: left;
}

@media (max-width:767px){

    .cfaq-question{
        gap:10px;
        padding:18px 0;
        align-items:flex-start;
    }

    .cfaq-icon{
        width:20px;
        height:20px;
        margin-top:3px;
    }

    .cfaq-icon svg{
        width:20px;
        height:20px;
    }

    .cfaq-question-text{
        flex:1;
        font-size:1rem;
        line-height:1.5;
        white-space:normal;
        word-break:break-word;
    }

    .cfaq-toggle{
        width:20px;
        height:20px;
    }

    .cfaq-toggle svg{
        width:20px;
        height:20px;
    }
}

