/**
 * CodeLine FAQ Plugin — Frontend Styles
 */

/* =============================================
   ACCORDION WRAPPER
   ============================================= */
.clf-faq-wrapper {
    font-family: var(--clf-font, inherit);
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* =============================================
   FAQ ITEM
   ============================================= */
.clf-faq-item {
    border: 1px solid var(--clf-border, #e0d9d0);
    border-radius: var(--clf-radius, 10px);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.clf-faq-item:hover {
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.07);
}

/* =============================================
   QUESTION BUTTON
   ============================================= */
.clf-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 18px 24px;
    background: var(--clf-bg, #f4f1ea);
    color: var(--clf-text, #3b332b);
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: var(--clf-font, inherit);
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.45;
    transition: background 0.25s ease, color 0.25s ease;
}

.clf-question:hover {
    background: var(--clf-primary, #3b332b);
    color: #fff;
}

.clf-question[aria-expanded="true"] {
    background: var(--clf-primary, #3b332b);
    color: #fff;
}

.clf-q-text {
    flex: 1;
}

/* =============================================
   ICON (Chevron)
   ============================================= */
.clf-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    transition: transform 0.35s ease;
}

.clf-icon svg {
    width: 22px;
    height: 22px;
}

.clf-question[aria-expanded="true"] .clf-icon {
    transform: rotate(180deg);
}

/* =============================================
   ANSWER PANEL (animated via max-height)
   ============================================= */
.clf-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--clf-answer-bg, #ffffff);
}

.clf-answer.clf-open {
    max-height: 1000px; /* Large enough for any content */
}

.clf-answer-inner {
    padding: 20px 24px;
    color: var(--clf-text, #3b332b);
    font-size: 0.975rem;
    line-height: 1.7;
}

.clf-answer-inner p:first-child { margin-top: 0; }
.clf-answer-inner p:last-child  { margin-bottom: 0; }

.clf-answer-inner a {
    color: var(--clf-primary, #3b332b);
    text-decoration: underline;
}

.clf-answer-inner ul,
.clf-answer-inner ol {
    margin-left: 20px;
}

.clf-answer-inner strong {
    font-weight: 600;
}

/* =============================================
   NO RESULTS
   ============================================= */
.clf-no-results {
    text-align: center;
    color: #888;
    padding: 20px;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 600px) {
    .clf-question {
        padding: 14px 16px;
        font-size: 0.95rem;
    }
    .clf-answer-inner {
        padding: 15px 16px;
    }
}
