/**
 * FAQ Widget Styles
 *
 * @package Guided Legal Solutions
 */

.guided-legal-faq-widget {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.faq-headline {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    text-align: center;
}

.faq-description {
    font-size: 1.125rem;
    line-height: 1.6;
    margin-bottom: 40px;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.faq-container {
    margin-top: 30px;
}

.faq-item {
    margin-bottom: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.faq-item.active {
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.15);
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 20px 25px;
    cursor: pointer;
    background-color: #f8fafc;
    border: none;
    text-align: left;
    transition: all 0.3s ease;
    user-select: none;
}

.faq-question:hover {
    background-color: #e2e8f0;
}

.faq-question:focus {
    outline: 2px solid #1e40af;
    outline-offset: -2px;
}

.faq-item.active .faq-question {
    background-color: #1e40af;
    color: #ffffff;
}

.faq-question-content {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 15px;
}

.faq-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #1e40af;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.faq-icon svg {
    width: 24px;
    height: 24px;
    transition: all 0.3s ease;
}

.faq-item.active .faq-icon {
    color: #ffffff;
}

.faq-item.active .faq-icon svg {
    fill: #ffffff;
}

.faq-question-text {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
    flex: 1;
}

.faq-toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 24px;
    height: 24px;
    margin-left: 15px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.faq-toggle-icon svg {
    width: 20px;
    height: 20px;
    transition: all 0.3s ease;
}

.toggle-icon-closed,
.toggle-icon-open {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.faq-item:not(.active) .toggle-icon-closed {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg);
}

.faq-item:not(.active) .toggle-icon-open {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(90deg);
}

.faq-item.active .toggle-icon-closed {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(-90deg);
}

.faq-item.active .toggle-icon-open {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg);
}

.faq-answer {
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.faq-answer-content {
    padding: 20px 25px;
    background-color: #ffffff;
    border-top: 1px solid #e2e8f0;
    font-size: 1rem;
    line-height: 1.7;
    color: #475569;
}

.faq-answer-content p {
    margin-bottom: 15px;
}

.faq-answer-content p:last-child {
    margin-bottom: 0;
}

.faq-answer-content ul,
.faq-answer-content ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

.faq-answer-content li {
    margin-bottom: 8px;
}

.faq-answer-content a {
    color: #1e40af;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.faq-answer-content a:hover {
    color: #1e3a8a;
}

.faq-answer-content strong {
    font-weight: 600;
    color: #1e293b;
}

/* Responsive styles */
@media (max-width: 768px) {
    .guided-legal-faq-widget {
        padding: 30px 15px;
    }

    .faq-headline {
        font-size: 2rem;
    }

    .faq-description {
        font-size: 1rem;
        margin-bottom: 30px;
    }

    .faq-question {
        padding: 15px 20px;
    }

    .faq-question-content {
        gap: 12px;
    }

    .faq-icon {
        font-size: 20px;
    }

    .faq-icon svg {
        width: 20px;
        height: 20px;
    }

    .faq-question-text {
        font-size: 1rem;
    }

    .faq-toggle-icon {
        width: 20px;
        height: 20px;
        margin-left: 10px;
    }

    .faq-toggle-icon svg {
        width: 18px;
        height: 18px;
    }

    .faq-answer-content {
        padding: 15px 20px;
        font-size: 0.9375rem;
    }
}

@media (max-width: 480px) {
    .faq-headline {
        font-size: 1.75rem;
    }

    .faq-question {
        padding: 12px 15px;
    }

    .faq-question-text {
        font-size: 0.9375rem;
    }

    .faq-answer-content {
        padding: 12px 15px;
        font-size: 0.875rem;
    }
}

/* Animation classes for smooth expand/collapse */
.faq-answer.collapsing {
    transition: height 0.3s ease;
}

/* Accessibility improvements */
.faq-question:focus-visible {
    outline: 2px solid #1e40af;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .faq-item {
        page-break-inside: avoid;
        border: 1px solid #000;
        margin-bottom: 10px;
    }

    .faq-question {
        background-color: #f0f0f0 !important;
        color: #000 !important;
    }

    .faq-toggle-icon {
        display: none;
    }

    .faq-answer {
        display: block !important;
    }
}

