.faq-bot {
    position: fixed;
    right: 22px;
    bottom: calc(88px + env(safe-area-inset-bottom, 0px));
    z-index: 500;

    font-family: var(--vij-font-body);
}


.faq-panel {
    width: min(380px, calc(100vw - 32px));
    max-height: min(640px, calc(100dvh - 110px));

    display: flex;
    flex-direction: column;

    overflow: hidden;

    border: 1px solid rgba(91, 30, 158, 0.16);
    border-radius: 18px;

    background: rgba(255, 255, 255, 0.94);
    box-shadow:
        0 24px 60px rgba(21, 13, 43, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
}


.faq-panel[hidden] {
    display: none;
}


.faq-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 18px;
    padding: 20px 20px 14px;

    border-bottom: 1px solid var(--vij-rule);

    background:
        linear-gradient(135deg, var(--vij-primary-tint), rgba(255, 255, 255, 0.96));
}


.faq-eyebrow {
    margin: 0 0 5px;

    color: var(--vij-primary);

    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}


.faq-panel h2 {
    margin: 0;

    color: var(--vij-primary-deep);

    font-size: 20px;
    line-height: 1.2;
}


.faq-close-button {
    flex: 0 0 auto;

    width: 34px;
    height: 34px;

    border: none;
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.72);
    color: var(--vij-text);

    font: inherit;
    font-size: 24px;
    line-height: 1;

    cursor: pointer;
}


.faq-search-label {
    position: absolute;

    width: 1px;
    height: 1px;

    overflow: hidden;
    clip: rect(0 0 0 0);
}


.faq-search-input {
    width: calc(100% - 40px);
    min-height: 42px;

    margin: 16px 20px 10px;
    padding: 10px 12px;

    border: 1px solid var(--vij-rule-strong);
    border-radius: 12px;

    background: var(--vij-bg);
    color: var(--vij-text);

    font: inherit;
}


.faq-search-input:focus-visible,
.faq-close-button:focus-visible,
.faq-nav-button:focus-visible,
.faq-list-item:focus-visible,
.faq-action-button:focus-visible {
    outline: 2px solid var(--vij-primary);
    outline-offset: 2px;
}


.faq-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 10px;
    padding: 0 20px 10px;
}


.faq-nav-button {
    padding: 6px 0;

    border: none;

    background: transparent;
    color: var(--vij-primary);

    font: inherit;
    font-size: 13px;
    font-weight: 800;

    cursor: pointer;
}


.faq-nav-button[hidden] {
    display: none;
}


.faq-content {
    min-height: 0;
    padding: 0 20px 20px;

    overflow-y: auto;
}


.faq-list {
    display: grid;
    gap: 8px;
}


.faq-list-item {
    width: 100%;
    padding: 11px 12px;

    border: 1px solid var(--vij-rule);
    border-radius: 12px;

    background: var(--vij-bg);
    color: var(--vij-text);

    font: inherit;
    font-size: 14px;
    font-weight: 700;
    text-align: left;

    cursor: pointer;
}


.faq-list-item:hover,
.faq-list-item.is-category:hover {
    border-color: rgba(91, 30, 158, 0.28);
    background: var(--vij-primary-tint);
}


.faq-list-item.is-category {
    color: var(--vij-primary-deep);
}


.faq-answer h3 {
    margin: 0 0 10px;

    color: var(--vij-primary-deep);

    font-size: 18px;
    line-height: 1.25;
}


.faq-answer p {
    margin: 0;

    color: var(--vij-text-muted);

    font-size: 14px;
    font-weight: 600;
    line-height: 1.55;
}


.faq-empty {
    margin: 0;

    color: var(--vij-text-muted);

    font-size: 14px;
    line-height: 1.55;
}


.faq-actions {
    display: flex;
    flex-wrap: wrap;

    gap: 8px;
    margin-top: 16px;
}


.faq-action-button {
    min-height: 38px;
    padding: 8px 12px;

    border: 1px solid var(--vij-primary);
    border-radius: var(--vij-radius);

    background: var(--vij-primary);
    color: var(--vij-on-primary);

    font: inherit;
    font-size: 13px;
    font-weight: 800;

    cursor: pointer;
}


.faq-action-button:hover {
    background: var(--vij-primary-deep);
}


@media (max-width: 600px) {

    .faq-bot {
        right: 14px;
        bottom: calc(86px + env(safe-area-inset-bottom, 0px));
        left: 14px;
    }

    .faq-panel {
        width: auto;
        max-height: calc(100dvh - 110px);
    }

}
