.quickbot-widget {
    bottom: 24px;
    color: #17211c;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    position: fixed;
    right: 24px;
    z-index: 99999;
}

.quickbot-widget,
.quickbot-widget * {
    box-sizing: border-box;
    letter-spacing: 0;
}

.quickbot-widget .quickbot-launcher {
    align-items: center;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: 999px;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
    color: #000;
    cursor: pointer;
    display: flex;
    font-size: 15px;
    font-weight: 700;
    gap: 10px;
    line-height: 1;
    min-height: 48px;
    padding: 0 18px;
}

.quickbot-launcher-icon {
    align-items: center;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    display: inline-flex;
    height: 28px;
    justify-content: center;
    width: 28px;
    flex: 0 0 28px;
}

.quickbot-widget .quickbot-launcher-icon svg {
    display: block;
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.quickbot-panel {
    background: #fbfaf7;
    border: 1px solid rgba(23, 33, 28, 0.12);
    border-radius: 8px;
    bottom: calc(100% + 16px);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.24);
    overflow: hidden;
    position: absolute;
    right: 0;
    width: min(360px, calc(100vw - 48px));
    display: flex;
    flex-direction: column;
    max-height: var(--quickbot-panel-height, calc(100vh - 112px));
    max-height: var(--quickbot-panel-height, calc(100dvh - 112px));
}

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

.quickbot-header {
    align-items: center;
    background: var(--quickbot-accent, #1f7a5b);
    color: #fff;
    display: flex;
    justify-content: space-between;
    padding: 16px;
    flex: 0 0 auto;
    gap: 12px;
}

.quickbot-header > div {
    min-width: 0;
    overflow-wrap: anywhere;
}

.quickbot-header strong,
.quickbot-header span {
    display: block;
}

.quickbot-header span {
    font-size: 12px;
    margin-top: 3px;
    opacity: 0.82;
}

.quickbot-widget .quickbot-close {
    background: transparent;
    border: 0;
    color: #fff;
    cursor: pointer;
    font-size: 20px;
    height: 32px;
    line-height: 1;
    width: 32px;
    flex: 0 0 32px;
    min-width: 0;
    padding: 0;
}

.quickbot-body {
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    max-height: 520px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 16px;
}

.quickbot-widget .quickbot-body *,
.quickbot-widget .quickbot-launcher {
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
}

.quickbot-widget .quickbot-launcher {
    padding: 10px 18px;
}

.quickbot-message {
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.45;
    padding: 12px 14px;
}

.quickbot-message-bot {
    background: #fff;
    border: 1px solid rgba(23, 33, 28, 0.1);
}

.quickbot-message-user {
    background: rgba(31, 122, 91, 0.1);
    justify-self: end;
    max-width: 92%;
}

.quickbot-question-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
}

.quickbot-widget .quickbot-question {
    background: #fff;
    border: 1px solid rgba(31, 122, 91, 0.28);
    border-radius: 8px;
    color: #17211c;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.35;
    padding: 11px 12px;
    text-align: left;
    width: 100%;
    height: auto;
    margin: 0;
}

.quickbot-question:hover,
.quickbot-question:focus {
    border-color: var(--quickbot-accent, #1f7a5b);
    outline: 2px solid rgba(31, 122, 91, 0.12);
}

.quickbot-whatsapp {
    align-items: center;
    background: #25d366;
    border-radius: 8px;
    color: #073b1b;
    display: flex;
    font-weight: 800;
    justify-content: center;
    min-height: 44px;
    padding: 0 14px;
    text-decoration: none;
}

@media (max-width: 520px) {
    .quickbot-widget {
        bottom: 16px;
        left: 16px;
        right: 16px;
    }

    .quickbot-widget .quickbot-launcher {
        justify-content: center;
        width: 100%;
    }

    .quickbot-panel {
        left: 0;
        right: 0;
        width: 100%;
    }
}

.quickbot-widget .quickbot-launcher {
    flex-direction: row;
    flex-wrap: nowrap;
    height: auto;
    max-width: calc(100vw - 48px);
    text-transform: none;
}

.quickbot-widget .quickbot-launcher:hover,
.quickbot-widget .quickbot-launcher:focus-visible {
    background: #000;
    color: #fff;
}

.quickbot-widget .quickbot-launcher:focus-visible {
    outline: 2px solid #000;
    outline-offset: 3px;
}

.quickbot-widget .quickbot-launcher-icon,
.quickbot-widget .quickbot-launcher-label {
    margin: 0;
    padding: 0;
    align-self: center;
    color: inherit;
}

.quickbot-widget .quickbot-launcher-icon {
    background: transparent;
}

.quickbot-widget .quickbot-launcher-label {
    display: block;
    flex: 0 1 auto;
    line-height: 1.35;
    text-align: center;
}

.quickbot-widget .quickbot-more-questions {
    font-weight: 700;
}
.quickbot-widget .quickbot-header,
.quickbot-widget .quickbot-header strong,
.quickbot-widget .quickbot-header span,
.quickbot-widget .quickbot-close {
    color: var(--quickbot-header-text, #fff);
}

.quickbot-widget .quickbot-header span {
    opacity: 1;
}

.quickbot-answer-contacts {
    display: grid;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(23, 33, 28, 0.15);
}

.quickbot-widget .quickbot-answer-contacts a:not(.quickbot-whatsapp),
.quickbot-widget .quickbot-page-link {
    color: #176044;
    text-decoration: underline;
}

.quickbot-widget .quickbot-page-link {
    display: block;
    margin-top: 12px;
    font-weight: 700;
}
