/* Schema Manager — FAQ Accordion Frontend */

.sm-faq-accordion {
    margin: 2.5rem 0;
    font-family: inherit;
}

.sm-faq-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: inherit;
}

.sm-faq-item {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
    transition: box-shadow .2s ease;
}

.sm-faq-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.sm-faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    background: #fff;
    border: none;
    cursor: pointer;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    color: #1a202c;
    line-height: 1.5;
    transition: background .15s;
}

.sm-faq-question:hover {
    background: #f7fafc;
}

.sm-faq-question[aria-expanded="true"] {
    background: #f7fafc;
    border-bottom: 1px solid #e2e8f0;
}

/* Plus / Minus icon */
.sm-faq-icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #2271b1;
    position: relative;
    transition: transform .25s ease, background .15s;
}

.sm-faq-icon::before,
.sm-faq-icon::after {
    content: '';
    position: absolute;
    background: #fff;
    border-radius: 2px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.sm-faq-icon::before { width: 10px; height: 2px; }
.sm-faq-icon::after  { width: 2px; height: 10px; transition: transform .25s ease, opacity .25s; }

.sm-faq-question[aria-expanded="true"] .sm-faq-icon {
    background: #1a5f9e;
}
.sm-faq-question[aria-expanded="true"] .sm-faq-icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
    opacity: 0;
}

/* Answer panel */
.sm-faq-answer {
    overflow: hidden;
    transition: max-height .3s ease;
}

.sm-faq-answer-inner {
    padding: 16px 18px;
    color: #4a5568;
    font-size: .95rem;
    line-height: 1.7;
    background: #fff;
}

/* RTL support */
[dir="rtl"] .sm-faq-question {
    text-align: right;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    .sm-faq-item                      { border-color: #2d3748; }
    .sm-faq-question                  { background: #1a202c; color: #e2e8f0; }
    .sm-faq-question:hover,
    .sm-faq-question[aria-expanded="true"] { background: #2d3748; }
    .sm-faq-question[aria-expanded="true"] { border-bottom-color: #4a5568; }
    .sm-faq-answer-inner              { background: #1a202c; color: #cbd5e0; }
}

/* When question is wrapped in a heading tag */
.sm-faq-question-heading {
    margin: 0;
    padding: 0;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
}
.sm-faq-question-heading .sm-faq-question {
    width: 100%;
}

/* Reset any theme styles bleeding into the FAQ h3 */
.sm-faq-accordion .sm-faq-question-heading {
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    color: inherit !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    line-height: inherit !important;
}
.sm-faq-accordion .sm-faq-question-heading:hover,
.sm-faq-accordion .sm-faq-question-heading:focus,
.sm-faq-accordion .sm-faq-question-heading:active,
.sm-faq-accordion .sm-faq-question-heading.active {
    background: transparent !important;
    color: inherit !important;
}

/* Override theme reset.css button:hover / button:focus styles */
.sm-faq-accordion .sm-faq-question:hover,
.sm-faq-accordion .sm-faq-question:focus,
.sm-faq-accordion .sm-faq-question:active {
    background-color: inherit !important;
    color: inherit !important;
    text-decoration: none !important;
    outline: none !important;
}


/* Keep long FAQ questions readable on small screens */
.sm-faq-question {
    max-width: 100%;
    box-sizing: border-box;
    min-width: 0;
}
.sm-faq-question > span:first-child {
    flex: 1 1 auto;
    min-width: 0;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
}
.sm-faq-question .sm-faq-icon {
    flex: 0 0 22px;
}

@media (max-width: 600px) {
    .sm-faq-question {
        align-items: flex-start;
        padding: 14px 12px;
        gap: 10px;
        line-height: 1.65;
    }
    .sm-faq-question > span:first-child {
        display: block;
    }
}
