/* ==========================================================================
   FAQ Widget Plugin — Main Stylesheet
   ========================================================================== */

/* ---------- Container ---------- */
.faq-widget-container {
    max-width: 900px;
    margin: 40px auto;
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: #1f2937;
}

.faq-widget-heading {
    text-align: center;
    font-size: 32px;
    font-weight: 800;
    color: #111827;
    margin-bottom: 32px;
    letter-spacing: -0.025em;
    background: linear-gradient(135deg, #10b981, #059669);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    width: 100%;
}

/* ---------- Search ---------- */
.faq-widget-search-wrapper {
    position: relative;
    margin-bottom: 32px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    border-radius: 16px;
}

.faq-widget-search {
    width: 100%;
    padding: 18px 56px 18px 24px;
    font-size: 16px;
    font-weight: 500;
    border: 2px solid transparent;
    border-radius: 16px;
    background: #f9fafb;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #1f2937;
    outline: none;
    box-sizing: border-box;
}

.faq-widget-search:focus {
    border-color: #10b981;
    background: #ffffff;
    box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.1), 0 4px 6px -2px rgba(16, 185, 129, 0.05);
}

.faq-widget-search::placeholder {
    color: #9ca3af;
}

.faq-widget-search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
    transition: color 0.3s ease;
}

.faq-widget-search:focus ~ .faq-widget-search-icon {
    color: #10b981;
}

/* ---------- Item List ---------- */
.faq-widget-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ---------- Item ---------- */
.faq-widget-item {
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-widget-item:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transform: translateY(-2px);
}

.faq-widget-item.is-active {
    border-color: #10b981;
    box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.1), 0 4px 6px -2px rgba(16, 185, 129, 0.05);
    background: #fff;
}

/* ---------- Question Button ---------- */
.faq-widget-question {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 24px;
    border: none;
    background: transparent;
    cursor: pointer;
    text-align: left;
    font-size: 17px;
    font-weight: 600;
    color: #1f2937;
    gap: 16px;
    transition: background-color 0.2s ease;
    line-height: 1.5;
}

.faq-widget-question:hover {
    background-color: #f0fdf4;
}

.faq-widget-item.is-active .faq-widget-question {
    color: #065f46;
    background-color: #ecfdf5;
}

/* Q-label (Number Badge) */
.faq-widget-q-label {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.faq-widget-q-text {
    flex: 1;
}

/* Icon */
.faq-widget-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f3f4f6;
    color: #6b7280;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-widget-item.is-active .faq-widget-icon {
    transform: rotate(45deg);
    background: #10b981;
    color: #fff;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.4);
}

/* ---------- Answer ---------- */
.faq-widget-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: #fff;
}

.faq-widget-answer-inner {
    padding: 0 24px 24px 80px;
    font-size: 16px;
    line-height: 1.7;
    color: #4b5563;
}

.faq-widget-answer-inner p {
    margin-bottom: 1em;
}

.faq-widget-answer-inner p:last-child {
    margin-bottom: 0;
}

/* ---------- No Results ---------- */
.faq-widget-no-results {
    text-align: center;
    padding: 40px 20px;
    font-size: 16px;
    color: #6b7280;
    font-style: italic;
    background: #f9fafb;
    border-radius: 12px;
}

/* ---------- Hidden utility ---------- */
.faq-widget-item.is-hidden {
    display: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
    .faq-widget-container {
        padding: 0 16px;
        margin: 24px auto;
    }

    .faq-widget-heading {
        font-size: 24px;
        margin-bottom: 24px;
    }

    .faq-widget-question {
        padding: 16px;
        font-size: 15px;
        gap: 12px;
    }

    .faq-widget-q-label {
        width: 32px;
        height: 32px;
        font-size: 12px;
        border-radius: 8px;
    }

    .faq-widget-answer-inner {
        padding: 0 16px 20px 60px;
        font-size: 14.5px;
    }

    .faq-widget-search {
        padding: 14px 44px 14px 16px;
        font-size: 15px;
    }

    .faq-widget-icon {
        width: 28px;
        height: 28px;
    }
}
