.kchat-wrap {
    --kchat-blue: #227de9;
    --kchat-blue-dark: #1c67cb;
    --kchat-blue-soft: #e8f2ff;
    --kchat-text: #172b4d;
    --kchat-muted: #6b7b93;
    --kchat-line: #dce4ef;
    --kchat-surface: #ffffff;
    --kchat-shadow: 0 22px 48px rgba(17, 30, 55, 0.24);
    --kchat-toggle-grad-start: #2a10bf;
    --kchat-toggle-grad-end: #2f22d9;
    --kchat-toggle-icon: #ffffff;
    --kchat-toggle-shadow: rgba(42, 16, 191, 0.36);
    --kchat-toggle-shadow-strong: rgba(42, 16, 191, 0.4);
    --kchat-toggle-pulse: rgba(42, 16, 191, 0.45);
    --kchat-toggle-pulse-clear: rgba(42, 16, 191, 0);
    --kchat-mobile-icon-scale: 1;

    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 2147483000;
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    line-height: 1.4;
}

.kchat-panel {
    width: min(390px, calc(100vw - 16px));
    height: min(690px, calc(100vh - 96px));
    border-radius: 20px;
    background: #f4f7fb;
    border: 1px solid #d7e2f1;
    box-shadow: var(--kchat-shadow);
    overflow: hidden;
    display: none;
    flex-direction: column;
    margin-bottom: 12px;
}

.kchat-panel.open {
    display: flex;
}

.kchat-launcher {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 12px;
}

.kchat-prompt {
    border: 0;
    border-radius: 14px;
    background: #fff;
    color: var(--kchat-text);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    box-shadow: 0 8px 24px rgba(17, 30, 55, 0.16);
    min-width: 176px;
    padding: 12px 16px;
    text-align: left;
    cursor: pointer;
    position: relative;
}

.kchat-prompt::after {
    content: "";
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 3px;
}

.kchat-prompt-title,
.kchat-prompt-sub {
    display: block;
    position: relative;
    z-index: 1;
}

.kchat-prompt-title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 3px;
}

.kchat-prompt-sub {
    font-size: 13px;
    font-weight: 500;
    color: #505f79;
    line-height: 1.2;
}

.kchat-toggle {
    width: 72px;
    height: 72px;
    border-radius: 999px;
    border: 0;
    background: linear-gradient(140deg, var(--kchat-toggle-grad-start), var(--kchat-toggle-grad-end));
    color: var(--kchat-toggle-icon);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 30px var(--kchat-toggle-shadow);
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.kchat-toggle:hover {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 16px 34px var(--kchat-toggle-shadow-strong);
}

.kchat-toggle-icon {
    width: 28px;
    height: 28px;
    display: inline-flex;
}

.kchat-toggle-icon-collapse {
    display: none;
}

.kchat-toggle.is-open .kchat-toggle-icon-chat {
    display: none;
}

.kchat-toggle.is-open .kchat-toggle-icon-collapse {
    display: inline-flex;
}

.kchat-toggle-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.kchat-wrap .kchat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    padding: 12px 44px 12px 12px;
    border-bottom: 1px solid #d7e2f1;
    background: #f8fbff;
}

.kchat-wrap .kchat-head-main {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.kchat-wrap .kchat-head-identity {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 9px;
    min-width: 0;
    padding-right: 6px;
}

.kchat-wrap .kchat-head-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--kchat-blue-soft);
    color: var(--kchat-blue-dark);
    font-weight: 800;
    font-size: 13px;
}

.kchat-wrap .kchat-head-text {
    min-width: 0;
}

.kchat-wrap .kchat-head-title {
    font-size: 14px;
    font-weight: 700;
    color: #14335d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kchat-wrap .kchat-head-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #4c6487;
}

.kchat-wrap .kchat-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #2fd36a;
}

