/* ============================================
   🎨 Premium FAQ Widget – CSS
   Version: 2.0.0
============================================ */

.lcfaq-wrap {
    --faq-primary: #0e9cc0;
    --faq-primary-light: #3eb692;
    --faq-accent: #5edfb8;
    --faq-accent-soft: #a0fae0;
    --faq-gradient-start: #0e9cc0;
    --faq-gradient-end: #3eb692;

    --faq-bg: #ffffff;
    --faq-bg-item: #ffffff;
    --faq-bg-item-active: #f5fdfb;
    --faq-bg-item-hover: #fafffe;
    --faq-bg-search: #f7fbf9;
    --faq-bg-tab: transparent;
    --faq-bg-tab-active: linear-gradient(135deg, var(--faq-gradient-start), var(--faq-gradient-end));

    --faq-text: #3c3e3d;
    --faq-text-secondary: #6b6d6c;
    --faq-text-light: #9a9c9b;
    --faq-text-on-primary: #ffffff;

    --faq-radius: 16px;
    --faq-radius-small: 10px;
    --faq-radius-pill: 50px;
    --faq-padding-item: 22px 28px;
    --faq-gap: 14px;

    --faq-shadow: 0 2px 12px rgba(60, 62, 61, 0.06);
    --faq-shadow-active: 0 4px 24px rgba(14, 156, 192, 0.12);
    --faq-shadow-hover: 0 4px 16px rgba(60, 62, 61, 0.08);
    --faq-border: 1px solid rgba(62, 182, 146, 0.1);
    --faq-border-active: 1px solid rgba(14, 156, 192, 0.25);
    --faq-transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --faq-transition-fast: 0.2s ease;

    --faq-number-bg: linear-gradient(135deg, var(--faq-gradient-start), var(--faq-gradient-end));
    --faq-number-size: 30px;

    font-family: 'Heebo', sans-serif;
    color: var(--faq-text);
}

/* ---- Container ---- */
.lcfaq-wrap .faq-container {
    max-width: 900px;
    margin: 0 auto;
}

/* ---- Header ---- */
.lcfaq-wrap .faq-header {
    text-align: center;
    margin-bottom: 40px;
}

.lcfaq-wrap .faq-header h2 {
    font-family: 'Rubik', 'Heebo', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--faq-text);
    margin-bottom: 10px;
}

.lcfaq-wrap .faq-header p {
    font-size: 1rem;
    color: var(--faq-text-secondary);
    font-weight: 300;
}

.lcfaq-wrap .accent-bar {
    width: 50px;
    height: 4px;
    background: linear-gradient(90deg, var(--faq-gradient-start), var(--faq-gradient-end));
    border-radius: 2px;
    margin: 14px auto 12px;
}

/* ---- Toolbar ---- */
.lcfaq-wrap .faq-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 20px;
}

.lcfaq-wrap .faq-search-wrap {
    flex: 1;
    min-width: 220px;
    position: relative;
}

.lcfaq-wrap .faq-search {
    width: 100%;
    padding: 14px 48px 14px 20px;
    border: var(--faq-border);
    border-radius: var(--faq-radius-pill);
    background: var(--faq-bg-search);
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--faq-text);
    outline: none;
    transition: all var(--faq-transition);
}

.lcfaq-wrap .faq-search::placeholder { color: var(--faq-text-light); }

.lcfaq-wrap .faq-search:focus {
    border-color: var(--faq-primary);
    box-shadow: 0 0 0 3px rgba(14, 156, 192, 0.1);
}

.lcfaq-wrap .faq-search-icon {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--faq-text-light);
    pointer-events: none;
}

.lcfaq-wrap .faq-search-clear {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: none;
    background: none;
    color: var(--faq-text-light);
    cursor: pointer;
    opacity: 0;
    transition: opacity var(--faq-transition-fast);
    padding: 0;
}

.lcfaq-wrap .faq-search-clear.visible { opacity: 1; }

.lcfaq-wrap .faq-controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

