/**
 * FAQ Block — Static Styles
 *
 * Static CSS cached by browser. Dynamic CSS (preset, color scheme) inline.
 * BEM modifiers: 
 *   --style-{minimal|cards|bordered|separated}
 *   --icon-{rounded|circle|square|minimal}
 *   --icon-type-{plus|chevron|arrow|caret|minus}
 *   --layout-columns
 *
 * @package Boost Theme Framework
 * @since 3.6.0
 */

/* /blocks/faq/style.css */

/* =============================================================================
   BASE LAYOUT
   ============================================================================= */

.boost-faq {
    position: relative;
    padding: 3rem 2rem;
    background: var(--boost-bg);
}

.boost-faq__container {
    max-width: var(--boost-container-default, 900px);
    margin: 0 auto;
    padding: 0 1rem;
}

/* =============================================================================
   FAQ LIST
   ============================================================================= */

.boost-faq__list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.boost-faq--style-separated .boost-faq__list {
    gap: 1.5rem;
}

.boost-faq--style-cards .boost-faq__list,
.boost-faq--style-bordered .boost-faq__list {
    gap: 0.75rem;
}

.boost-faq__columns {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

/* =============================================================================
   FAQ ITEM - Base
   ============================================================================= */

.boost-faq__item {
    border-bottom: 1px solid var(--boost-border);
}

.boost-faq__item:last-child {
    border-bottom: none;
}

/* Style: Cards */
.boost-faq--style-cards .boost-faq__item {
    background: var(--boost-card-bg);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    overflow: hidden;
    border-bottom: none;
}

.boost-faq--style-cards .boost-faq__item:last-child {
    border-bottom: none;
}

/* Style: Bordered */
.boost-faq--style-bordered .boost-faq__item {
    border: 1px solid var(--boost-border);
    border-radius: 12px;
    overflow: hidden;
    border-bottom: 1px solid var(--boost-border);
}

.boost-faq--style-bordered .boost-faq__item:last-child {
    border-bottom: 1px solid var(--boost-border);
}

/* Style: Separated */
.boost-faq--style-separated .boost-faq__item {
    border-bottom: none;
    padding-bottom: 0;
}

/* =============================================================================
   QUESTION BUTTON
   ============================================================================= */

.boost-faq__question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 0;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    color: var(--boost-text);
    transition: color 0.2s;
}

.boost-faq__question:hover {
    color: var(--boost-accent, var(--boost-primary));
}

/* Question padding variants */
.boost-faq--style-cards .boost-faq__question,
.boost-faq--style-bordered .boost-faq__question {
    padding: 1.25rem 1.5rem;
}

.boost-faq--style-separated .boost-faq__question {
    padding: 1.25rem 0.5rem;
    background: var(--boost-card-bg);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

/* =============================================================================
   ICON
   ============================================================================= */

.boost-faq__icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.3s;
    border-radius: 8px;
    background: rgba(var(--boost-accent-rgb, 37, 99, 235), 0.1);
    color: var(--boost-accent, var(--boost-primary));
}

.boost-faq__icon svg {
    width: 18px;
    height: 18px;
}

/* Icon style: Circle */
.boost-faq--icon-circle .boost-faq__icon {
    border-radius: 50%;
}

/* Icon style: Square */
.boost-faq--icon-square .boost-faq__icon {
    border-radius: 4px;
}

/* Icon style: Minimal */
.boost-faq--icon-minimal .boost-faq__icon {
    border-radius: 0;
    background: transparent;
    color: var(--boost-text);
    width: auto;
    height: auto;
}

/* Icon rotation on open - Plus (default, rotates to X) */
.boost-faq__item.is-open .boost-faq__icon {
    transform: rotate(45deg);
}

/* Icon rotation: Chevron */
.boost-faq--icon-type-chevron .boost-faq__item.is-open .boost-faq__icon {
    transform: rotate(90deg);
}

/* Icon rotation: Arrow/Caret */
.boost-faq--icon-type-arrow .boost-faq__item.is-open .boost-faq__icon,
.boost-faq--icon-type-caret .boost-faq__item.is-open .boost-faq__icon {
    transform: rotate(180deg);
}

/* Icon rotation: Minus (no rotation) */
.boost-faq--icon-type-minus .boost-faq__item.is-open .boost-faq__icon {
    transform: none;
}

/* =============================================================================
   ANSWER
   ============================================================================= */

.boost-faq__answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.boost-faq__item.is-open .boost-faq__answer {
    max-height: 500px;
}

.boost-faq__answer-inner {
    padding: 0.75rem 0 1.25rem;
    color: var(--boost-text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

.boost-faq__answer-inner p:first-child {
    margin-top: 0;
}

.boost-faq__answer-inner p:last-child {
    margin-bottom: 0;
}

/* Answer padding variants */
.boost-faq--style-cards .boost-faq__answer-inner,
.boost-faq--style-bordered .boost-faq__answer-inner {
    padding: 0.75rem 1.5rem 1.25rem;
}

.boost-faq--style-separated .boost-faq__answer-inner {
    padding: 0.75rem 1rem 1.25rem;
}

/* =============================================================================
   RESPONSIVE
   ============================================================================= */

@media (max-width: 768px) {
    .boost-faq__columns {
        grid-template-columns: 1fr;
    }
    
    .boost-faq__question {
        padding: 1rem 0;
    }
    
    .boost-faq--style-cards .boost-faq__question,
    .boost-faq--style-bordered .boost-faq__question {
        padding: 1rem;
    }
    
    .boost-faq--style-separated .boost-faq__question {
        padding: 1rem 0.5rem;
    }
    
    .boost-faq__answer-inner {
        padding: 0 0 1rem;
    }
    
    .boost-faq--style-cards .boost-faq__answer-inner,
    .boost-faq--style-bordered .boost-faq__answer-inner {
        padding: 0 1rem 1rem;
    }
    
    .boost-faq--style-separated .boost-faq__answer-inner {
        padding: 0 0.5rem 1rem;
    }
}