/* Tutor Course FAQ — Frontend Styles
   Uses high-specificity selectors to override theme/Tutor LMS styles */

/* ─── Section wrapper ─── */
.tcf-faq-section {
    margin: 40px 0 20px !important;
    font-family: inherit !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* ─── Heading ─── */
.tcf-faq-section .tcf-faq-heading {
    font-size: 1.4em !important;
    font-weight: 700 !important;
    margin-bottom: 20px !important;
    padding-bottom: 10px !important;
    border-bottom: 2px solid #e0e0e0 !important;
    color: #1d2327 !important;
}

/* ─── FAQ list ─── */
.tcf-faq-section .tcf-faq-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    width: 100% !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* ─── Individual FAQ item ─── */
.tcf-faq-section .tcf-faq-item {
    border: 1px solid #d0d0d0 !important;
    border-radius: 6px !important;
    overflow: hidden !important;
    background: #fff !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* ─── Question button — full row, icon at end ─── */
.tcf-faq-section .tcf-faq-question {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    padding: 16px 20px !important;
    background: #f8f8f8 !important;
    border: none !important;
    border-radius: 0 !important;
    cursor: pointer !important;
    text-align: left !important;
    font-size: 1em !important;
    font-weight: 600 !important;
    color: #1d2327 !important;      /* BLACK — not pink */
    gap: 12px !important;
    transition: background 0.2s ease !important;
    font-family: inherit !important;
    line-height: 1.5 !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    /* Reset any theme button styles */
    text-transform: none !important;
    letter-spacing: normal !important;
    white-space: normal !important;
}

.tcf-faq-section .tcf-faq-question:hover,
.tcf-faq-section .tcf-faq-question:focus {
    background: #f0f0f0 !important;
    color: #1d2327 !important;
    outline: none !important;
    box-shadow: none !important;
}

.tcf-faq-section .tcf-faq-question[aria-expanded="true"] {
    background: #f0f0f0 !important;
    border-bottom: 1px solid #d0d0d0 !important;
    color: #1d2327 !important;
}

/* ─── Question text (takes all available space) ─── */
.tcf-faq-section .tcf-faq-q-text {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    color: #1d2327 !important;      /* BLACK — not pink */
    font-weight: 600 !important;
}

/* ─── Toggle icon (pushed to the far right) ─── */
.tcf-faq-section .tcf-faq-icon {
    flex: 0 0 28px !important;
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 20px !important;
    font-weight: 400 !important;
    color: #555 !important;
    border-radius: 50% !important;
    background: #e0e0e0 !important;
    line-height: 1 !important;
    transition: background 0.2s ease, color 0.2s ease !important;
    margin-left: auto !important;   /* Ensures it stays at far right */
}

.tcf-faq-section .tcf-faq-question[aria-expanded="true"] .tcf-faq-icon {
    background: #333 !important;
    color: #fff !important;
}

/* ─── Answer panel ─── */
.tcf-faq-section .tcf-faq-answer {
    overflow: hidden !important;
    background: #fff !important;
}

/* Respect [hidden] attribute — force display:none */
.tcf-faq-section .tcf-faq-answer[hidden] {
    display: none !important;
}

.tcf-faq-section .tcf-faq-answer-inner {
    padding: 16px 20px !important;
    color: #444 !important;
    font-size: 0.95em !important;
    line-height: 1.7 !important;
}

.tcf-faq-section .tcf-faq-answer-inner p:last-child {
    margin-bottom: 0 !important;
}

.tcf-faq-section .tcf-faq-answer-inner a {
    color: #2271b1 !important;
}

/* ─── Responsive ─── */
@media (max-width: 600px) {
    .tcf-faq-section .tcf-faq-question {
        padding: 14px 16px !important;
        font-size: 0.95em !important;
    }

    .tcf-faq-section .tcf-faq-answer-inner {
        padding: 14px 16px !important;
    }

    .tcf-faq-section .tcf-faq-heading {
        font-size: 1.2em !important;
    }
}