/* Toolbar buttons (expand/collapse) */
.lcfaq-wrap .faq-btn {
    padding: 10px 18px;
    border: var(--faq-border);
    border-radius: var(--faq-radius-pill);
    background: var(--faq-bg-item);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--faq-text-secondary);
    cursor: pointer;
    transition: all var(--faq-transition-fast);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.lcfaq-wrap .faq-btn:hover {
    border-color: var(--faq-primary);
    color: var(--faq-primary);
}

.lcfaq-wrap .faq-btn svg {
    flex-shrink: 0;
}

/* Layout + Icon switcher wrappers */
.lcfaq-wrap .faq-layout-btns,
.lcfaq-wrap .faq-icon-toggle {
    display: flex;
    gap: 4px;
    background: var(--faq-bg-search);
    border-radius: var(--faq-radius-small);
    padding: 4px;
    border: var(--faq-border);
}

.lcfaq-wrap .faq-layout-btn,
.lcfaq-wrap .faq-icon-btn {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--faq-text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--faq-transition-fast);
}

.lcfaq-wrap .faq-layout-btn.active,
.lcfaq-wrap .faq-icon-btn.active {
    background: var(--faq-bg-item);
    color: var(--faq-primary);
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

/* Bulletproof icon buttons */
.lcfaq-wrap .custom-faq-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 4px !important;
    cursor: pointer;
}

.lcfaq-wrap .custom-faq-btn svg {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    width: 20px !important;
    height: 20px !important;
    fill: #333333 !important;
}

.lcfaq-wrap .custom-faq-btn svg path {
    fill: #333333 !important;
}

/* ---- Tabs ---- */
.lcfaq-wrap .faq-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}

.lcfaq-wrap .faq-tabs::-webkit-scrollbar { display: none; }

.lcfaq-wrap .faq-tab {
    padding: 10px 22px;
    border: var(--faq-border);
    border-radius: var(--faq-radius-pill);
    background: var(--faq-bg-tab);
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--faq-text-secondary);
    cursor: pointer;
    transition: all var(--faq-transition);
    white-space: nowrap;
}

.lcfaq-wrap .faq-tab:hover {
    border-color: var(--faq-primary);
    color: var(--faq-primary);
}

.lcfaq-wrap .faq-tab.active {
    background: var(--faq-bg-tab-active);
    color: var(--faq-text-on-primary);
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(14, 156, 192, 0.25);
}

.lcfaq-wrap .faq-tab .tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    background: rgba(255,255,255,0.25);
    font-size: 0.7rem;
    margin-right: 6px;
    padding: 0 6px;
}

.lcfaq-wrap .faq-tab:not(.active) .tab-count {
    background: rgba(14, 156, 192, 0.08);
    color: var(--faq-primary);
}

/* ---- FAQ List ---- */
.lcfaq-wrap .faq-list {
    display: flex;
    flex-direction: column;
    gap: var(--faq-gap);
}

.lcfaq-wrap.faq-layout-grid .faq-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--faq-gap);
}

/* ---- FAQ Item ---- */
.lcfaq-wrap .faq-item {
    background: var(--faq-bg-item);
    border: var(--faq-border);
    border-radius: var(--faq-radius);
    box-shadow: var(--faq-shadow);
    overflow: hidden;
    transition: all var(--faq-transition);
}

.lcfaq-wrap .faq-item:hover {
    box-shadow: var(--faq-shadow-hover);
}

.lcfaq-wrap .faq-item.active {
    background: var(--faq-bg-item-active);
    border: 1px solid rgba(14, 156, 192, 0.3);
    box-shadow:
        0 4px 24px rgba(14, 156, 192, 0.12),
        0 0 0 1px rgba(14, 156, 192, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.lcfaq-wrap .faq-item.hidden { display: none; }

/* Question */
.lcfaq-wrap .faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: var(--faq-padding-item);
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--faq-text);
    text-align: right;
    transition: color var(--faq-transition-fast);
}

