.iqb-chat {
    --iqb-primary: #6d28d9;
    --iqb-primary-dark: #ec4899;
    --iqb-accent: #fb923c;
    --iqb-ink: #0f172a;
    --iqb-muted: #687085;
    --iqb-line: #e9eaf2;
    position: fixed;
    z-index: 999999;
    right: 22px;
    bottom: 22px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--iqb-ink);
}

.iqb-chat *,
.iqb-chat *::before,
.iqb-chat *::after {
    box-sizing: border-box;
}

.iqb-chat__launcher {
    display: grid;
    width: 58px;
    height: 58px;
    margin-left: auto;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--iqb-primary) 0%, var(--iqb-primary-dark) 58%, var(--iqb-accent) 100%);
    box-shadow: 0 14px 38px color-mix(in srgb, var(--iqb-primary) 35%, transparent);
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
}

.iqb-chat__launcher:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 18px 44px color-mix(in srgb, var(--iqb-primary) 42%, transparent);
}

.iqb-chat__launcher:focus-visible,
.iqb-chat button:focus-visible,
.iqb-chat textarea:focus-visible,
.iqb-chat a:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--iqb-primary) 32%, transparent);
    outline-offset: 3px;
}

.iqb-chat__launcher svg {
    width: 27px;
    height: 27px;
    fill: currentColor;
}

.iqb-chat__launcher-close {
    display: none;
}

.iqb-chat.is-open .iqb-chat__launcher-open {
    display: none;
}

.iqb-chat.is-open .iqb-chat__launcher-close {
    display: block;
}

.iqb-chat__panel {
    position: absolute;
    right: 0;
    bottom: 72px;
    display: grid;
    grid-template-rows: auto minmax(180px, 1fr) auto auto auto;
    width: min(385px, calc(100vw - 28px));
    height: min(600px, calc(100vh - 120px));
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .8);
    border-radius: 24px;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 28px 80px rgba(27, 27, 70, .22);
    opacity: 0;
    visibility: hidden;
    transform: translateY(14px) scale(.97);
    transform-origin: bottom right;
    transition: opacity .22s ease, transform .22s ease, visibility .22s;
}

.iqb-chat.is-open .iqb-chat__panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.iqb-chat__header {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 76px;
    padding: 15px 16px;
    color: #fff;
    background:
        radial-gradient(circle at 85% -20%, rgba(255, 255, 255, .28), transparent 42%),
        linear-gradient(135deg, var(--iqb-primary) 0%, var(--iqb-primary-dark) 58%, var(--iqb-accent) 100%);
}

.iqb-chat__header strong,
.iqb-chat__header small {
    display: block;
}

.iqb-chat__header strong {
    margin-bottom: 2px;
    font-size: 15px;
}

.iqb-chat__header small {
    color: rgba(255, 255, 255, .76);
    font-size: 12px;
}

.iqb-chat__avatar {
    display: grid;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 14px;
    background: rgba(255, 255, 255, .17);
}

.iqb-chat__avatar svg {
    width: 23px;
    height: 23px;
    fill: currentColor;
}

