/**
 * FAQ LLM Block - Frontend Styles
 * Optimized for accessibility and SEO
 */

.faq-llm-block {
    margin: 2rem 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.faq-llm-accordion {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-llm-item {
    position: relative;
}

/* Question Button Styles */
.faq-llm-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: #ffffff;
    border: none;
    cursor: pointer;
    text-align: left;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.5;
    color: #1e293b;
    transition: all 0.3s ease;
    position: relative;
}

.faq-llm-question:hover {
    color: #3b82f6;
}

.faq-llm-question:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.faq-llm-question span:first-child {
    flex: 1;
    padding-right: 1rem;
}

/* Icon Styles */
.faq-llm-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
    color: #64748b;
}

.faq-llm-question.active .faq-llm-icon {
    transform: rotate(180deg);
    color: #3b82f6;
}

/* Answer Styles */
.faq-llm-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background: #f8fafc;
}

.faq-llm-answer.active {
    max-height: 2000px;
    padding: 0 1.5rem 1.5rem 1.5rem;
}

.faq-llm-answer-content {
    padding-top: 1rem;
    color: #475569;
    font-size: 1rem;
    line-height: 1.75;
}

.faq-llm-answer-content p {
    margin: 0 0 1rem 0;
}

.faq-llm-answer-content p:last-child {
    margin-bottom: 0;
}

/* Bordered Style */
.faq-style-bordered .faq-llm-item {
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    overflow: hidden;
}

.faq-style-bordered .faq-llm-question.active {
    background: #f1f5f9;
}

/* Minimal Style */
.faq-style-minimal .faq-llm-item {
    border-bottom: 1px solid #e2e8f0;
}

.faq-style-minimal .faq-llm-item:last-child {
    border-bottom: none;
}

.faq-style-minimal .faq-llm-question {
    padding: 1rem 0;
    background: transparent;
}

.faq-style-minimal .faq-llm-answer {
    background: transparent;
}

.faq-style-minimal .faq-llm-answer.active {
    padding: 0 0 1rem 0;
}

/* Shadow Style */
.faq-style-shadow .faq-llm-item {
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.faq-style-shadow .faq-llm-item:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.faq-style-shadow .faq-llm-question.active {
    background: #f1f5f9;
}

/* Responsive Design */
@media (max-width: 768px) {
    .faq-llm-question {
        padding: 1rem;
        font-size: 1rem;
    }

    .faq-llm-answer.active {
        padding: 0 1rem 1rem 1rem;
    }

    .faq-style-minimal .faq-llm-answer.active {
        padding: 0 0 1rem 0;
    }

    .faq-llm-answer-content {
        font-size: 0.9375rem;
    }
}

/* Print Styles */
@media print {
    .faq-llm-question {
        page-break-inside: avoid;
    }

    .faq-llm-answer {
        max-height: none !important;
        display: block !important;
        padding: 0 1.5rem 1.5rem 1.5rem !important;
    }

    .faq-llm-icon {
        display: none;
    }
}

/* Accessibility - High Contrast Mode */
@media (prefers-contrast: high) {
    .faq-llm-question {
        border: 2px solid currentColor;
    }

    .faq-llm-question:focus {
        outline: 3px solid currentColor;
        outline-offset: 3px;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .faq-llm-question,
    .faq-llm-answer,
    .faq-llm-icon {
        transition: none;
    }
}