/* Icon at edge (end of row) */
.lcfaq-wrap.faq-icon-edge .faq-q-text {
    flex: 1;
}

.lcfaq-wrap .faq-question:hover { color: var(--faq-primary); }

.lcfaq-wrap .faq-question:focus-visible {
    outline: 2px solid var(--faq-primary);
    outline-offset: -2px;
    border-radius: var(--faq-radius);
}

.lcfaq-wrap .faq-item.active .faq-question { color: var(--faq-primary); }

/* Number badge */
.lcfaq-wrap .faq-num {
    flex-shrink: 0;
    width: var(--faq-number-size);
    height: var(--faq-number-size);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--faq-number-bg);
    color: var(--faq-text-on-primary);
    font-size: 0.75rem;
    font-weight: 700;
    font-family: 'Rubik', sans-serif;
    transition: box-shadow 0.4s ease;
}

.lcfaq-wrap .faq-item.active .faq-num {
    box-shadow: 0 2px 8px rgba(14, 156, 192, 0.25);
}

/* Toggle icon */
.lcfaq-wrap .faq-toggle-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(14, 156, 192, 0.07);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.lcfaq-wrap .faq-toggle-icon svg {
    width: 14px;
    height: 14px;
    color: var(--faq-primary);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                color 0.3s ease,
                opacity 0.3s ease;
    position: absolute;
}

.lcfaq-wrap .faq-item.active .faq-toggle-icon {
    background: linear-gradient(135deg, var(--faq-gradient-start), var(--faq-gradient-end));
    box-shadow: 0 2px 10px rgba(14, 156, 192, 0.3);
    transform: scale(1.05);
}

.lcfaq-wrap .faq-item.active .faq-toggle-icon svg { color: #fff; }

/* Default icon visibility */
.lcfaq-wrap .faq-toggle-icon .icon-chevron { opacity: 1; }
.lcfaq-wrap .faq-toggle-icon .icon-plus { opacity: 0; }
.lcfaq-wrap .faq-toggle-icon .icon-minus { opacity: 0; }

/* Chevron mode */
.lcfaq-wrap[data-icon="chevron"] .faq-toggle-icon .icon-chevron { opacity: 1; }
.lcfaq-wrap[data-icon="chevron"] .faq-toggle-icon .icon-plus,
.lcfaq-wrap[data-icon="chevron"] .faq-toggle-icon .icon-minus { opacity: 0; }
.lcfaq-wrap[data-icon="chevron"] .faq-item.active .faq-toggle-icon .icon-chevron {
    transform: rotate(180deg);
}

/* Plus mode */
.lcfaq-wrap[data-icon="plus"] .faq-toggle-icon .icon-chevron { opacity: 0; }
.lcfaq-wrap[data-icon="plus"] .faq-toggle-icon .icon-plus { opacity: 1; transform: rotate(0deg); }
.lcfaq-wrap[data-icon="plus"] .faq-toggle-icon .icon-minus { opacity: 0; transform: rotate(-90deg); }
.lcfaq-wrap[data-icon="plus"] .faq-item.active .faq-toggle-icon .icon-plus { opacity: 0; transform: rotate(90deg); }
.lcfaq-wrap[data-icon="plus"] .faq-item.active .faq-toggle-icon .icon-minus { opacity: 1; transform: rotate(0deg); }
.lcfaq-wrap[data-icon="plus"] .faq-item.active .faq-toggle-icon .icon-chevron { opacity: 0; }

/* Separator */
.lcfaq-wrap .faq-separator {
    height: 1px;
    margin: 0 28px;
    background: linear-gradient(90deg, transparent, rgba(14, 156, 192, 0.15), transparent);
    opacity: 0;
    transition: opacity var(--faq-transition);
}

.lcfaq-wrap .faq-item.active .faq-separator { opacity: 1; }

/* Answer */
.lcfaq-wrap .faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
}

.lcfaq-wrap .faq-item.active .faq-answer { opacity: 1; }

