﻿/* ==========================================================================
   FAQs Page Styles
   ========================================================================== */

.faq_wrapper {
    font-size: 1rem;
    display: grid;
    grid-template-columns: 30em minmax(0, 1fr);
    gap: 2.4em;
    margin-bottom: 2em;
    align-items: start;
}

/* --------------------------------------------------------------------------
   Left Column: FAQ Categories Sidebar
   -------------------------------------------------------------------------- */

.faq_sidebar,
.faq_categories_card {
    width: 30em;
    border: none;
    border-radius: 1.2em;
    padding: 1.6em 1.6em 1em 1.6em;
    background-color: var(--neutral-13);
    box-shadow: none;
}

.faq_categories_title {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--secondary-8);
    margin-bottom: 1.6em;
}

.faq_categories_list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.4em;
}

.faq_category_link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1em 1.4em;
    border-radius: 0.8em;
    color: var(--neutral-4);
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.faq_category_name {
    font-size: 1.4em;
    font-weight: 500;
}

.faq_category_count {
    font-size: 1.4em;
    font-weight: 500;
    color: var(--neutral-5);
}

.faq_category_link:hover {
    background-color: var(--secondary-6);
    color: var(--brand-1);
}

.faq_category_item.active .faq_category_link {
    background-color: #EBF5ED;
    color: var(--brand-1);
}

.faq_category_item.active .faq_category_name,
.faq_category_item.active .faq_category_count {
    font-weight: 600;
    color: var(--brand-1);
}

/* --------------------------------------------------------------------------
   Right Column: Main FAQs & Accordion List
   -------------------------------------------------------------------------- */

.faq_main {
    display: flex;
    flex-direction: column;
}

.faq_header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 1.6em;
}

.faq_current_title {
    font-size: 2.4em;
    font-weight: 700;
    color: var(--secondary-8);
}

.faq_total_count {
    font-size: 1.4em;
    color: var(--neutral-4);
    font-weight: 400;
}

/* Search Box */
.faq_search {
    position: relative;
    height: 4em;
    margin-bottom: 2.4em;
    display: flex;
    align-items: center;
}

.faq_search_icon {
    position: absolute;
    left: 1.4em;
    width: 1.8em;
    height: 1.8em;
    color: var(--neutral-4);
    pointer-events: none;
}

.faq_search_input {
    width: 100%;
    height: 100%;
    padding-left: 3.2em;
    padding-right: 1.4em;
    font-size: 1.4em;
    border: 1px solid var(--neutral-7);
    border-radius: 0.8em;
    background-color: var(--neutral-1);
    color: var(--neutral-9);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq_search_input::placeholder {
    color: var(--neutral-4);
}

.faq_search_input:focus {
    border-color: var(--brand-1);
    box-shadow: 0 0 0 2px rgba(0, 110, 69, 0.1);
}

/* FAQ Accordion Items */
.faq_list {
    display: flex;
    flex-direction: column;
}

.faq_item {
    border-bottom: 1px solid var(--neutral-7);
}

.faq_item summary {
    list-style: none;
}

.faq_item summary::-webkit-details-marker {
    display: none;
}

.faq_question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.8em 0;
    cursor: pointer;
    gap: 1.6em;
    user-select: none;
}

.faq_question > span {
    font-size: 1.6em;
    font-weight: 600;
    color: var(--brand-1);
    line-height: 1.4;
    transition: color 0.2s ease;
}

.faq_question:hover > span {
    color: var(--secondary-4);
}

.faq_question > svg {
    width: 1.6em;
    height: 1.6em;
    color: var(--brand-1);
    transition: transform 0.25s ease;
    flex-shrink: 0;
    transform: rotate(0deg);
}

.faq_item[open] .faq_question > svg {
    transform: rotate(180deg);
}

.faq_answer {
    padding-bottom: 1.8em;
}

.faq_answer > p {
    font-size: 1.4em;
    line-height: 1.65;
    color: var(--neutral-6);
}

.faq_answer strong {
    font-weight: 600;
    color: var(--neutral-9);
}

/* Skeleton Loading State */
.faq_list.is-loading {
    pointer-events: none;
    opacity: 0.8;
}

.faq_skeleton_list {
    display: flex;
    flex-direction: column;
    gap: 2.4em;
    padding: 1.6em 0;
}

.faq_skeleton_item {
    display: flex;
    flex-direction: column;
    gap: 1em;
    padding-bottom: 2em;
    border-bottom: 1px solid var(--neutral-7);
}

.faq_skeleton_title {
    width: 55%;
    height: 1.8em;
    border-radius: 0.4em;
    background: linear-gradient(90deg, #f0f0f0 25%, #e2e8f0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: faqShimmer 1.5s infinite;
}

.faq_skeleton_text {
    width: 90%;
    height: 1.4em;
    border-radius: 0.4em;
    background: linear-gradient(90deg, #f5f5f5 25%, #eaeaea 50%, #f5f5f5 75%);
    background-size: 200% 100%;
    animation: faqShimmer 1.5s infinite;
}

@keyframes faqShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.faq_empty,
.faq_error {
    padding: 3em 0;
    text-align: center;
    color: var(--neutral-4);
    font-size: 1.5em;
}

/* --------------------------------------------------------------------------
   FAQ Action (Load More)
   -------------------------------------------------------------------------- */

.faq_action {
    font-size: 1rem;
    height: 6.4em;
    padding: 1em 0;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 6em;
}

.btn_faq_load_more {
    font-size: 1rem;
    height: 4.4em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.8em;
    padding: 0 2.4em;
    border-radius: 0.8em;
    border: 1px solid var(--brand-1);
    background-color: var(--neutral-1);
    color: var(--brand-1);
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.btn_faq_load_more > span {
    font-size: 1.4em;
    font-weight: 500;
}

.btn_faq_load_more > svg {
    width: 1.4em;
    height: 1.4em;
    transition: transform 0.25s ease;
}

.btn_faq_load_more:hover {
    background-color: var(--brand-1);
    color: var(--neutral-1);
    box-shadow: 0 0.4em 1.2em rgba(0, 110, 69, 0.15);
}

.btn_faq_load_more:hover > svg {
    transform: translateY(0.2em);
}

/* --------------------------------------------------------------------------
   Responsive Breakpoints
   -------------------------------------------------------------------------- */

@media (max-width: 991px) {
    .faq_wrapper {
        grid-template-columns: 1fr;
        gap: 3.2em;
    }

    .faq_sidebar {
        width: 100%;
    }
}
