/* FAQs Avançadas - Frontend Styles */

:root {
    --faq-primary-color: #0284c7;
    --faq-bg-color: #f0f9ff;
    --faq-card-bg: #ffffff;
    --faq-text-color: #0c4a6e;
    --faq-border-color: #e0f2fe;
    --faq-hover-bg: #f8fafc;
}

.faq-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

/* Search Bar */
.faq-search-wrapper {
    position: relative;
    margin-bottom: 2rem;
}

.faq-search-input {
    width: 100%;
    padding: 0.75rem 2.75rem 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--faq-border-color);
    border-radius: 0.5rem;
    background-color: var(--faq-card-bg);
    color: var(--faq-text-color);
    transition: all 0.3s ease;
    font-family: inherit;
    height: 44px;
    box-sizing: border-box;
}

.faq-search-input:focus {
    outline: none;
    border-color: var(--faq-primary-color);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.1);
}

.faq-search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--faq-primary-color);
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.faq-search-results {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--faq-primary-color);
    min-height: 1.25rem;
}

/* FAQ Items */
.faq-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Usar elemento details nativo */
.faq-item {
    background-color: var(--faq-card-bg);
    border: 1px solid var(--faq-border-color);
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: var(--faq-primary-color);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.1);
}

/* Question - Summary */
.faq-question {
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 1rem;
    background-color: var(--faq-card-bg);
    transition: background-color 0.3s ease;
    user-select: none;
    width: 100%;
    border: none;
    font-family: inherit;
    text-align: left;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    list-style: none;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question::-moz-list-bullet {
    display: none;
}

.faq-item:hover .faq-question {
    background-color: var(--faq-hover-bg);
}

.faq-question-text {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--faq-text-color);
    flex: 1;
    line-height: 1.4;
    text-align: left;
}

.faq-chevron {
    width: 1.5rem;
    height: 1.5rem;
    min-width: 1.5rem;
    color: var(--faq-primary-color);
    flex-shrink: 0;
    transition: transform 0.3s ease;
    margin-left: auto;
}

/* Rotacionar chevron quando aberto */
.faq-item[open] .faq-chevron {
    transform: rotate(180deg);
}

/* Answer */
.faq-answer {
    overflow: hidden;
    animation: slideDown 0.3s ease;
    background-color: var(--faq-hover-bg);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.faq-answer-content {
    padding: 0 1.5rem 1.5rem 1.5rem;
    color: var(--faq-text-color);
    line-height: 1.6;
    font-size: 1rem;
}

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

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

/* CTA Button */
.faq-cta-button {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background-color: var(--faq-primary-color);
    color: #ffffff;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.faq-cta-button:hover {
    background-color: #0369a1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}

.faq-cta-button:active {
    transform: translateY(0);
}

/* No Results */
.faq-no-results {
    text-align: center;
    padding: 2rem;
    color: var(--faq-text-color);
    font-size: 1rem;
}

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

    .faq-question {
        padding: 1rem;
    }

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

    .faq-chevron {
        width: 1.25rem;
        height: 1.25rem;
    }

    .faq-search-input {
        padding: 0.5rem 2.5rem 0.5rem 1rem;
        height: 40px;
    }

    .faq-search-icon {
        width: 18px;
        height: 18px;
        right: 10px;
    }
}

@media (max-width: 480px) {
    .faq-question-text {
        font-size: 0.95rem;
    }

    .faq-question {
        padding: 0.75rem;
        gap: 0.5rem;
    }

    .faq-answer-content {
        padding: 0 0.75rem 0.75rem 0.75rem;
        font-size: 0.95rem;
    }

    .faq-cta-button {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
}

/* Animações suaves */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.faq-item {
    animation: fadeIn 0.3s ease;
}

/* Acessibilidade */
.faq-question:focus-visible {
    outline: 2px solid var(--faq-primary-color);
    outline-offset: 2px;
}

.faq-cta-button:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}
