/* AI FAQ Generator - Frontend Styles */

.aifaq-frontend-wrap,
.aifaq-frontend-wrap *,
.aifaq-frontend-wrap *::before,
.aifaq-frontend-wrap *::after {
    font-family: inherit;
    box-sizing: border-box;
}

.aifaq-frontend-wrap {
    max-width: 800px;
    margin: 30px auto;
}

.aifaq-frontend-title {
    font-size: 22px;
    font-weight: 700;
    color: #003952;
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #003952;
}

.aifaq-accordion {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.aifaq-accordion-item {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0, 57, 82, 0.08);
    border: 1px solid #e2e8f0;
    height: auto !important;
    min-height: 0 !important;
}

/* ===== TOGGLE BUTTON ===== */
.aifaq-accordion-toggle {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px;
    padding: 14px 18px !important;
    min-height: 0 !important;
    height: auto !important;
    line-height: 1.4 !important;
    /* Kill ALL theme button background states */
    background: #ffffff !important;
    background-color: #ffffff !important;
    background-image: none !important;
    border: none !important;
    border-radius: 0 !important;
    cursor: pointer;
    text-align: left;
    /* Kill focus/active/hover dark backgrounds from themes */
    outline: none !important;
    box-shadow: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

/* Every possible state — prevent theme black/dark bg */
.aifaq-accordion-toggle:hover,
.aifaq-accordion-toggle:focus,
.aifaq-accordion-toggle:active,
.aifaq-accordion-toggle:focus-visible,
.aifaq-accordion-toggle:focus-within {
    background: #f4f7f9 !important;
    background-color: #f4f7f9 !important;
    background-image: none !important;
    color: inherit !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Open state stays white */
.aifaq-accordion-toggle[aria-expanded="true"],
.aifaq-accordion-toggle[aria-expanded="true"]:hover,
.aifaq-accordion-toggle[aria-expanded="true"]:focus,
.aifaq-accordion-toggle[aria-expanded="true"]:active {
    background: #ffffff !important;
    background-color: #ffffff !important;
    background-image: none !important;
    border-bottom: 1px solid #e2e8f0 !important;
    color: inherit !important;
    outline: none !important;
    box-shadow: none !important;
}

/* H3 question text — full theme reset */
.aifaq-question-text {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #003952 !important;
    line-height: 1.4 !important;
    flex: 1;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    display: block;
    font-family: inherit;
}

/* ===== ICON — plain +/- text, NO border, NO background ===== */
.aifaq-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    /* No background, no border — just the symbol */
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: #003952 !important;
    font-size: 22px !important;
    font-weight: 300 !important;
    line-height: 1 !important;
    flex-shrink: 0;
    user-select: none;
    padding: 0 !important;
    margin: 0 !important;
}

/* ===== ANSWER PANEL ===== */
.aifaq-accordion-content {
    overflow: hidden !important;
    background: #eaecf9 !important;
    max-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

.aifaq-accordion-content.open {
    max-height: 1200px !important;
}

.aifaq-answer-inner {
    padding: 12px 18px !important;
    font-size: 14px;
    line-height: 1.55;
    color: #003952;
    margin: 0 !important;
}

.aifaq-answer-inner > *:first-child { margin-top: 0 !important; }
.aifaq-answer-inner > *:last-child  { margin-bottom: 0 !important; }

/* Paragraphs — clear readable gap between 2-sentence blocks */
.aifaq-answer-inner p {
    margin: 0 0 12px !important;
    line-height: 1.6;
}
.aifaq-answer-inner p:last-child { margin-bottom: 0 !important; }

/* Paragraph immediately before a list — no extra gap */
.aifaq-answer-inner p + ul,
.aifaq-answer-inner p + ol {
    margin-top: 4px !important;
}

/* Lists — tight, no big vertical space */
.aifaq-answer-inner ul,
.aifaq-answer-inner ol {
    margin: 4px 0 7px 18px !important;
    padding: 0 !important;
}
.aifaq-answer-inner ul:last-child,
.aifaq-answer-inner ol:last-child {
    margin-bottom: 0 !important;
}

/* List items — no big gaps between bullets */
.aifaq-answer-inner li {
    margin-bottom: 3px !important;
    line-height: 1.5;
    padding-left: 2px;
}
.aifaq-answer-inner li:last-child { margin-bottom: 0 !important; }

/* Paragraph after a list */
.aifaq-answer-inner ul + p,
.aifaq-answer-inner ol + p {
    margin-top: 7px !important;
}

/* ================================================================
   10 ANIMATION CLASSES
================================================================ */
[data-animation="slide"]       .aifaq-accordion-content { transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1); }
[data-animation="fade"]        .aifaq-accordion-content { transition: max-height 0.3s ease, opacity 0.3s ease; opacity: 0; }
[data-animation="fade"]        .aifaq-accordion-content.open { opacity: 1; }
[data-animation="smooth"]      .aifaq-accordion-content { transition: max-height 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); }
[data-animation="ease-in-out"] .aifaq-accordion-content { transition: max-height 0.4s ease-in-out; }
[data-animation="bounce"]      .aifaq-accordion-content { transition: max-height 0.45s cubic-bezier(0.34, 1.56, 0.64, 1); }
[data-animation="swift"]       .aifaq-accordion-content { transition: max-height 0.22s cubic-bezier(0.55, 0, 0.55, 0.2); }
[data-animation="elastic"]     .aifaq-accordion-content { transition: max-height 0.55s cubic-bezier(0.68, -0.55, 0.265, 1.55); }
[data-animation="linear"]      .aifaq-accordion-content { transition: max-height 0.35s linear; }
[data-animation="overshoot"]   .aifaq-accordion-content { transition: max-height 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
[data-animation="instant"]     .aifaq-accordion-content { transition: none; }

/* Mobile */
@media (max-width: 600px) {
    .aifaq-accordion-toggle  { padding: 12px 14px !important; }
    .aifaq-question-text     { font-size: 14px !important; }
    .aifaq-answer-inner      { padding: 12px 14px !important; font-size: 13px !important; }
    .aifaq-frontend-title    { font-size: 18px; }
    .aifaq-icon              { width: 20px !important; height: 20px !important; font-size: 20px !important; }
}
