/* Kawenter ElevenLabs voice advisor CTA */

.kva-banner {
    margin: 0 0 24px;
}

button.kva-banner__btn,
.kva-banner__btn {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 12px;
    padding: 16px 18px;
    border: 2px solid rgba(41, 111, 249, 0.22);
    border-radius: 12px;
    background: #f8faff;
    color: inherit;
    text-align: start;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
    -webkit-tap-highlight-color: rgba(41, 111, 249, 0.15);
    touch-action: manipulation;
    font: inherit;
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
}

.kva-banner__btn:hover {
    background: #ffffff;
    border-color: #296ff9;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.kva-banner__btn:active {
    background: #eef4ff;
    transform: scale(0.995);
}

.kva-banner__btn:focus-visible {
    outline: 2px solid #296ff9;
    outline-offset: 2px;
}

.kva-banner__icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    background: rgba(41, 111, 249, 0.1);
    color: #296ff9;
}

.kva-banner__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.kva-banner__title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #296ff9;
}

.kva-banner__desc {
    display: none;
}

.kva-banner__cta {
    flex-shrink: 0;
    font-size: 0.875rem;
    font-weight: 700;
    color: #ffffff;
    background: #296ff9;
    border-radius: 4px;
    padding: 10px 14px;
    white-space: nowrap;
}

.kva-help-slot {
    margin: 10px 0 0;
}

.kva-help-slot__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 14px;
    border: 1.5px solid rgba(41, 111, 249, 0.35);
    border-radius: 999px;
    background: rgba(248, 250, 255, 0.95);
    color: #296ff9;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 650;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.kva-help-slot__btn:hover {
    background: #ffffff;
    border-color: #296ff9;
}

.kva-help-slot__btn:focus-visible {
    outline: 2px solid #296ff9;
    outline-offset: 2px;
}

/* Our always-visible launcher — above eVisa sticky, under expanded sheet. */
.kva-fab {
    position: fixed;
    z-index: 85;
    inset-inline-end: 16px;
    bottom: calc(var(--kva-clearance, 16px) + env(safe-area-inset-bottom, 0px));
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 10px 14px;
    border: 0;
    border-radius: 999px;
    background: #296ff9;
    color: #fff;
    box-shadow: 0 8px 24px rgba(41, 111, 249, 0.35);
    font: inherit;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.kva-fab:focus-visible {
    outline: 2px solid #1c4494;
    outline-offset: 2px;
}

body.kva-voice-open .kva-fab {
    opacity: 0;
    pointer-events: none;
}

/* Hide default ElevenLabs bubble — we use .kva-fab instead. */
elevenlabs-convai.kva-widget {
    z-index: 80 !important;
    bottom: calc(var(--kva-clearance, 16px) + env(safe-area-inset-bottom, 0px)) !important;
    top: auto !important;
    /* Keep host for the sheet; collapse the default launcher footprint. */
    opacity: 0;
    pointer-events: none;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

body.kva-voice-open elevenlabs-convai.kva-widget {
    opacity: 1;
    pointer-events: auto;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
}

/* Expanded call / chat sheet: above navbar (z-index ~10001) so header never covers it. */
body.kva-voice-open elevenlabs-convai.kva-widget {
    z-index: 10050 !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
}

body.kva-voice-open {
    overflow: hidden;
}

/* Keep Apply sticky usable while launcher is collapsed. */
@media (max-width: 1023px) {
    body.evisa-info-page {
        --kva-clearance: calc(var(--evisa-mobile-sticky-h, 6.75rem) + 12px);
    }

    body.evisa-info-page:not(.kva-voice-open) .evisa-mobile-sticky {
        z-index: 90;
    }

    body.evisa-info-page:not(.kva-voice-open) elevenlabs-convai.kva-widget {
        z-index: 80 !important;
    }

    body.evisa-info-page.kva-voice-open .evisa-mobile-sticky {
        z-index: 70;
        pointer-events: none;
        opacity: 0;
    }
}

@media (max-width: 768px) {
    .kva-banner__btn {
        padding: 16px 14px;
        border-radius: 12px;
        align-items: flex-start;
    }

    .kva-banner__icon {
        width: 44px;
        height: 44px;
    }

    .kva-banner__title {
        font-size: 0.9375rem;
    }

    .kva-banner__desc {
        font-size: 0.8125rem;
        line-height: 1.45;
    }

    .kva-banner__cta {
        align-self: center;
        padding: 10px 12px;
        font-size: 0.8125rem;
    }
}