.kchat-wrap .kchat-head-close {
    width: 30px;
    height: 30px;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    flex-shrink: 0;
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid #1e6fd0;
    background: #227de9;
    color: #ffffff;
    font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.kchat-intro {
    padding: 14px;
    background: linear-gradient(180deg, #f3f7fe 0, #f6f9fe 100%);
}

.kchat-intro-hero {
    border-radius: 18px 18px 12px 12px;
    background: linear-gradient(165deg, #227de9, #278bf2 42%, #5baaf8 100%);
    color: #fff;
    padding: 16px 14px 18px;
    min-height: 180px;
}

.kchat-intro-avatars {
    display: inline-flex;
    align-items: center;
}

.kchat-intro-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.35);
    margin-right: -8px;
}

.kchat-intro-avatar:nth-child(1) {
    background: #ffae57;
}

.kchat-intro-avatar:nth-child(2) {
    background: #5fbe42;
}

.kchat-intro-avatar:nth-child(3) {
    background: #12263a;
}

.kchat-intro-hello {
    margin-top: 20px;
    font-size: 30px;
    font-weight: 800;
    line-height: 1.05;
}

.kchat-intro-lead {
    margin-top: 8px;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
}

.kchat-intro-sub {
    margin-top: 6px;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.25;
    color: rgba(255, 255, 255, 0.92);
}

.kchat-intro-card {
    margin: -12px 10px 0;
    border-radius: 11px;
    border: 1px solid #d7e2f1;
    background: #fff;
    box-shadow: 0 12px 30px rgba(17, 30, 55, 0.12);
    overflow: hidden;
}

.kchat-intro-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 14px 10px;
}

.kchat-intro-card-title {
    font-size: 16px;
    font-weight: 700;
    color: #1d3352;
}

.kchat-intro-card-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.kchat-intro-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    border-radius: 999px;
    padding: 0 7px;
    background: #ff5f6f;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.kchat-intro-seeall {
    border: 0;
    background: transparent;
    color: var(--kchat-blue);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.kchat-intro-item {
    width: 100%;
    border: 0;
    background: #fff;
    border-top: 1px solid #edf2f9;
    border-bottom: 1px solid #edf2f9;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    cursor: pointer;
}

.kchat-intro-item-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(140deg, #ffb164, #ff9460);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.kchat-intro-item-main {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.kchat-intro-item-title {
    font-size: 14px;
    color: #142b4c;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kchat-intro-item-meta {
    font-size: 12px;
    color: #6c7c93;
}

.kchat-intro-item-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ff4141;
    flex-shrink: 0;
}

.kchat-intro-empty {
    padding: 0 14px 12px;
    color: #6d7d94;
    font-size: 14px;
    display: none;
}

.kchat-intro-start-wrap {
    padding: 12px 14px 14px;
}

.kchat-intro-start {
    width: 100%;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(140deg, #227de9, #2589f2);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    padding: 12px 16px;
    cursor: pointer;
}

.kchat-panel.home-mode .kchat-foot {
    display: none;
}

.kchat-body {
    flex: 1;
    overflow-y: auto;
    background: #f8fbff;
    padding: 12px;
    scrollbar-width: thin;
}

.kchat-body::-webkit-scrollbar {
    width: 7px;
}

.kchat-body::-webkit-scrollbar-thumb {
    background: rgba(47, 86, 133, 0.3);
    border-radius: 999px;
}

.kchat-date-sep {
    margin: 10px auto 12px;
    width: fit-content;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #dbe5f2;
    color: #6b7c93;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
}

.kchat-row {
    margin-bottom: 11px;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.kchat-row.user {
    align-items: flex-end;
}

.kchat-row.bot {
    align-items: flex-start;
}

.kchat-bubble {
    max-width: min(88%, 340px);
    border-radius: 14px;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.45;
    word-break: break-word;
    white-space: pre-wrap;
}

.kchat-row.bot .kchat-bubble {
    background: #fff;
    border: 1px solid #dce6f3;
    color: #1c3558;
}

.kchat-row.user .kchat-bubble {
    background: linear-gradient(140deg, #227de9, #2589f2);
    border: 1px solid #1d6fcd;
    color: #fff;
}

.kchat-meta {
    margin-top: 4px;
    font-size: 10px;
    color: #6f819a;
}

.kchat-bubble-typing {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.kchat-typing-label {
    font-size: 12px;
    color: #4f6788;
}

.kchat-typing-dots {
    display: inline-flex;
    gap: 3px;
}

.kchat-typing-dots i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #7f95b2;
    animation: kchatTypingPulse 1.1s infinite ease-in-out;
}

.kchat-typing-dots i:nth-child(2) {
    animation-delay: 0.16s;
}

.kchat-typing-dots i:nth-child(3) {
    animation-delay: 0.32s;
}

@keyframes kchatTypingPulse {
    0%, 80%, 100% {
        opacity: 0.2;
        transform: translateY(0);
    }
    40% {
        opacity: 1;
        transform: translateY(-2px);
    }
}

@keyframes kchatMobilePulse {
    0% {
        box-shadow: 0 0 0 0 var(--kchat-toggle-pulse);
    }
    70% {
        box-shadow: 0 0 0 16px var(--kchat-toggle-pulse-clear);
    }
    100% {
        box-shadow: 0 0 0 0 var(--kchat-toggle-pulse-clear);
    }
}

@keyframes kchatPromptFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-2px);
    }
}

