/**
 * Vellis FAQ widget styles.
 *
 * Accordion with a CSS-drawn circular toggle (outline circle + plus when
 * closed → filled circle + minus when open). The open/close animation uses the
 * grid 0fr→1fr technique so it works without measuring heights in JS.
 */

.vellis-faq {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vellis-faq__item {
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.35);
    overflow: hidden;
}

/* Header / clickable row */
.vellis-faq__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    margin: 0;
    padding: 20px 24px;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    font: inherit;
    color: inherit;
}

.vellis-faq__head:focus-visible {
    outline: 2px solid #113F42;
    outline-offset: -2px;
}

.vellis-faq__question {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    color: #113F42;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 18px;
    font-weight: 600;
    line-height: 130%;
    text-decoration: none;
    white-space: normal;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* Neutralise theme button/heading hover colors (e.g. red link hover) */
.vellis-faq__head:hover .vellis-faq__question,
.vellis-faq__head:focus .vellis-faq__question,
.vellis-faq__head:active .vellis-faq__question {
    color: #113F42;
    text-decoration: none;
}

.vellis-faq__head:hover,
.vellis-faq__head:focus {
    background-color: rgba(17, 63, 66, 0.06);
}

/* Circular toggle */
.vellis-faq__icon {
    position: relative;
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #114042;
    background-color: transparent;
    transition: background-color 0.25s ease, border-color 0.25s ease;
}

.vellis-faq__icon::before,
.vellis-faq__icon::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    background-color: #114042;
    border-radius: 2px;
    transition: background-color 0.25s ease, transform 0.25s ease, opacity 0.25s ease;
}

/* Horizontal bar (stays for both + and −) */
.vellis-faq__icon::before {
    width: 42%;
    height: 2px;
    transform: translate(-50%, -50%);
}

/* Vertical bar (only for +) */
.vellis-faq__icon::after {
    width: 2px;
    height: 42%;
    transform: translate(-50%, -50%);
}

/* Open state: filled circle, white bars, hide vertical bar → minus */
.vellis-faq__item.is-open .vellis-faq__icon {
    background-color: #114042;
    border-color: #114042;
}

.vellis-faq__item.is-open .vellis-faq__icon::before,
.vellis-faq__item.is-open .vellis-faq__icon::after {
    background-color: #fff;
}

.vellis-faq__item.is-open .vellis-faq__icon::after {
    transform: translate(-50%, -50%) scaleY(0);
    opacity: 0;
}

/* Collapsible panel (grid-rows animation) */
.vellis-faq__panel {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s ease;
}

.vellis-faq__item.is-open .vellis-faq__panel {
    grid-template-rows: 1fr;
}

/* IMPORTANT: keep this element padding-free so the grid 0fr collapse can reach
   true zero height (border-box padding would otherwise leave the answer peeking). */
.vellis-faq__panel-inner {
    overflow: hidden;
    min-height: 0;
}

.vellis-faq__answer {
    margin-top: 8px;
    padding: 0 24px 20px 24px;
    color: rgba(17, 63, 66, 0.7);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 130%;
}

.vellis-faq__answer p {
    margin: 0 0 12px;
}

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

@media (prefers-reduced-motion: reduce) {

    .vellis-faq__panel,
    .vellis-faq__icon,
    .vellis-faq__icon::before,
    .vellis-faq__icon::after {
        transition: none !important;
    }
}