/*
 * Perguntas frequentes: um único componente para o site inteiro.
 * Vale para o bloco de FAQ das páginas (block_14), as perguntas da página /faq (também em block_14)
 * e o FAQ dos posts do blog. Cada pergunta é um cartão; ao abrir, o cartão ganha borda azul,
 * o "+" gira e vira "×" e a resposta desliza (onde o navegador anima <details>).
 */
:root {
    interpolate-size: allow-keywords;
}

:is(.site__block_14 .block__toggle, .post__faq-list) {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

:is(.site__block_14 .toggle__item, .post__faq-item) {
    background: #fff;
    border: 1px solid #e4e9f4;
    border-radius: 16px;
    color: var(--color-text-secondary);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

:is(.site__block_14 .toggle__item, .post__faq-item):hover {
    border-color: rgba(0, 36, 248, 0.35);
}

:is(.site__block_14 .toggle__item, .post__faq-item)[open] {
    border-color: rgba(0, 36, 248, 0.45);
    box-shadow: 0 10px 28px rgba(0, 20, 120, 0.08);
}

/* a resposta abre e fecha deslizando (Chrome/Edge; nos outros abre direto, sem quebrar) */
:is(.site__block_14 .toggle__item, .post__faq-item)::details-content {
    block-size: 0;
    overflow: hidden;
    transition: block-size 0.3s ease, content-visibility 0.3s ease allow-discrete;
}

:is(.site__block_14 .toggle__item, .post__faq-item)[open]::details-content {
    block-size: auto;
}

/* pergunta */
:is(.site__block_14 .toggle__item .item__title, .post__faq-question) {
    align-items: center;
    color: var(--fourth-color, #121633);
    cursor: pointer;
    display: flex;
    font-size: 17px;
    font-weight: 600;
    gap: 16px;
    justify-content: space-between;
    line-height: 1.4;
    list-style: none;
    padding: 20px 24px;
}

:is(.site__block_14 .toggle__item .item__title, .post__faq-question)::-webkit-details-marker {
    display: none;
}

:is(.site__block_14 .toggle__item .item__title, .post__faq-question):focus-visible {
    border-radius: 16px;
    outline: 3px solid var(--first-color, #0024f8);
    outline-offset: 2px;
}

/* botão redondo com "+": gira 45° e vira "×" quando a pergunta abre */
:is(.site__block_14 .toggle__item .item__title, .post__faq-question)::after {
    background-color: #eef1ff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230024f8' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 16px 16px;
    border-radius: 50%;
    content: '';
    flex: 0 0 32px;
    height: 32px;
    transition: transform 0.3s ease, background-color 0.3s ease;
    width: 32px;
}

:is(.site__block_14 .toggle__item, .post__faq-item)[open] :is(.item__title, .post__faq-question)::after {
    background-color: var(--first-color, #0024f8);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
    transform: rotate(45deg);
}

/* resposta */
:is(.site__block_14 .toggle__item .item__description, .post__faq-answer) {
    color: var(--color-text-secondary);
    font-size: 15px;
    line-height: 1.6;
    padding: 0 72px 20px 24px;
}

:is(.site__block_14 .toggle__item .item__description, .post__faq-answer) :is(p, ul, ol) {
    margin: 0 0 10px;
}

:is(.site__block_14 .toggle__item .item__description, .post__faq-answer) :is(p, ul, ol):last-child {
    margin-bottom: 0;
}

:is(.site__block_14 .toggle__item .item__description, .post__faq-answer) :is(ul, ol) {
    padding-left: 20px;
}

:is(.site__block_14 .toggle__item .item__description, .post__faq-answer) a {
    color: var(--first-color, #0024f8);
    text-decoration: underline;
}

:is(.site__block_14 .toggle__item .item__description, .post__faq-answer) strong {
    color: var(--fourth-color, #121633);
}

@media (max-width: 767px) {
    :is(.site__block_14 .toggle__item .item__title, .post__faq-question) {
        font-size: 16px;
        padding: 16px 18px;
    }

    :is(.site__block_14 .toggle__item .item__description, .post__faq-answer) {
        padding: 0 18px 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    :is(.site__block_14 .toggle__item, .post__faq-item)::details-content,
    :is(.site__block_14 .toggle__item .item__title, .post__faq-question)::after {
        transition: none;
    }
}