.lcfaq-wrap .faq-answer-inner {
    padding: 6px 28px 24px 28px;
    padding-right: 72px;
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--faq-text-secondary);
    font-weight: 300;
    transform: translateY(-8px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.1s,
                opacity 0.4s ease 0.1s;
}

.lcfaq-wrap .faq-item.active .faq-answer-inner {
    transform: translateY(0);
    opacity: 1;
}

/* ---- No Results ---- */
.lcfaq-wrap .faq-no-results {
    display: none;
    text-align: center;
    padding: 50px 20px;
    color: var(--faq-text-light);
}

.lcfaq-wrap .faq-no-results.visible { display: block; }

.lcfaq-wrap .faq-no-results svg {
    width: 60px;
    height: 60px;
    color: var(--faq-accent);
    margin-bottom: 16px;
    opacity: 0.5;
}

.lcfaq-wrap .faq-no-results h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--faq-text-secondary);
    margin-bottom: 6px;
}

.lcfaq-wrap .faq-no-results p { font-size: 0.9rem; }

.lcfaq-wrap .faq-reset-btn {
    display: inline-block;
    margin-top: 14px;
    padding: 10px 24px;
    border-radius: var(--faq-radius-pill);
    background: linear-gradient(135deg, var(--faq-gradient-start), var(--faq-gradient-end));
    color: #fff;
    font-weight: 500;
    font-size: 0.88rem;
    border: none;
    cursor: pointer;
    transition: transform var(--faq-transition-fast), box-shadow var(--faq-transition-fast);
    font-family: inherit;
}

.lcfaq-wrap .faq-reset-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(14, 156, 192, 0.3);
}

/* ---- Entrance Animations ---- */
.lcfaq-wrap .faq-header,
.lcfaq-wrap .faq-toolbar,
.lcfaq-wrap .faq-tabs,
.lcfaq-wrap .faq-item {
    opacity: 0;
    transform: translateY(16px);
    animation: lcfaqFadeIn 0.5s ease forwards;
}

.lcfaq-wrap .faq-toolbar { animation-delay: 0.1s; }
.lcfaq-wrap .faq-tabs { animation-delay: 0.15s; }
.lcfaq-wrap .faq-item:nth-child(1) { animation-delay: 0.2s; }
.lcfaq-wrap .faq-item:nth-child(2) { animation-delay: 0.26s; }
.lcfaq-wrap .faq-item:nth-child(3) { animation-delay: 0.32s; }
.lcfaq-wrap .faq-item:nth-child(4) { animation-delay: 0.38s; }
.lcfaq-wrap .faq-item:nth-child(5) { animation-delay: 0.44s; }
.lcfaq-wrap .faq-item:nth-child(6) { animation-delay: 0.50s; }
.lcfaq-wrap .faq-item:nth-child(7) { animation-delay: 0.56s; }
.lcfaq-wrap .faq-item:nth-child(8) { animation-delay: 0.62s; }
.lcfaq-wrap .faq-item:nth-child(9) { animation-delay: 0.68s; }
.lcfaq-wrap .faq-item:nth-child(10) { animation-delay: 0.74s; }

@keyframes lcfaqFadeIn {
    to { opacity: 1; transform: translateY(0); }
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .lcfaq-wrap.faq-layout-grid .faq-list {
        grid-template-columns: 1fr;
    }
    .lcfaq-wrap .faq-toolbar { flex-direction: column; }
    .lcfaq-wrap .faq-search-wrap { min-width: 100%; }
    .lcfaq-wrap .faq-controls { width: 100%; justify-content: space-between; }
    .lcfaq-wrap .faq-header h2 { font-size: 1.7rem; }
    .lcfaq-wrap .faq-question { padding: 18px 20px; gap: 10px; font-size: 0.95rem; }
    .lcfaq-wrap .faq-answer-inner { padding: 4px 20px 20px 20px; padding-right: 52px; }
    .lcfaq-wrap .faq-separator { margin: 0 20px; }
}
