/* ══════════════════════════════════════════
   CWC — Product FAQ Widget (front-end)
══════════════════════════════════════════ */

.cwc-faq-wrap {
    direction: rtl;
    font-family: inherit;

    --cwc-faq-accent:     #2379CE;
    --cwc-faq-q-bg:       #f7f7f7;
    --cwc-faq-q-bg-open:  #eef4fc;
    --cwc-faq-q-color:    #222222;
    --cwc-faq-a-bg:       #ffffff;
    --cwc-faq-a-color:    #444444;
    --cwc-faq-border:     #e0e0e0;
    --cwc-faq-radius:     10px;
    --cwc-faq-gap:        8px;
}

/* ── Header ── */

.cwc-faq-header {
    margin-bottom: 18px;
}

.cwc-faq-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 500;
    color: var(--cwc-faq-q-color);
}

.cwc-faq-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 22px;
    background: var(--cwc-faq-accent);
    border-radius: 2px;
    flex-shrink: 0;
}

/* ── List ── */

.cwc-faq-list {
    display: flex;
    flex-direction: column;
    gap: var(--cwc-faq-gap);
}

/* ── Item ── */

.cwc-faq-item {
    border: 1px solid var(--cwc-faq-border);
    border-radius: var(--cwc-faq-radius);
    overflow: hidden;
}

/* ── Question button ── */

.cwc-faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 16px;
    background: var(--cwc-faq-q-bg);
    border: none;
    text-align: right;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    color: var(--cwc-faq-q-color);
    gap: 12px;
    transition: background 0.18s;
}

.cwc-faq-question span:first-child {
    flex: 1;
    text-align: right;
}

.cwc-faq-item.cwc-faq-open .cwc-faq-question {
    background: var(--cwc-faq-q-bg-open);
    color: var(--cwc-faq-accent);
}

/* ── +/– icon ── */

.cwc-faq-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1.5px solid currentColor;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    color: var(--cwc-faq-accent);
    transition: transform 0.25s;
}

.cwc-faq-icon::before,
.cwc-faq-icon::after {
    content: '';
    position: absolute;
    background: currentColor;
    border-radius: 2px;
    transition: opacity 0.2s, transform 0.25s;
}

.cwc-faq-icon::before {
    width: 10px;
    height: 1.5px;
}

.cwc-faq-icon::after {
    width: 1.5px;
    height: 10px;
}

.cwc-faq-item.cwc-faq-open .cwc-faq-icon::after {
    opacity: 0;
    transform: rotate(90deg);
}

/* ── Answer ── */

.cwc-faq-answer {
    max-height: 0;
    overflow: hidden;
    background: var(--cwc-faq-a-bg);
    transition: max-height 0.3s ease;
}

.cwc-faq-item.cwc-faq-open .cwc-faq-answer {
    max-height: 600px;
}

.cwc-faq-answer-body {
    padding: 14px 16px 16px;
    font-size: 14px;
    color: var(--cwc-faq-a-color);
    line-height: 1.8;
    border-top: 1px solid var(--cwc-faq-border);
    word-break: break-word;
}
