/* =============================================================
   StudyAML FAQ — Accordion Styles
   Design: Clean white, cyan numbered items (matching screenshot)
   Scoped with #uid prefix to prevent theme conflicts
   ============================================================= */

/* ---- GOOGLE FONT ---- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ---- WRAPPER ---- */
.saml-faq-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    border-radius: 12px;
    overflow: hidden;
    background: #f2f4f6;
    box-shadow: none;
}

/* ---- FILTERS ---- */
.saml-faq-wrapper .saml-faq-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 24px 40px;
    background: transparent;
    border-bottom: 1px solid #e0e4ea;
}

.saml-faq-wrapper .saml-faq-filter-btn {
    padding: 10px 20px;
    background: #ffffff;
    border: 1px solid #e0e4ea;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    color: #555e6d;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.saml-faq-wrapper .saml-faq-filter-btn:hover {
    border-color: #6ec1e4;
    color: #1a1a2e;
}

.saml-faq-wrapper .saml-faq-filter-btn.active {
    background: #6ec1e4;
    border-color: #6ec1e4;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(110, 193, 228, 0.3);
}

/* ---- ITEM ---- */
.saml-faq-wrapper .saml-faq-item {
    border-bottom: none;
    transition: background-color 0.25s ease;
}

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

.saml-faq-wrapper .saml-faq-item.active {
    background-color: #dff2fb;
}

/* Active trigger row also gets the blue tint */
.saml-faq-wrapper .saml-faq-item.active .saml-faq-trigger {
    background-color: #dff2fb !important;
}

/* ---- TRIGGER (row button) ---- */
.saml-faq-wrapper .saml-faq-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 26px 40px;
    min-height: 162px;
    background: transparent !important;
    border: none !important;
    cursor: pointer;
    text-align: left;
    outline: none !important;
    box-shadow: none !important;
    -webkit-appearance: none;
    appearance: none;
}

.saml-faq-wrapper .saml-faq-trigger:focus-visible {
    outline: 2px solid #6ec1e4 !important;
    outline-offset: -2px !important;
}

/* ---- NUMBER (01, 02...) ---- */
.saml-faq-wrapper .saml-faq-number {
    font-size: 48px;
    font-weight: 700;
    color: #6ec1e4;
    flex-shrink: 0;
    width: 64px;
    letter-spacing: -1px;
    line-height: 1;
}

/* ---- QUESTION TEXT ---- */
.saml-faq-wrapper .saml-faq-question {
    flex-grow: 1;
    font-size: 24px;
    font-weight: 500;
    color: #1a1a2e;
    line-height: 1.5;
    padding-right: 16px;
}

/* ---- ICON (+) ---- */
.saml-faq-wrapper .saml-faq-icon {
    flex-shrink: 0;
    font-size: 22px;
    font-weight: 400;
    color: #aab4be;
    /* Default: white circle background */
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 40px;
    border-radius: 50%;
    background-color: #ffffff;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                color 0.2s ease,
                background-color 0.2s ease;
    user-select: none;
}

/* Active: filled cyan circle, white × */
.saml-faq-wrapper .saml-faq-item.active .saml-faq-icon {
    transform: rotate(45deg);
    background-color: #6ec1e4;
    color: #ffffff;
    font-size: 24px;
    width: 40px;
    height: 40px;
    line-height: 40px;
}

/* ---- COLLAPSIBLE CONTENT ---- */
.saml-faq-wrapper .saml-faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- INNER ANSWER AREA ---- */
.saml-faq-wrapper .saml-faq-inner {
    /* Indent to align with question text (number width + gap) */
    padding: 0 40px 32px calc(64px + 32px + 40px);
}

/* ---- ANSWER TEXT ---- */
.saml-faq-wrapper .saml-faq-text {
    font-size: 16px;
    line-height: 1.75;
    color: #555e6d;
}

.saml-faq-wrapper .saml-faq-text p {
    margin: 0 0 12px;
}

.saml-faq-wrapper .saml-faq-text p:last-child {
    margin-bottom: 0;
}

.saml-faq-wrapper .saml-faq-text a {
    color: #6ec1e4;
    text-decoration: underline;
}

.saml-faq-wrapper .saml-faq-text ul,
.saml-faq-wrapper .saml-faq-text ol {
    margin: 8px 0 12px 20px;
}

.saml-faq-wrapper .saml-faq-text li {
    margin-bottom: 4px;
}

/* ---- SCRIBEHOW EMBED ---- */
.saml-faq-wrapper .saml-faq-embed {
    margin-top: 18px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e4e8ed;
}

.saml-faq-wrapper .saml-faq-embed iframe {
    display: block;
    width: 100%;
    height: 640px;
    border: none;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
    .saml-faq-wrapper .saml-faq-trigger {
        padding: 20px 20px;
        gap: 16px;
    }

    .saml-faq-wrapper .saml-faq-filters {
        padding: 20px;
    }
    
    .saml-faq-wrapper .saml-faq-filter-btn {
        padding: 8px 16px;
        font-size: 13px;
    }


    .saml-faq-wrapper .saml-faq-number {
        font-size: 20px;
        width: 32px;
    }

    .saml-faq-wrapper .saml-faq-question {
        font-size: 18px;
    }

    .saml-faq-wrapper .saml-faq-inner {
        padding: 0 20px 24px 20px;
    }

    .saml-faq-wrapper .saml-faq-embed iframe {
        height: 480px;
    }
}

@media (max-width: 480px) {
    .saml-faq-wrapper .saml-faq-embed iframe {
        height: 360px;
    }
}

/* =============================================================
   SEARCH BAR — [studyaml_faq_search]
   ============================================================= */

.saml-faq-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.saml-faq-search-icon {
    position: absolute;
    left: 18px;
    color: #111111;
    display: flex;
    align-items: center;
    pointer-events: none;
    z-index: 1;
}

.saml-faq-search-input {
    width: 100% !important;
    height: 58px !important;
    padding: 0 48px 0 52px !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    color: #111111 !important;
    background: #ffffff !important;
    border: none !important;
    border-radius: 10px !important;
    outline: none !important;
    box-shadow: none !important;
    transition: box-shadow 0.2s ease !important;
    box-sizing: border-box !important;
    -webkit-appearance: none;
    appearance: none;
    margin: 0 !important;
}

.saml-faq-search-input::placeholder {
    color: #111111;
    font-weight: 400;
    opacity: 1;
}

.saml-faq-search-input:focus {
    box-shadow: 0 0 0 3px rgba(110, 193, 228, 0.30);
}

.saml-faq-search-clear {
    position: absolute;
    right: 16px;
    width: 24px;
    height: 24px;
    background: #e0e4ea;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #555;
    transition: background-color 0.2s ease;
    padding: 0;
    line-height: 1;
}

.saml-faq-search-clear:hover {
    background: #cdd2d9;
}

/* ---- NO RESULTS MESSAGE ---- */
.saml-faq-wrapper .saml-faq-no-results {
    display: none;
    padding: 40px 32px;
    text-align: center;
    font-size: 15px;
    color: #888;
    font-style: italic;
}