.iqb-chat__close {
    width: 36px;
    height: 36px;
    margin-left: auto;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: rgba(255, 255, 255, .12);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.iqb-chat__messages {
    overflow-y: auto;
    padding: 18px 16px 10px;
    background:
        radial-gradient(circle at 0 0, color-mix(in srgb, var(--iqb-primary) 7%, transparent), transparent 38%),
        #fbfbfe;
    scrollbar-width: thin;
}

.iqb-chat__message {
    width: fit-content;
    max-width: 86%;
    margin: 0 0 11px;
    padding: 11px 13px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.iqb-chat__message--assistant {
    border: 1px solid var(--iqb-line);
    border-bottom-left-radius: 5px;
    background: #fff;
    box-shadow: 0 7px 18px rgba(30, 35, 70, .05);
}

.iqb-chat__message--user {
    margin-left: auto;
    border-bottom-right-radius: 5px;
    color: #fff;
    background: var(--iqb-primary);
}

.iqb-chat__message[data-iqb-temporary] {
    color: var(--iqb-muted);
    animation: iqb-pulse 1s ease-in-out infinite alternate;
}

.iqb-chat__actions {
    display: flex;
    gap: 8px;
    padding: 8px 16px 4px;
    overflow-x: auto;
    background: #fff;
}

.iqb-chat__action {
    flex: 0 0 auto;
    padding: 7px 11px;
    border: 1px solid color-mix(in srgb, var(--iqb-primary) 30%, #fff);
    border-radius: 999px;
    color: var(--iqb-primary);
    background: color-mix(in srgb, var(--iqb-primary) 6%, #fff);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.iqb-chat__action--whatsapp {
    border-color: rgba(25, 190, 98, .28);
    color: #118746;
    background: #effbf4;
}

.iqb-chat__form {
    display: flex;
    align-items: flex-end;
    gap: 9px;
    padding: 10px 12px;
    border-top: 1px solid var(--iqb-line);
    background: #fff;
}

.iqb-chat__form textarea {
    display: block;
    width: 100%;
    min-height: 44px;
    max-height: 110px;
    margin: 0;
    padding: 11px 13px;
    resize: none;
    border: 1px solid #dfe1ea;
    border-radius: 14px;
    color: var(--iqb-ink);
    background: #f8f8fc;
    box-shadow: none;
    font: inherit;
    font-size: 14px;
    line-height: 1.45;
}

.iqb-chat__form button {
    display: grid;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 14px;
    color: #fff;
    background: var(--iqb-primary);
    cursor: pointer;
}

.iqb-chat__form button:disabled {
    opacity: .55;
    cursor: wait;
}

.iqb-chat__form button svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.iqb-chat__privacy {
    margin: 0;
    padding: 0 14px 10px;
    color: var(--iqb-muted);
    background: #fff;
    font-size: 10px;
    line-height: 1.35;
    text-align: center;
}

@keyframes iqb-pulse {
    to { opacity: .52; }
}

@media (max-width: 520px) {
    .iqb-chat {
        right: 14px;
        bottom: 14px;
    }

    .iqb-chat__panel {
        position: fixed;
        inset: 10px 10px 82px;
        width: auto;
        height: auto;
        border-radius: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .iqb-chat *,
    .iqb-chat *::before,
    .iqb-chat *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* Zevanta Digital site-wide brand palette */
.iqb-chat__header {
    color: #f7f9ff !important;
    background: linear-gradient(135deg, #06070b 0%, #0d1018 58%, #16243a 100%) !important;
    border-bottom: 1px solid rgba(73, 242, 194, .28);
    box-shadow: 0 12px 34px rgba(0, 0, 0, .28);
}

.iqb-chat__launcher {
    color: #06100d !important;
    background: linear-gradient(135deg, #49f2c2 0%, #ffcf5a 100%) !important;
    box-shadow: 0 16px 42px rgba(73, 242, 194, .30) !important;
}

.iqb-chat__message--user,
.iqb-chat__form button {
    color: #06100d !important;
    background: linear-gradient(135deg, #49f2c2 0%, #7aa8ff 100%) !important;
}

.iqb-chat__action:not(.iqb-chat__action--whatsapp) {
    border-color: rgba(73, 242, 194, .42) !important;
    color: #087a62 !important;
    background: linear-gradient(135deg, rgba(73, 242, 194, .14), rgba(255, 207, 90, .16)) !important;
}

.iqb-chat__panel {
    border-color: rgba(73, 242, 194, .24) !important;
    box-shadow: 0 28px 80px rgba(0, 0, 0, .24), 0 0 0 1px rgba(73, 242, 194, .08) !important;
}

.iqb-chat__form textarea:focus {
    border-color: #49f2c2 !important;
    box-shadow: 0 0 0 3px rgba(73, 242, 194, .16) !important;
}

/* Supplied robot artwork for the floating chatbot launcher */
.iqb-chat:not(.is-open) .iqb-chat__launcher svg {
    display: none !important;
}

.iqb-chat:not(.is-open) .iqb-chat__launcher::before {
    content: "";
    display: block;
    width: 48px;
    height: 48px;
    border: 2px solid rgba(255, 255, 255, .72);
    border-radius: 50%;
    background: url("https://zevantadigital.com/wp-content/uploads/chatbot-assets/zevanta-chatbot-robot.avif") center / cover no-repeat;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
}

