:root {
    --skcb-green: #18ef36;
    --skcb-green-dark: #0cc52a;
    --skcb-black: #07100b;
    --skcb-panel: #ffffff;
    --skcb-soft: #f1f5f2;
    --skcb-line: #dce4df;
    --skcb-text: #111713;
    --skcb-muted: #69736d;
}

.skcb,
.skcb * {
    box-sizing: border-box;
}

.skcb {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 999999;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--skcb-text);
}

.skcb button,
.skcb input {
    font: inherit;
}

.skcb__launcher {
    position: relative;
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin-left: auto;
    padding: 0;
    border: 0;
    border-radius: 20px;
    color: var(--skcb-black);
    background: var(--skcb-green);
    box-shadow: 0 14px 35px rgba(0, 0, 0, .24), 0 0 0 5px rgba(24, 239, 54, .12);
    cursor: pointer;
    transition: transform .2s ease, background .2s ease;
}

.skcb__launcher:hover {
    transform: translateY(-3px);
    background: #42ff58;
}

.skcb__launcher:focus-visible,
.skcb__panel button:focus-visible,
.skcb__panel input:focus-visible {
    outline: 3px solid rgba(24, 239, 54, .42);
    outline-offset: 3px;
}

.skcb__launcher svg {
    width: 29px;
    height: 29px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.skcb__launcher-close {
    display: none;
}

.skcb--open .skcb__launcher-chat {
    display: none;
}

.skcb--open .skcb__launcher-close {
    display: block;
}

.skcb__badge {
    position: absolute;
    top: -7px;
    right: -7px;
    display: grid;
    place-items: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    border: 3px solid #fff;
    border-radius: 999px;
    color: #fff;
    background: #ff3434;
    font-size: 11px;
    font-weight: 800;
}

.skcb--open .skcb__badge {
    display: none;
}

.skcb__panel {
    position: absolute;
    right: 0;
    bottom: 82px;
    display: flex;
    flex-direction: column;
    width: min(430px, calc(100vw - 32px));
    height: min(610px, calc(100vh - 130px));
    overflow: hidden;
    border: 1px solid rgba(7, 16, 11, .12);
    border-radius: 25px;
    background: var(--skcb-panel);
    box-shadow: 0 25px 70px rgba(0, 0, 0, .25);
    opacity: 0;
    visibility: hidden;
    transform: translateY(18px) scale(.97);
    transform-origin: bottom right;
    pointer-events: none;
    transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
}

.skcb--open .skcb__panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.skcb__header {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 82px;
    padding: 16px 52px 16px 18px;
    color: #fff;
    background:
        radial-gradient(circle at 90% 0, rgba(24, 239, 54, .25), transparent 44%),
        var(--skcb-black);
}

.skcb__mark {
    display: grid;
    place-items: center;
    width: 45px;
    height: 45px;
    flex: 0 0 45px;
    border: 2px solid var(--skcb-green);
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
}

.skcb__mark img {
    display: block;
    width: 38px;
    height: 38px;
    object-fit: contain;
}

.skcb__header strong,
.skcb__header span {
    display: block;
}

.skcb__header strong {
    margin-bottom: 3px;
    font-size: 16px;
    line-height: 1.2;
}

.skcb__header span {
    color: rgba(255, 255, 255, .72);
    font-size: 12px;
}

.skcb__header span i {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 5px;
    border-radius: 50%;
    background: var(--skcb-green);
    box-shadow: 0 0 9px var(--skcb-green);
}

.skcb__panel-close {
    position: absolute;
    top: 18px;
    right: 16px;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    color: #fff;
    background: rgba(255, 255, 255, .09);
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
}

.skcb__messages {
    flex: 1;
    min-height: 140px;
    overflow: auto;
    padding: 18px;
    background:
        linear-gradient(rgba(7, 16, 11, .025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(7, 16, 11, .025) 1px, transparent 1px),
        #f7f9f7;
    background-size: 24px 24px;
    scrollbar-width: thin;
}

.skcb__message {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    margin-bottom: 12px;
    animation: skcb-message-in .2s ease both;
}

.skcb__message--user {
    justify-content: flex-end;
}

.skcb__avatar {
    display: grid;
    place-items: center;
    width: 31px;
    height: 31px;
    flex: 0 0 31px;
    overflow: hidden;
    border: 1px solid rgba(7, 16, 11, .15);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
}

.skcb__avatar img {
    display: block;
    width: 27px;
    height: 27px;
    object-fit: contain;
}

.skcb__bubble {
    max-width: 84%;
    padding: 11px 14px;
    border: 1px solid var(--skcb-line);
    border-radius: 7px 17px 17px 17px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .055);
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.skcb__message--user .skcb__bubble {
    border-color: var(--skcb-green);
    border-radius: 17px 7px 17px 17px;
    color: var(--skcb-black);
    background: var(--skcb-green);
    font-weight: 600;
}

.skcb__bubble a {
    color: #087d1a;
    font-weight: 700;
    text-decoration: underline;
}

.skcb__whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 43px;
    margin-top: 11px;
    padding: 10px 14px;
    border-radius: 12px;
    color: #07100b !important;
    background: var(--skcb-green);
    font-weight: 800;
    text-decoration: none !important;
}

.skcb__whatsapp:hover {
    background: #42ff58;
}

.skcb__quick-toggle {
    width: 100%;
    min-height: 38px;
    padding: 8px 15px;
    border: 0;
    border-top: 1px solid var(--skcb-line);
    color: #344039;
    background: #fff;
    font-size: 12px;
    font-weight: 800;
    text-align: left;
    cursor: pointer;
}

.skcb__quick-toggle:hover {
    color: #087d1a;
    background: #f5fff6;
}

.skcb--questions-collapsed .skcb__quick-toggle {
    color: #087d1a;
    text-align: center;
}

.skcb__quick {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    max-height: 230px;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 11px 14px;
    border-top: 1px solid #edf1ee;
    background: #fff;
    scrollbar-width: thin;
}

.skcb__quick[hidden] {
    display: none !important;
}

.skcb__quick button {
    width: 100%;
    min-width: 0;
    padding: 8px 11px;
    border: 1px solid #cad5ce;
    border-radius: 999px;
    color: #1c2820;
    background: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    text-align: left;
    white-space: normal;
    cursor: pointer;
}

.skcb__quick button:hover {
    border-color: var(--skcb-green);
    background: #edfff0;
}

.skcb__form {
    display: grid;
    grid-template-columns: 1fr 46px;
    gap: 9px;
    padding: 12px 14px 7px;
    border-top: 1px solid var(--skcb-line);
    background: #fff;
}

.skcb__form input {
    width: 100%;
    height: 46px;
    min-width: 0;
    padding: 0 14px;
    border: 1px solid #ccd5cf;
    border-radius: 13px;
    color: var(--skcb-text);
    background: #f8faf8;
    font-size: 14px;
    box-shadow: none;
}

.skcb__form input:focus {
    border-color: var(--skcb-green-dark);
    background: #fff;
}

.skcb__form button {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 0;
    border-radius: 13px;
    color: var(--skcb-black);
    background: var(--skcb-green);
    cursor: pointer;
}

.skcb__form button svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.skcb__privacy {
    margin: 0;
    padding: 0 14px 10px;
    color: var(--skcb-muted);
    background: #fff;
    font-size: 10px;
    text-align: center;
}

.skcb .screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@keyframes skcb-message-in {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 560px) {
    .skcb {
        right: 14px;
        bottom: 14px;
    }

    .skcb__launcher {
        width: 58px;
        height: 58px;
        border-radius: 18px;
    }

    .skcb__panel {
        position: fixed;
        right: 10px;
        bottom: 82px;
        left: 10px;
        width: auto;
        height: min(650px, calc(100dvh - 102px));
        border-radius: 22px;
        transform-origin: bottom center;
    }

    .skcb__quick {
        grid-template-columns: 1fr;
        max-height: 210px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .skcb__launcher,
    .skcb__panel,
    .skcb__message {
        transition: none;
        animation: none;
    }
}
