/**
 * Entity Schema - FAQ Frontend Styles
 * Three display styles: accordion (with expand/collapse), list (all answers visible),
 * and minimal. Dynamic colors are injected from PHP via wp_add_inline_style().
 */

/* Base Container */
.entisc-faq-container {
    margin: 20px 0;
}

/* Section Headings - visually separate groups of FAQs.
   No font-size: renders at the theme's H2 size, matching the theme-
   inherited question headings below it (h2 > h3/h4 in any sane theme
   scale, so hierarchy comes from the theme, not the plugin). */
.entisc-faq-section-heading {
    margin: 30px 0 15px 0;
    padding-bottom: 10px;
    font-weight: 600;
}
.entisc-faq-section-heading:first-child {
    margin-top: 0;
}

/* ============================================
   ACCORDION STYLE (Default)
   ============================================ */
.entisc-faq-style-accordion .entisc-faq-item {
    margin-bottom: 10px;
    border-radius: 4px;
    overflow: hidden;
}
/* Heading wrapper around the accordion toggle button (ARIA APG pattern).
   Questions are natural-language sentences, so theme heading transforms
   (uppercase, wide tracking) are normalized away — but font-size is
   deliberately NOT set, so the theme's heading size applies. */
.entisc-faq-style-accordion .entisc-faq-heading {
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    font-weight: 600;
    font-family: inherit;
    line-height: normal;
    letter-spacing: normal;
    text-transform: none;
    color: inherit;
}
/* font-size/font-family: inherit — buttons do NOT inherit typography from
   the UA stylesheet (~13px system font), so pull the themed size/family
   down from the wrapping heading explicitly. */
.entisc-faq-style-accordion .entisc-faq-question {
    width: 100%;
    padding: 15px 20px;
    border: none;
    text-align: left;
    font-size: inherit;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}
.entisc-faq-style-accordion .entisc-faq-question-text {
    flex: 1;
    padding-right: 15px;
}
.entisc-faq-style-accordion .entisc-faq-icon {
    font-size: 24px;
    line-height: 1;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}
.entisc-faq-style-accordion .entisc-faq-question[aria-expanded="true"] .entisc-faq-icon {
    transform: rotate(45deg);
}
.entisc-faq-style-accordion .entisc-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.entisc-faq-style-accordion .entisc-faq-answer[aria-hidden="false"] {
    max-height: 2000px;
}
.entisc-faq-style-accordion .entisc-faq-answer-content {
    padding: 20px;
}

/* ============================================
   Common styles for all FAQ content
   ============================================ */
.entisc-faq-answer-content p:first-child {
    margin-top: 0;
}
.entisc-faq-answer-content p:last-child {
    margin-bottom: 0;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .entisc-faq-style-accordion .entisc-faq-question {
        padding: 12px 15px;
    }
    .entisc-faq-style-accordion .entisc-faq-answer-content {
        padding: 15px;
    }
}
/* ============================================
   LIST STYLE - All answers visible
   ============================================ */
.entisc-faq-style-list .entisc-faq-item {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #e0e0e0;
}
.entisc-faq-style-list .entisc-faq-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.entisc-faq-style-list .entisc-faq-question {
    display: block;
    width: 100%;
    padding: 0 0 10px 0;
    background: none;
    border: none;
    text-align: left;
    font-weight: 700;
    cursor: default;
    margin: 0;
    /* Questions are natural-language sentences: normalize theme heading
       transforms/tracking, but leave font-size to the theme's heading
       styles for the chosen hN level. */
    font-family: inherit;
    line-height: normal;
    letter-spacing: normal;
    text-transform: none;
    color: inherit;
}
.entisc-faq-style-list .entisc-faq-icon {
    display: none;
}
.entisc-faq-style-list .entisc-faq-answer {
    max-height: none;
    overflow: visible;
    transition: none;
    display: block !important; /* TODO: Remove in v2.5.0 — safety net for button→heading transition (list markup no longer emits `hidden`) */
}
.entisc-faq-style-list .entisc-faq-answer-content {
    padding: 0;
    background: none;
    line-height: 1.6;
}

/* ============================================
   MINIMAL STYLE - Very clean, simple
   ============================================ */
.entisc-faq-style-minimal .entisc-faq-item {
    margin-bottom: 20px;
}
.entisc-faq-style-minimal .entisc-faq-question {
    display: block;
    width: 100%;
    padding: 0 0 8px 0;
    background: none;
    border: none;
    text-align: left;
    font-weight: 600;
    cursor: default;
    margin: 0;
    /* Questions are natural-language sentences: normalize theme heading
       transforms/tracking, but leave font-size to the theme's heading
       styles for the chosen hN level. */
    font-family: inherit;
    line-height: normal;
    letter-spacing: normal;
    text-transform: none;
    color: inherit;
}
.entisc-faq-style-minimal .entisc-faq-icon {
    display: none;
}
.entisc-faq-style-minimal .entisc-faq-answer {
    max-height: none;
    overflow: visible;
    transition: none;
    display: block !important; /* TODO: Remove in v2.5.0 — safety net for button→heading transition (minimal markup no longer emits `hidden`) */
}
.entisc-faq-style-minimal .entisc-faq-answer-content {
    padding: 10px 0 0 0;
    background: none;
    line-height: 1.7;
}
