/* ── OPI FAQ — Frontend styles ── */

.opi-faq-wrap {
    margin: 1.5rem 0;
}

/* ── Categoria ── */
.opi-faq-category {
    margin-bottom: 0.5rem;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,.1);
}

.opi-faq-cat-header {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.85rem 1.1rem;
    background: #29949b;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s ease;
}

.opi-faq-cat-header:hover,
.opi-faq-cat-header:focus-visible {
    background: #1f7a80;
    outline: none;
}

.opi-faq-cat-header[aria-expanded="true"] {
    background: #1f7a80;
}

.opi-faq-cat-header .bi {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.opi-faq-cat-header > span {
    flex: 1;
}

/* ── Chevron animato ── */
.opi-faq-chevron {
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.opi-faq-cat-header[aria-expanded="true"] > .opi-faq-chevron {
    transform: rotate(180deg);
}

/* ── Corpo categoria ── */
.opi-faq-cat-body {
    background: #fff;
    border: 1px solid #BED1D2;
    border-top: none;
}

/* ── Singola FAQ ── */
.opi-faq-item {
    border-bottom: 1px solid #e8eef0;
}

.opi-faq-item:last-child {
    border-bottom: none;
}

.opi-faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1.1rem;
    background: transparent;
    color: #1a1a1a;
    font-size: 0.95rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s ease, color 0.15s ease;
}

.opi-faq-question:hover,
.opi-faq-question:focus-visible {
    background: #f0f6fa;
    color: #29949b;
    outline: none;
}

.opi-faq-question[aria-expanded="true"] {
    background: #f0f6fa;
    color: #29949b;
    border-left: 3px solid #29949b;
    padding-left: calc(1.1rem - 3px);
}

.opi-faq-question[aria-expanded="true"] > .opi-faq-chevron {
    transform: rotate(180deg);
}

/* ── Risposta FAQ ── */
.opi-faq-answer {
    background: #f0f6fa;
    border-left: 3px solid #29949b;
}

.opi-faq-answer-inner {
    padding: 0.85rem 1.1rem 0.85rem 1rem;
    font-size: 0.92rem;
    line-height: 1.6;
    color: #333;
}

.opi-faq-answer-inner p:last-child {
    margin-bottom: 0;
}

/* ── Messaggio vuoto ── */
.opi-faq-empty {
    color: #666;
    font-style: italic;
}