.kchat-cards,
.kchat-row-actions {
    margin-top: 8px;
    width: 100%;
    max-width: min(100%, 350px);
}

.kchat-cards {
    display: grid;
    gap: 10px;
}

.kchat-card {
    background: #fff;
    border: 1px solid #d7e2f1;
    border-radius: 12px;
    overflow: hidden;
}

.kchat-card-media {
    display: block;
    height: 140px;
    background: linear-gradient(145deg, #d9e6f8, #eef4fd);
}

.kchat-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.kchat-card-content {
    padding: 10px;
}

.kchat-card-title {
    display: block;
    color: #1b4f95;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    margin-bottom: 6px;
}

.kchat-card-title:hover {
    text-decoration: underline;
}

.kchat-card-description,
.kchat-card-seller,
.kchat-card-owner-contact {
    margin: 0 0 8px;
    color: #445d7c;
    font-size: 12px;
}

.kchat-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.kchat-chip {
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 700;
    background: #edf3fd;
    color: #284b78;
}

.kchat-chip-primary {
    background: #e8f2ff;
    color: #1c67cb;
}

.kchat-card-actions,
.kchat-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.kchat-card-action,
.kchat-row-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    border: 1px solid #c4d7f0;
    background: #f6faff;
    color: #244a7a;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    padding: 7px 10px;
    cursor: pointer;
}

.kchat-card-action-wa {
    border-color: #bfe9d1;
    background: #edfff4;
    color: #0d7a3d;
}

.kchat-feedback {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
}

.kchat-feedback-btn {
    border: 1px solid #d3dfef;
    background: #fff;
    border-radius: 999px;
    min-width: 28px;
    min-height: 28px;
    padding: 4px 10px;
    font-size: 11px;
    line-height: 1.1;
    cursor: pointer;
}

.kchat-feedback-btn:disabled {
    opacity: 0.65;
    cursor: default;
}

.kchat-feedback-note {
    font-size: 11px;
    color: #617a99;
}

.kchat-row-csat .kchat-csat {
    width: 100%;
    max-width: min(100%, 352px);
    background: #ffffff;
    border: 1px solid #d7e2f1;
    border-radius: 12px;
    padding: 10px;
}

.kchat-csat-title {
    font-size: 13px;
    font-weight: 700;
    color: #17385f;
}

.kchat-csat-subtitle {
    margin-top: 2px;
    font-size: 11px;
    color: #607a99;
}

.kchat-csat-resolved {
    margin-top: 8px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 11px;
    color: #4e6586;
}

.kchat-csat-pill {
    border: 1px solid #d0deef;
    background: #f6faff;
    color: #244a7a;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 11px;
    cursor: pointer;
}

.kchat-csat-pill.is-active {
    background: #e5f1ff;
    border-color: #6ea6ea;
}

.kchat-csat-scores {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.kchat-csat-score {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid #d0deef;
    background: #f8fbff;
    color: #1d406b;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.kchat-csat-score.is-active {
    border-color: #2d7fe2;
    background: #2d7fe2;
    color: #fff;
}

.kchat-csat-comment {
    width: 100%;
    margin-top: 8px;
    border: 1px solid #d0deef;
    border-radius: 8px;
    padding: 7px 8px;
    font-size: 12px;
    color: #17385f;
    resize: vertical;
    min-height: 52px;
}

.kchat-csat-actions {
    margin-top: 8px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.kchat-csat-submit,
.kchat-csat-skip {
    border-radius: 9px;
    border: 1px solid #c4d7f0;
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.kchat-csat-submit {
    background: linear-gradient(140deg, #227de9, #2589f2);
    border-color: #227de9;
    color: #fff;
}

.kchat-csat-skip {
    background: #fff;
    color: #294f7f;
}

.kchat-csat-note {
    min-height: 14px;
    margin-top: 6px;
    font-size: 11px;
    color: #5f7697;
}

.kchat-csat-note.is-error {
    color: #c03333;
}

.kchat-prechat {
    display: none;
    margin-bottom: 8px;
    border: 1px solid #d7e2f1;
    border-radius: 11px;
    background: #fff;
    padding: 10px;
}

.kchat-prechat-title {
    font-size: 12px;
    font-weight: 700;
    color: #1b365d;
}

.kchat-prechat-hint {
    margin: 4px 0 8px;
    font-size: 11px;
    color: #5f7188;
}

.kchat-prechat-input {
    width: 100%;
    border: 1px solid #d0deef;
    border-radius: 9px;
    padding: 9px 10px;
    margin-bottom: 7px;
    font-size: 12px;
}

.kchat-prechat-error {
    min-height: 16px;
    margin-bottom: 6px;
    font-size: 11px;
    color: #c12f2f;
}

.kchat-prechat-start {
    border: 0;
    border-radius: 9px;
    background: linear-gradient(140deg, #227de9, #2589f2);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 9px 12px;
    cursor: pointer;
}

.kchat-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.kchat-quick button {
    border: 1px solid #d0deef;
    background: #fff;
    color: #2d4f79;
    border-radius: 999px;
    padding: 6px 9px;
    font-size: 12px;
    cursor: pointer;
}

.kchat-foot {
    border-top: 1px solid #d7e2f1;
    background: #f8fbff;
    padding: 10px;
}

.kchat-input-wrap {
    display: flex;
    gap: 8px;
}

.kchat-input-wrap input {
    flex: 1;
    border: 1px solid #cfdcef;
    border-radius: 10px;
    padding: 10px 11px;
    font-size: 13px;
    color: #16355b;
    background: #fff;
}

.kchat-input-wrap button {
    border: 0;
    border-radius: 10px;
    background: linear-gradient(140deg, #227de9, #2589f2);
    color: #fff;
    font-weight: 700;
    padding: 10px 14px;
    cursor: pointer;
}

@media (max-width: 700px) {
    .kchat-wrap {
        --kchat-mobile-footer-clearance: calc(env(safe-area-inset-bottom, 0px) + 68px);
        --kchat-mobile-top-clearance: max(env(safe-area-inset-top, 0px), 8px);
        --kchat-mobile-launcher-space: calc(78px * var(--kchat-mobile-icon-scale));
        right: 8px;
        bottom: var(--kchat-mobile-footer-clearance);
    }

    .kchat-panel {
        width: calc(100vw - 12px);
        height: calc(100dvh - var(--kchat-mobile-footer-clearance) - var(--kchat-mobile-launcher-space) - var(--kchat-mobile-top-clearance));
        max-height: calc(100vh - var(--kchat-mobile-footer-clearance) - var(--kchat-mobile-launcher-space) - var(--kchat-mobile-top-clearance));
        min-height: 340px;
        border-radius: 16px;
        margin-bottom: 6px;
    }

    .kchat-prompt {
        min-width: 168px;
        padding: 10px 13px;
        border-radius: 12px;
        animation: kchatPromptFloat 2.4s ease-in-out infinite;
    }

    .kchat-prompt-title {
        font-size: 15px;
    }

    .kchat-prompt-sub {
        font-size: 12px;
    }

    .kchat-toggle {
        width: calc(62px * var(--kchat-mobile-icon-scale));
        height: calc(62px * var(--kchat-mobile-icon-scale));
        animation: kchatMobilePulse 2s infinite;
    }

    .kchat-toggle.is-open {
        animation: none;
    }

    .kchat-toggle-icon {
        width: calc(25px * var(--kchat-mobile-icon-scale));
        height: calc(25px * var(--kchat-mobile-icon-scale));
    }

    .kchat-wrap .kchat-head {
        padding-right: 42px;
    }

    .kchat-wrap .kchat-head-close {
        width: 30px;
        height: 30px;
        right: 8px;
        top: 8px;
        transform: none;
        font-size: 20px;
    }

    .kchat-intro {
        padding: 10px;
    }

    .kchat-intro-hero {
        min-height: 150px;
    }

    .kchat-intro-hello {
        font-size: 26px;
    }

    .kchat-intro-lead {
        font-size: 20px;
    }

    .kchat-intro-sub {
        font-size: 15px;
    }
}

@media (max-width: 420px) {
    .kchat-launcher {
        gap: 8px;
    }

    .kchat-prompt {
        min-width: 152px;
        padding: 9px 12px;
    }

    .kchat-prompt-title {
        font-size: 14px;
    }

    .kchat-prompt-sub {
        font-size: 11px;
    }

    .kchat-toggle {
        width: calc(58px * var(--kchat-mobile-icon-scale));
        height: calc(58px * var(--kchat-mobile-icon-scale));
    }

    .kchat-toggle-icon {
        width: calc(24px * var(--kchat-mobile-icon-scale));
        height: calc(24px * var(--kchat-mobile-icon-scale));
    }

    .kchat-intro-item-title {
        font-size: 13px;
    }

    .kchat-intro-item-meta {
        font-size: 12px;
    }
}

@media (max-width: 360px) {
    .kchat-wrap {
        --kchat-mobile-footer-clearance: calc(env(safe-area-inset-bottom, 0px) + 60px);
        --kchat-mobile-top-clearance: max(env(safe-area-inset-top, 0px), 6px);
        --kchat-mobile-launcher-space: calc(72px * var(--kchat-mobile-icon-scale));
        left: 4px;
        right: 4px;
        bottom: var(--kchat-mobile-footer-clearance);
    }

    .kchat-panel {
        width: 100%;
        height: calc(100dvh - var(--kchat-mobile-footer-clearance) - var(--kchat-mobile-launcher-space) - var(--kchat-mobile-top-clearance));
        max-height: calc(100vh - var(--kchat-mobile-footer-clearance) - var(--kchat-mobile-launcher-space) - var(--kchat-mobile-top-clearance));
        min-height: 320px;
        border-radius: 12px;
        margin-bottom: 6px;
    }

    .kchat-wrap .kchat-head {
        padding: 9px 40px 9px 9px;
    }

    .kchat-wrap .kchat-head-title {
        font-size: 13px;
    }

    .kchat-wrap .kchat-head-close {
        right: 8px;
        width: 28px;
        height: 28px;
        font-size: 18px;
        top: 8px;
        transform: none;
        z-index: 30;
    }

    .kchat-prompt {
        min-width: 136px;
        padding: 8px 10px;
    }

    .kchat-prompt-title {
        font-size: 13px;
    }

    .kchat-prompt-sub {
        font-size: 10px;
    }

    .kchat-toggle {
        width: calc(56px * var(--kchat-mobile-icon-scale));
        height: calc(56px * var(--kchat-mobile-icon-scale));
    }

    .kchat-toggle-icon {
        width: calc(22px * var(--kchat-mobile-icon-scale));
        height: calc(22px * var(--kchat-mobile-icon-scale));
    }

    .kchat-intro {
        padding: 8px;
    }

    .kchat-intro-hero {
        min-height: 140px;
        padding: 13px 11px 15px;
    }

    .kchat-intro-hello {
        margin-top: 14px;
        font-size: 23px;
    }

    .kchat-intro-lead {
        font-size: 17px;
    }

    .kchat-intro-sub {
        font-size: 13px;
    }

    .kchat-intro-card {
        margin: -10px 8px 0;
    }

    .kchat-intro-card-title {
        font-size: 14px;
    }

    .kchat-intro-item {
        padding: 11px;
    }

    .kchat-intro-item-avatar {
        width: 34px;
        height: 34px;
    }

    .kchat-intro-start {
        font-size: 14px;
        padding: 10px 14px;
    }

    .kchat-body {
        padding: 9px;
    }

    .kchat-foot {
        padding: 8px;
    }

    .kchat-input-wrap {
        gap: 6px;
    }

    .kchat-input-wrap input {
        min-width: 0;
        font-size: 12px;
        padding: 9px 10px;
    }

    .kchat-input-wrap button {
        font-size: 12px;
        padding: 9px 10px;
    }

    .kchat-row-csat .kchat-csat {
        max-width: 100%;
        padding: 9px;
    }

    .kchat-csat-title {
        font-size: 12px;
    }

    .kchat-csat-subtitle {
        font-size: 10px;
    }
}

@media (max-width: 300px) {
    .kchat-wrap {
        --kchat-mobile-footer-clearance: calc(env(safe-area-inset-bottom, 0px) + 56px);
        --kchat-mobile-top-clearance: max(env(safe-area-inset-top, 0px), 4px);
        --kchat-mobile-launcher-space: calc(70px * var(--kchat-mobile-icon-scale));
        left: 2px;
        right: 2px;
        bottom: var(--kchat-mobile-footer-clearance);
    }

    .kchat-panel {
        width: 100%;
        height: calc(100dvh - var(--kchat-mobile-footer-clearance) - var(--kchat-mobile-launcher-space) - var(--kchat-mobile-top-clearance));
        max-height: calc(100vh - var(--kchat-mobile-footer-clearance) - var(--kchat-mobile-launcher-space) - var(--kchat-mobile-top-clearance));
        min-height: 300px;
        border-radius: 10px;
        margin-bottom: 4px;
    }

    .kchat-wrap .kchat-head {
        padding: 8px 36px 8px 8px;
    }

    .kchat-wrap .kchat-head-close {
        right: 6px;
        width: 24px;
        height: 24px;
        border-radius: 8px;
        font-size: 16px;
        top: 6px;
        transform: none;
        z-index: 32;
    }

    .kchat-launcher {
        gap: 6px;
    }

    .kchat-prompt {
        display: flex;
        min-width: 116px;
        padding: 7px 8px;
    }

    .kchat-toggle {
        width: calc(52px * var(--kchat-mobile-icon-scale));
        height: calc(52px * var(--kchat-mobile-icon-scale));
    }

    .kchat-toggle-icon {
        width: calc(20px * var(--kchat-mobile-icon-scale));
        height: calc(20px * var(--kchat-mobile-icon-scale));
    }

    .kchat-intro-hero {
        min-height: 126px;
        padding: 12px 10px 14px;
    }

    .kchat-intro-hello {
        font-size: 20px;
    }

    .kchat-intro-lead {
        font-size: 15px;
    }

    .kchat-intro-sub {
        font-size: 12px;
    }

    .kchat-intro-card {
        margin: -10px 6px 0;
    }

    .kchat-intro-card-head {
        padding: 10px;
    }

    .kchat-intro-count {
        min-width: 20px;
        height: 20px;
        font-size: 10px;
        padding: 0 6px;
    }

    .kchat-intro-seeall {
        font-size: 12px;
    }

    .kchat-intro-item {
        padding: 10px;
    }

    .kchat-intro-start-wrap {
        padding: 10px;
    }

    .kchat-prechat {
        padding: 8px;
    }

    .kchat-prechat-input {
        font-size: 11px;
        padding: 8px 9px;
    }

    .kchat-body {
        padding: 8px;
    }

    .kchat-bubble {
        max-width: min(94%, 250px);
        font-size: 12px;
    }

    .kchat-card-media {
        height: 118px;
    }

    .kchat-card-content {
        padding: 8px;
    }

    .kchat-card-title {
        font-size: 13px;
    }

    .kchat-foot {
        padding: 7px;
    }

    .kchat-quick {
        gap: 4px;
    }

    .kchat-quick button {
        font-size: 11px;
        padding: 5px 8px;
    }

    .kchat-input-wrap {
        gap: 5px;
    }

    .kchat-input-wrap input {
        font-size: 12px;
        padding: 8px 9px;
    }

    .kchat-input-wrap button {
        min-width: 52px;
        font-size: 11px;
        padding: 8px 9px;
    }

    .kchat-csat-resolved {
        font-size: 10px;
    }

    .kchat-csat-pill,
    .kchat-csat-submit,
    .kchat-csat-skip {
        font-size: 11px;
        padding: 6px 8px;
    }

    .kchat-csat-score {
        width: 26px;
        height: 26px;
        font-size: 11px;
    }

    .kchat-csat-comment {
        font-size: 11px;
        padding: 7px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .kchat-toggle,
    .kchat-typing-dots i {
        transition: none;
        animation: none;
    }
}
