#km-chat-widget {
    --km-chat-navy: #061b3a;
    --km-chat-navy-2: #0b2d5c;
    --km-chat-navy-3: #123e73;
    --km-chat-steel: #526172;
    --km-chat-muted: #6b7280;
    --km-chat-border: #dce3ea;
    --km-chat-soft: #f5f7fa;
    --km-chat-panel: #fdfdfb;
    --km-chat-card: #ffffff;
    --km-chat-blue-soft: #eaf2ff;
    --km-chat-green: #16a34a;
    --km-chat-green-soft: #e8f8ee;
    --km-chat-warning: #b56b00;
    --km-chat-warning-soft: #fff4df;
    --km-chat-shadow: 0 22px 60px rgba(6, 27, 58, .22), 0 8px 20px rgba(6, 27, 58, .12);

    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    color: #0f172a;
}

#km-chat-widget,
#km-chat-widget *,
#km-chat-widget *::before,
#km-chat-widget *::after {
    box-sizing: border-box;
}

#km-chat-widget button,
#km-chat-widget input,
#km-chat-widget textarea {
    font-family: inherit;
}

#km-chat-widget [hidden] {
    display: none !important;
}

.km-chat-toggle {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 9998;
    display: inline-flex;
    align-items: center;
    gap: 13px;
    min-height: 62px;
    padding: 0 22px 0 13px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 18px;
    background: linear-gradient(135deg, var(--km-chat-navy), #09284f 62%, #0f365f);
    color: #ffffff;
    box-shadow: 0 18px 38px rgba(6, 27, 58, .32), inset 0 1px 0 rgba(255, 255, 255, .12);
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease, opacity .18s ease;
}

.km-chat-toggle:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, .32);
    box-shadow: 0 22px 48px rgba(6, 27, 58, .38), inset 0 1px 0 rgba(255, 255, 255, .16);
}

.km-chat-toggle:active {
    transform: translateY(0);
}

.km-chat-toggle:focus {
    outline: none;
}

.km-chat-toggle:focus-visible {
    box-shadow: 0 0 0 4px rgba(11, 45, 92, .22), 0 18px 38px rgba(6, 27, 58, .32);
}

.km-chat-toggle.km-chat-toggle-pulse {
    animation: kmChatTogglePulse .22s ease-out;
}

.km-chat-toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .1);
    color: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 8px 16px rgba(0, 0, 0, .2);
}

.km-chat-toggle-icon svg {
    width: 21px;
    height: 21px;
    fill: currentColor;
}

.km-chat-toggle-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    min-width: 0;
}

.km-chat-toggle-text {
    color: #ffffff;
    font-size: 16px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -.01em;
    white-space: nowrap;
}

.km-chat-toggle-subtext {
    display: block;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    color: rgba(255, 255, 255, .72);
    white-space: nowrap;
}

@keyframes kmChatTogglePulse {
    0% { transform: scale(.96); }
    70% { transform: scale(1.04); }
    100% { transform: scale(1); }
}

.km-chat-panel {
    position: absolute;
    right: 0;
    bottom: 76px;
    width: 420px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 112px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(220, 227, 234, .96);
    border-radius: 24px;
    background: var(--km-chat-panel);
    box-shadow: var(--km-chat-shadow);
    transform-origin: bottom right;
}

.km-chat-panel.km-chat-panel-opening {
    animation: kmChatPanelOpen .22s ease-out forwards;
}

.km-chat-panel.km-chat-panel-minimizing {
    animation: kmChatPanelMinimize .18s ease-in forwards;
}

.km-chat-panel.km-chat-panel-closing {
    animation: kmChatPanelClose .2s ease-in forwards;
}

@keyframes kmChatPanelOpen {
    from { opacity: 0; transform: translateY(14px) scale(.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes kmChatPanelMinimize {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to { opacity: 0; transform: translateY(18px) scale(.92); }
}

@keyframes kmChatPanelClose {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to { opacity: 0; transform: translateY(10px) scale(.96); }
}

.km-chat-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 18px 20px;
    background:
        linear-gradient(135deg, rgba(6, 27, 58, .98), rgba(8, 40, 79, .98)),
        radial-gradient(circle at top right, rgba(255, 255, 255, .14), transparent 38%);
    color: #ffffff;
    overflow: hidden;
}

.km-chat-header::after {
    content: "";
    position: absolute;
    right: -34px;
    bottom: -54px;
    width: 190px;
    height: 110px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, 0)),
        repeating-linear-gradient(135deg, rgba(255, 255, 255, .08) 0 1px, transparent 1px 10px);
    transform: rotate(-12deg);
    pointer-events: none;
}

.km-chat-header-main,
.km-chat-header-actions {
    position: relative;
    z-index: 1;
}

.km-chat-header-main {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
}

.km-chat-header-copy {
    min-width: 0;
}

.km-chat-header-main strong {
    display: block;
    font-size: 17px;
    line-height: 1.2;
    font-weight: 900;
    letter-spacing: -.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.km-chat-status-line {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 4px;
    font-size: 13px;
    color: rgba(255, 255, 255, .78);
    white-space: nowrap;
}

.km-chat-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #23c55e;
    box-shadow: 0 0 0 4px rgba(35, 197, 94, .18);
}

.km-chat-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    border-radius: 15px;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .14);
    color: #ffffff;
}

.km-chat-avatar svg {
    width: 23px;
    height: 23px;
    fill: currentColor;
}

.km-chat-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.km-chat-minimize,
.km-chat-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, .11);
    color: #ffffff;
    cursor: pointer;
    transition: background .16s ease, transform .16s ease;
}

.km-chat-minimize:hover,
.km-chat-close:hover {
    background: rgba(255, 255, 255, .2);
    transform: translateY(-1px);
}

.km-chat-minimize svg,
.km-chat-close svg {
    width: 21px;
    height: 21px;
    fill: currentColor;
}

.km-chat-body {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 20px;
    background:
        radial-gradient(circle at top left, rgba(11, 45, 92, .06), transparent 34%),
        linear-gradient(180deg, #f7f9fc, #ffffff 54%);
}

.km-chat-body::-webkit-scrollbar,
.km-chat-messages::-webkit-scrollbar {
    width: 8px;
}

.km-chat-body::-webkit-scrollbar-track,
.km-chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.km-chat-body::-webkit-scrollbar-thumb,
.km-chat-messages::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}

.km-chat-intro,
.km-chat-form-head {
    margin-bottom: 16px;
}

.km-chat-choice-hero,
.km-chat-form-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px;
    border: 1px solid rgba(220, 227, 234, .95);
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff, #fbfcfd);
    box-shadow: 0 14px 32px rgba(6, 27, 58, .06);
}

.km-chat-intro-icon,
.km-chat-form-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 15px;
    background: var(--km-chat-blue-soft);
    color: var(--km-chat-navy-2);
}

.km-chat-intro-icon svg,
.km-chat-form-icon svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.km-chat-form-icon-whatsapp {
    background: var(--km-chat-green-soft);
    color: var(--km-chat-green);
}

.km-chat-intro h4,
.km-chat-form-head h4,
.km-chat-waiting h4,
.km-chat-success h4,
.km-chat-closed h4 {
    margin: 0 0 5px;
    font-size: 20px;
    line-height: 1.2;
    color: #08162c;
    font-weight: 900;
    letter-spacing: -.02em;
}

.km-chat-intro p,
.km-chat-form-head p,
.km-chat-waiting p,
.km-chat-success p,
.km-chat-closed p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--km-chat-muted);
}

.km-chat-choice,
.km-chat-conversation,
.km-chat-prechat-form,
.km-chat-whatsapp-form {
    display: block;
}

.km-chat-action-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    min-height: 92px;
    margin-bottom: 12px;
    padding: 15px 14px;
    border: 1px solid rgba(220, 227, 234, .95);
    border-radius: 20px;
    background: #ffffff;
    color: #0f172a;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 10px 26px rgba(6, 27, 58, .06);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}

.km-chat-action-card:hover {
    transform: translateY(-1px);
    border-color: rgba(11, 45, 92, .22);
    box-shadow: 0 16px 34px rgba(6, 27, 58, .1);
    background: #fcfdff;
}

.km-chat-action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 58px;
    height: 58px;
    border-radius: 17px;
    color: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 10px 18px rgba(6, 27, 58, .12);
}

.km-chat-start .km-chat-action-icon {
    background: linear-gradient(135deg, var(--km-chat-navy), var(--km-chat-navy-2));
}

.km-chat-whatsapp .km-chat-action-icon {
    background: linear-gradient(135deg, #128c3d, #25d366);
}

.km-chat-action-icon svg {
    width: 27px;
    height: 27px;
    fill: currentColor;
}

.km-chat-action-content {
    min-width: 0;
    flex: 1 1 auto;
}

.km-chat-action-card strong {
    display: block;
    margin-bottom: 4px;
    font-size: 16px;
    line-height: 1.22;
    color: #0b1730;
    font-weight: 900;
}

.km-chat-action-card small {
    display: block;
    font-size: 13px;
    line-height: 1.38;
    color: var(--km-chat-muted);
}

.km-chat-action-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 13px;
    background: #f1f5f9;
    color: var(--km-chat-navy-2);
    transition: transform .16s ease, background .16s ease, color .16s ease;
}

.km-chat-action-arrow svg {
    width: 19px;
    height: 19px;
    fill: currentColor;
}

.km-chat-action-card:hover .km-chat-action-arrow {
    transform: translateX(2px);
    background: var(--km-chat-navy-2);
    color: #ffffff;
}

.km-chat-whatsapp {
    border-color: rgba(22, 163, 74, .18);
    background: linear-gradient(180deg, #ffffff, #fbfffc);
}

.km-chat-whatsapp:hover {
    border-color: rgba(22, 163, 74, .32);
}

.km-chat-whatsapp .km-chat-action-arrow {
    background: var(--km-chat-green-soft);
    color: var(--km-chat-green);
}

.km-chat-whatsapp:hover .km-chat-action-arrow {
    background: var(--km-chat-green);
    color: #ffffff;
}

.km-chat-security-card,
.km-chat-prechat-note {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 13px;
    border-radius: 16px;
    background: #eef4fb;
    color: #43546a;
    font-size: 13px;
    line-height: 1.4;
}

.km-chat-security-icon,
.km-chat-prechat-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.km-chat-security-icon {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    background: #dbeafe;
    color: var(--km-chat-navy-2);
}

.km-chat-security-icon svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.km-chat-prechat-card {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.km-chat-prechat-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 14px;
    padding: 18px;
    border: 1px solid rgba(220, 227, 234, .95);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 14px 32px rgba(6, 27, 58, .06);
}

.km-chat-prechat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 15px;
    background: var(--km-chat-blue-soft);
    color: var(--km-chat-navy-2);
}

.km-chat-prechat-icon svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.km-chat-prechat-head-text h4 {
    margin: 0 0 5px;
    font-size: 18px;
    line-height: 1.25;
    font-weight: 900;
    color: #08162c;
}

.km-chat-prechat-head-text p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--km-chat-muted);
}

.km-chat-prechat-note {
    margin-bottom: 14px;
    background: #f5f7fa;
    border: 1px solid #e5ebf2;
}

.km-chat-prechat-badge {
    min-height: 24px;
    padding: 4px 9px;
    border-radius: 999px;
    background: var(--km-chat-blue-soft);
    color: var(--km-chat-navy-2);
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
}

.km-chat-field,
.km-chat-prechat-form label,
.km-chat-offline-form label,
.km-chat-whatsapp-form label {
    display: block;
    margin-bottom: 12px;
}

.km-chat-prechat-form label span,
.km-chat-offline-form label span,
.km-chat-whatsapp-form label span,
.km-chat-prechat-field > span {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 800;
    color: #374151;
}

.km-chat-input-wrap {
    position: relative;
}

.km-chat-prechat-form input,
.km-chat-offline-form input,
.km-chat-offline-form textarea,
.km-chat-whatsapp-form input,
.km-chat-whatsapp-form textarea,
.km-chat-message-form input {
    display: block;
    width: 100%;
    border: 1px solid #ccd6e2;
    border-radius: 15px;
    background: #ffffff;
    color: #111827;
    outline: none;
    transition: border-color .16s ease, box-shadow .16s ease, background .18s ease;
}

.km-chat-prechat-form input,
.km-chat-offline-form input,
.km-chat-whatsapp-form input,
.km-chat-message-form input {
    min-height: 46px;
    padding: 10px 14px;
    font-size: 14px;
    line-height: 1.3;
}

.km-chat-offline-form textarea,
.km-chat-whatsapp-form textarea {
    min-height: 100px;
    resize: vertical;
    padding: 12px 14px;
    font-size: 14px;
    line-height: 1.45;
}

.km-chat-prechat-form input::placeholder,
.km-chat-offline-form input::placeholder,
.km-chat-offline-form textarea::placeholder,
.km-chat-whatsapp-form input::placeholder,
.km-chat-whatsapp-form textarea::placeholder,
.km-chat-message-form input::placeholder {
    color: #8792a2;
}

.km-chat-prechat-form input:focus,
.km-chat-offline-form input:focus,
.km-chat-offline-form textarea:focus,
.km-chat-whatsapp-form input:focus,
.km-chat-whatsapp-form textarea:focus,
.km-chat-message-form input:focus {
    border-color: var(--km-chat-navy-2);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(11, 45, 92, .1);
}

.km-chat-contact-hint {
    margin: 2px 0 14px;
    font-size: 12px;
    line-height: 1.45;
    color: var(--km-chat-muted);
}

.km-chat-contact-hint.km-chat-contact-hint-error,
.km-chat-field-error,
.km-chat-message-error {
    color: #dc2626;
    font-weight: 700;
}

.km-chat-field-error,
.km-chat-message-error {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.35;
}

.km-chat-input-invalid {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, .1) !important;
    background: #fffafa !important;
}

.km-chat-primary-btn,
.km-chat-cancel,
.km-chat-back,
.km-chat-skip-prechat {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 46px;
    padding: 10px 15px;
    border-radius: 15px;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease, transform .16s ease, color .16s ease, box-shadow .16s ease;
}

.km-chat-primary-btn {
    border: 0;
    background: linear-gradient(135deg, var(--km-chat-navy), var(--km-chat-navy-2));
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(6, 27, 58, .22);
}

.km-chat-primary-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(6, 27, 58, .28);
}

.km-chat-primary-btn-whatsapp {
    background: linear-gradient(135deg, #128c3d, #25d366);
    box-shadow: 0 12px 24px rgba(22, 163, 74, .24);
}

.km-chat-cancel,
.km-chat-back,
.km-chat-skip-prechat {
    margin-top: 10px;
    border: 1px solid #d7e0ea;
    background: #ffffff;
    color: #334155;
}

.km-chat-cancel:hover,
.km-chat-back:hover,
.km-chat-skip-prechat:hover {
    background: #f8fafc;
    border-color: #c7d2df;
    color: #0f172a;
}

.km-chat-cancel-link {
    min-height: auto;
    margin-top: 9px;
    padding: 6px 8px;
    border: 0;
    background: transparent;
    color: #64748b;
    font-weight: 800;
    font-size: 12px;
    box-shadow: none;
}

.km-chat-cancel-link:hover {
    background: transparent;
    color: #0f172a;
}

.km-chat-primary-btn:disabled,
.km-chat-skip-prechat:disabled,
.km-chat-input-row button:disabled {
    cursor: not-allowed;
    opacity: .7;
    transform: none;
}

.km-chat-waiting,
.km-chat-success,
.km-chat-closed {
    text-align: center;
    padding: 22px 12px 8px;
}

.km-chat-loader {
    width: 50px;
    height: 50px;
    margin: 0 auto 16px;
    border-radius: 50%;
    border: 4px solid #e2e8f0;
    border-top-color: var(--km-chat-navy-2);
    animation: kmChatSpin .85s linear infinite;
}

@keyframes kmChatSpin {
    to { transform: rotate(360deg); }
}

.km-chat-success-icon,
.km-chat-closed-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    margin-bottom: 14px;
    border-radius: 18px;
    font-weight: 900;
}

.km-chat-success-icon {
    background: #dcfce7;
    color: #15803d;
}

.km-chat-closed {
    margin-top: 12px;
    padding: 18px;
    border-radius: 20px;
    background: #f7fbff;
    color: #0f172a;
    border: 1px solid #dbeafe;
}

.km-chat-closed-icon {
    background: var(--km-chat-blue-soft);
    color: var(--km-chat-navy-2);
}

.km-chat-session-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    padding: 13px 14px;
    border: 1px solid rgba(220, 227, 234, .95);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(6, 27, 58, .05);
}

.km-chat-session-title {
    display: block;
    font-size: 14px;
    line-height: 1.25;
    color: #0f172a;
    font-weight: 900;
}

.km-chat-session-subtitle {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    line-height: 1.35;
    color: var(--km-chat-muted);
}

.km-chat-session-badge {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 6px 10px;
    background: #dcfce7;
    color: #15803d;
    font-size: 11px;
    font-weight: 900;
}

.km-chat-session-badge-closed {
    background: #f1f5f9;
    color: #64748b;
}

.km-chat-session-badge-waiting {
    background: var(--km-chat-warning-soft);
    color: var(--km-chat-warning);
}

.km-chat-customer-card {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding: 11px 12px;
    border-radius: 18px;
    background: #eef4fb;
    border: 1px solid #dbe6f1;
}

.km-chat-customer-avatar,
.km-chat-message-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    font-weight: 900;
}

.km-chat-customer-avatar {
    width: 36px;
    height: 36px;
    border-radius: 13px;
    background: var(--km-chat-navy-2);
    color: #ffffff;
    font-size: 13px;
}

.km-chat-customer-name {
    display: block;
    font-size: 13px;
    line-height: 1.3;
    color: #0f172a;
    font-weight: 900;
}

.km-chat-customer-email {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    line-height: 1.3;
    color: var(--km-chat-muted);
}

.km-chat-messages {
    height: 302px;
    overflow-y: auto;
    padding: 14px;
    margin-bottom: 14px;
    border: 1px solid #dce3ea;
    border-radius: 21px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(249, 251, 253, .95)),
        repeating-linear-gradient(135deg, rgba(6, 27, 58, .035) 0 1px, transparent 1px 14px);
    scroll-behavior: smooth;
}

.km-chat-system-info,
.km-chat-system-message {
    width: fit-content;
    max-width: 92%;
    margin: 0 auto 14px;
    padding: 7px 11px;
    border-radius: 999px;
    background: #eef2f7;
    color: #64748b;
    font-size: 12px;
    line-height: 1.35;
    text-align: center;
    box-shadow: none;
}

.km-chat-system-info-warning {
    background: var(--km-chat-warning-soft);
    color: var(--km-chat-warning);
    border: 1px solid #f6d79f;
}

.km-chat-empty-state {
    min-height: 210px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 9px;
    text-align: center;
    color: var(--km-chat-muted);
}

.km-chat-empty-state strong {
    font-size: 16px;
    color: #0f172a;
    font-weight: 900;
}

.km-chat-empty-state span {
    max-width: 260px;
    font-size: 13px;
    line-height: 1.45;
}

.km-chat-empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    margin-bottom: 4px;
    border-radius: 17px;
    background: var(--km-chat-blue-soft);
    font-size: 24px;
}

.km-chat-message-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    margin-bottom: 13px;
}

.km-chat-message-row-customer {
    justify-content: flex-start;
}

.km-chat-message-row-operator {
    justify-content: flex-end;
}

.km-chat-message-row-system {
    justify-content: center;
}

.km-chat-message-avatar {
    width: 29px;
    height: 29px;
    border-radius: 11px;
    background: #e2e8f0;
    color: #334155;
    font-size: 11px;
}

.km-chat-message-row-operator .km-chat-message-avatar {
    background: var(--km-chat-blue-soft);
    color: var(--km-chat-navy-2);
}

.km-chat-message-bubble {
    max-width: 76%;
    padding: 11px 13px;
    border-radius: 18px;
    box-shadow: 0 8px 20px rgba(6, 27, 58, .06);
}

.km-chat-message-bubble-customer {
    background: #ffffff;
    color: #0f172a;
    border: 1px solid #e5ebf2;
    border-bottom-left-radius: 7px;
}

.km-chat-message-bubble-operator {
    background: linear-gradient(135deg, var(--km-chat-navy), var(--km-chat-navy-2));
    color: #ffffff;
    border-bottom-right-radius: 7px;
}

.km-chat-message-bubble-system {
    max-width: 92%;
    background: var(--km-chat-warning-soft);
    color: var(--km-chat-warning);
    border: 1px solid #f6d79f;
    box-shadow: none;
    text-align: center;
}

.km-chat-message-meta {
    margin-bottom: 4px;
    font-size: 11px;
    line-height: 1.3;
    opacity: .75;
    font-weight: 800;
}

.km-chat-message-text {
    font-size: 14px;
    line-height: 1.45;
    white-space: pre-line;
    word-break: break-word;
}

.km-chat-read-status {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 7px;
    font-size: 11px;
    line-height: 1.3;
    font-weight: 900;
}

.km-chat-read-icon {
    font-size: 12px;
    letter-spacing: -2px;
}

.km-chat-read-status-read,
.km-chat-message-bubble-customer .km-chat-read-status-read {
    color: #16a34a;
}

.km-chat-read-status-unread,
.km-chat-message-bubble-customer .km-chat-read-status-unread {
    color: #d97706;
}

.km-chat-message-bubble-operator .km-chat-read-status-read {
    color: #bbf7d0;
}

.km-chat-message-bubble-operator .km-chat-read-status-unread {
    color: #fde68a;
}

.km-chat-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border: 1px solid #d7e0ea;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 22px rgba(6, 27, 58, .06);
}

.km-chat-input-row input {
    border: 0;
    box-shadow: none;
    min-height: 42px;
    padding: 8px 10px;
}

.km-chat-input-row input:focus {
    border: 0;
    box-shadow: none;
}

.km-chat-input-row button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--km-chat-navy), var(--km-chat-navy-2));
    color: #ffffff;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease;
}

.km-chat-input-row button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(6, 27, 58, .18);
}

.km-chat-input-row button svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.km-chat-button-loading {
    position: relative;
    pointer-events: none;
    opacity: .78;
}

.km-chat-button-spinner {
    display: inline-block;
    width: 15px;
    height: 15px;
    margin-right: 8px;
    border-radius: 50%;
    border: 2px solid currentColor;
    border-right-color: transparent;
    vertical-align: -2px;
    animation: kmChatButtonSpin .7s linear infinite;
}

@keyframes kmChatButtonSpin {
    to { transform: rotate(360deg); }
}

.km-chat-input-row button.km-chat-button-loading svg {
    display: none;
}

.km-chat-input-row button.km-chat-button-loading::after {
    content: "";
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    border-right-color: transparent;
    animation: kmChatButtonSpin .7s linear infinite;
}

.km-chat-brand-footer {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #e5ebf2;
    text-align: center;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
}

@media (max-width: 767px) {
    #km-chat-widget {
        position: fixed;
        inset: 0;
        width: 100%;
        height: 100%;
        right: auto;
        bottom: auto;
        pointer-events: none;
        z-index: 99999;
    }

    #km-chat-widget .km-chat-toggle,
    #km-chat-widget .km-chat-panel {
        pointer-events: auto;
    }

    .km-chat-toggle {
        right: max(14px, env(safe-area-inset-right));
        bottom: calc(14px + env(safe-area-inset-bottom));
        min-height: 56px;
        padding: 0 17px 0 11px;
        gap: 11px;
    }

    .km-chat-toggle-icon {
        width: 38px;
        height: 38px;
    }

    .km-chat-toggle-text {
        font-size: 15px;
    }

    .km-chat-panel {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: calc(10px + env(safe-area-inset-bottom));
        width: auto;
        max-width: none;
        max-height: calc(100vh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
        border-radius: 22px;
        transform-origin: bottom center;
    }

    .km-chat-body {
        padding: 16px;
    }

    .km-chat-messages {
        height: clamp(230px, 42vh, 330px);
        max-height: 42vh;
    }
}

@supports (height: 100dvh) {
    @media (max-width: 767px) {
        .km-chat-panel {
            max-height: calc(100dvh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
        }

        .km-chat-messages {
            height: clamp(230px, 42dvh, 330px);
            max-height: 42dvh;
        }
    }
}

@media (max-width: 480px) {
    .km-chat-panel {
        left: 8px;
        right: 8px;
        bottom: calc(8px + env(safe-area-inset-bottom));
        border-radius: 20px;
    }

    .km-chat-header {
        padding: 15px;
    }

    .km-chat-header-main {
        gap: 10px;
    }

    .km-chat-avatar {
        width: 40px;
        height: 40px;
        border-radius: 14px;
    }

    .km-chat-header-main strong {
        font-size: 15px;
    }

    .km-chat-status-line {
        font-size: 12px;
    }

    .km-chat-body {
        padding: 14px;
    }

    .km-chat-choice-hero,
    .km-chat-form-head,
    .km-chat-prechat-head {
        padding: 14px;
        border-radius: 18px;
    }

    .km-chat-intro h4,
    .km-chat-form-head h4,
    .km-chat-waiting h4,
    .km-chat-success h4,
    .km-chat-closed h4 {
        font-size: 18px;
    }

    .km-chat-action-card {
        min-height: 82px;
        padding: 13px;
        border-radius: 18px;
    }

    .km-chat-action-icon {
        width: 50px;
        height: 50px;
        border-radius: 15px;
    }

    .km-chat-action-icon svg {
        width: 24px;
        height: 24px;
    }

    .km-chat-action-card strong {
        font-size: 15px;
    }

    .km-chat-action-card small {
        font-size: 12px;
    }

    .km-chat-toggle {
        width: 58px;
        height: 58px;
        min-height: 58px;
        padding: 0;
        justify-content: center;
        border-radius: 18px;
    }

    .km-chat-toggle-copy {
        display: none;
    }

    .km-chat-toggle-icon {
        width: 40px;
        height: 40px;
    }

    .km-chat-session-info,
    .km-chat-customer-card {
        border-radius: 16px;
    }

    .km-chat-messages {
        height: clamp(210px, 40vh, 300px);
        max-height: 40vh;
        padding: 12px;
        border-radius: 18px;
    }

    .km-chat-message-bubble {
        max-width: 84%;
    }

    .km-chat-message-avatar {
        width: 26px;
        height: 26px;
        border-radius: 10px;
    }

    .km-chat-input-row {
        padding: 7px;
    }

    .km-chat-input-row input {
        min-height: 40px;
        font-size: 15px;
    }

    .km-chat-input-row button {
        width: 40px;
        height: 40px;
    }
}

@supports (height: 100dvh) {
    @media (max-width: 480px) {
        .km-chat-messages {
            height: clamp(210px, 40dvh, 300px);
            max-height: 40dvh;
        }
    }
}

@media (max-height: 700px) and (max-width: 767px) {
    .km-chat-panel {
        top: calc(8px + env(safe-area-inset-top));
        bottom: calc(8px + env(safe-area-inset-bottom));
        max-height: none;
    }

    .km-chat-body {
        padding: 12px;
    }

    .km-chat-messages {
        height: 220px;
        max-height: 38vh;
    }

    .km-chat-choice-hero,
    .km-chat-form-head,
    .km-chat-prechat-head,
    .km-chat-closed {
        padding: 12px;
    }
}

/* =========================================================
   Kismetál Vasker card modular visual v2
   Closer to the requested mockup, without changing JS logic.
   ========================================================= */

#km-chat-widget.km-chat-widget--kismetal-card {
    --km-chat-navy: #061b3a;
    --km-chat-navy-2: #09284f;
    --km-chat-navy-3: #0f365f;
    --km-chat-accent: #143b6a;
    --km-chat-surface: #f4f7fb;
    --km-chat-border: #d9e2ec;
    --km-chat-text: #071733;
    --km-chat-muted: #66758a;
    --km-chat-shadow: 0 24px 58px rgba(6, 27, 58, .22), 0 8px 18px rgba(6, 27, 58, .12);
}

#km-chat-widget.km-chat-widget--kismetal-card .km-chat-toggle {
    min-height: 64px;
    padding: 0 24px 0 14px;
    border-radius: 16px;
    background:
        linear-gradient(135deg, #061b3a, #09284f 58%, #0d3765);
    border: 1px solid rgba(255, 255, 255, .16);
    box-shadow:
        0 18px 40px rgba(6, 27, 58, .35),
        0 4px 10px rgba(6, 27, 58, .15),
        inset 0 1px 0 rgba(255, 255, 255, .12);
}

#km-chat-widget.km-chat-widget--kismetal-card .km-chat-toggle-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .1);
}

#km-chat-widget.km-chat-widget--kismetal-card .km-chat-toggle-text {
    font-size: 17px;
    font-weight: 900;
}

#km-chat-widget.km-chat-widget--kismetal-card .km-chat-toggle-subtext {
    font-size: 12px;
    color: rgba(255, 255, 255, .7);
}

#km-chat-widget.km-chat-widget--kismetal-card .km-chat-panel {
    width: 400px;
    bottom: 82px;
    border-radius: 18px;
    background: #f6f8fb;
    border: 1px solid rgba(217, 226, 236, .96);
    box-shadow: var(--km-chat-shadow);
}

#km-chat-widget.km-chat-widget--kismetal-card .km-chat-header {
    min-height: 90px;
    padding: 18px 20px;
    background:
        linear-gradient(135deg, rgba(6, 27, 58, .99), rgba(7, 34, 68, .98) 60%, rgba(13, 55, 101, .96)),
        radial-gradient(circle at 82% 36%, rgba(255, 255, 255, .18), transparent 34%);
    border-bottom: 0;
}

#km-chat-widget.km-chat-widget--kismetal-card .km-chat-header::after {
    right: -18px;
    bottom: -42px;
    width: 190px;
    height: 112px;
    opacity: .82;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, 0)),
        repeating-linear-gradient(135deg, rgba(255, 255, 255, .1) 0 1px, transparent 1px 9px);
}

#km-chat-widget.km-chat-widget--kismetal-card .km-chat-avatar {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 255, 255, .18);
}

#km-chat-widget.km-chat-widget--kismetal-card .km-chat-header-main strong {
    font-size: 17px;
    font-weight: 900;
    letter-spacing: -.02em;
}

#km-chat-widget.km-chat-widget--kismetal-card .km-chat-status-line {
    margin-top: 4px;
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 255, 255, .84);
}

#km-chat-widget.km-chat-widget--kismetal-card .km-chat-minimize,
#km-chat-widget.km-chat-widget--kismetal-card .km-chat-close {
    width: 38px;
    height: 38px;
    border-radius: 13px;
    background: rgba(255, 255, 255, .12);
}

#km-chat-widget.km-chat-widget--kismetal-card .km-chat-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 20px;
    background:
        linear-gradient(180deg, #f6f8fb, #ffffff 65%);
    -webkit-overflow-scrolling: touch;
}

#km-chat-widget.km-chat-widget--kismetal-card .km-chat-choice-hero,
#km-chat-widget.km-chat-widget--kismetal-card .km-chat-form-head,
#km-chat-widget.km-chat-widget--kismetal-card .km-chat-prechat-card,
#km-chat-widget.km-chat-widget--kismetal-card .km-chat-session-info,
#km-chat-widget.km-chat-widget--kismetal-card .km-chat-security-card {
    border: 1px solid var(--km-chat-border);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 10px 22px rgba(6, 27, 58, .06);
}

#km-chat-widget.km-chat-widget--kismetal-card .km-chat-choice-hero {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    margin: 0 0 14px;
    padding: 16px;
}

#km-chat-widget.km-chat-widget--kismetal-card .km-chat-intro-icon,
#km-chat-widget.km-chat-widget--kismetal-card .km-chat-form-icon,
#km-chat-widget.km-chat-widget--kismetal-card .km-chat-security-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: #edf4ff;
    color: var(--km-chat-navy);
}

#km-chat-widget.km-chat-widget--kismetal-card .km-chat-choice-hero h4,
#km-chat-widget.km-chat-widget--kismetal-card .km-chat-form-head h4,
#km-chat-widget.km-chat-widget--kismetal-card .km-chat-prechat-head-text h4 {
    margin: 0 0 4px;
    font-size: 20px;
    line-height: 1.18;
    font-weight: 950;
    letter-spacing: -.035em;
    color: var(--km-chat-text);
}

#km-chat-widget.km-chat-widget--kismetal-card .km-chat-choice-hero p,
#km-chat-widget.km-chat-widget--kismetal-card .km-chat-form-head p,
#km-chat-widget.km-chat-widget--kismetal-card .km-chat-prechat-head-text p {
    margin: 0;
    font-size: 13px;
    line-height: 1.38;
    color: var(--km-chat-muted);
}

#km-chat-widget.km-chat-widget--kismetal-card .km-chat-action-card {
    min-height: 104px;
    padding: 14px 14px;
    margin-bottom: 14px;
    border-radius: 16px;
    border-color: var(--km-chat-border);
    background: #ffffff;
    box-shadow: 0 12px 24px rgba(6, 27, 58, .07);
}

#km-chat-widget.km-chat-widget--kismetal-card .km-chat-action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(6, 27, 58, .11);
}

#km-chat-widget.km-chat-widget--kismetal-card .km-chat-action-icon {
    width: 66px;
    height: 66px;
    border-radius: 16px;
    background: var(--km-chat-navy);
    color: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .13), 0 9px 18px rgba(6, 27, 58, .16);
}

#km-chat-widget.km-chat-widget--kismetal-card .km-chat-start .km-chat-action-icon {
    color: #ffffff;
    background: var(--km-chat-navy);
}

#km-chat-widget.km-chat-widget--kismetal-card .km-chat-whatsapp .km-chat-action-icon {
    color: #ffffff;
    background: linear-gradient(135deg, #15a34a, #16c15a);
}

#km-chat-widget.km-chat-widget--kismetal-card .km-chat-action-icon svg {
    width: 32px;
    height: 32px;
}

#km-chat-widget.km-chat-widget--kismetal-card .km-chat-action-card strong {
    font-size: 16px;
    line-height: 1.18;
    font-weight: 900;
    color: var(--km-chat-text);
}

#km-chat-widget.km-chat-widget--kismetal-card .km-chat-action-card small {
    margin-top: 5px;
    font-size: 13px;
    line-height: 1.38;
    color: var(--km-chat-muted);
}

#km-chat-widget.km-chat-widget--kismetal-card .km-chat-action-arrow {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    color: var(--km-chat-navy);
    background: #f1f5f9;
}

#km-chat-widget.km-chat-widget--kismetal-card .km-chat-whatsapp {
    border-color: #bfeccf;
    background: linear-gradient(180deg, #ffffff, #fafffc);
}

#km-chat-widget.km-chat-widget--kismetal-card .km-chat-whatsapp .km-chat-action-arrow {
    color: #15803d;
    background: #dcfce7;
}

#km-chat-widget.km-chat-widget--kismetal-card .km-chat-security-card {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 2px 0 14px;
    padding: 12px 14px;
    color: #526172;
    background: #edf4fb;
    box-shadow: none;
    font-size: 13px;
    line-height: 1.35;
}

#km-chat-widget.km-chat-widget--kismetal-card .km-chat-brand-footer {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #dde6ef;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 800;
}

/* Public conversation screen: closer to the modular mockup */
#km-chat-widget.km-chat-widget--kismetal-card .km-chat-customer-card {
    display: none !important;
}

#km-chat-widget.km-chat-widget--kismetal-card .km-chat-session-info {
    position: relative;
    align-items: center;
    min-height: 82px;
    margin: -2px 0 14px;
    padding: 14px 16px 14px 78px;
    overflow: visible;
}

#km-chat-widget.km-chat-widget--kismetal-card .km-chat-session-info::before {
    content: "";
    position: absolute;
    left: 16px;
    top: 50%;
    width: 46px;
    height: 46px;
    border-radius: 15px;
    transform: translateY(-50%);
    background:
        radial-gradient(circle at 52% 38%, rgba(255,255,255,.85) 0 8px, transparent 9px),
        linear-gradient(135deg, #e5edf7, #ffffff);
    box-shadow: inset 0 0 0 1px #d9e2ec;
}

#km-chat-widget.km-chat-widget--kismetal-card .km-chat-session-title {
    display: block;
    max-width: 230px;
    font-size: 15px;
    line-height: 1.22;
    font-weight: 950;
    color: var(--km-chat-text);
}

#km-chat-widget.km-chat-widget--kismetal-card .km-chat-session-subtitle {
    margin-top: 5px;
    font-size: 13px;
    line-height: 1.3;
    color: var(--km-chat-muted);
}

#km-chat-widget.km-chat-widget--kismetal-card .km-chat-session-badge {
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

#km-chat-widget.km-chat-widget--kismetal-card .km-chat-messages {
    height: 300px;
    margin: 0 -2px 12px;
    padding: 12px 8px;
    border: 0;
    border-radius: 0;
    background:
        radial-gradient(circle at top left, rgba(11,45,92,.035), transparent 36%),
        transparent;
    box-shadow: none;
}

#km-chat-widget.km-chat-widget--kismetal-card .km-chat-system-info {
    background: #edf2f7;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
}

#km-chat-widget.km-chat-widget--kismetal-card .km-chat-empty-state {
    height: 210px;
    border: 1px solid #dfe7ef;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff, #fbfdff);
}

#km-chat-widget.km-chat-widget--kismetal-card .km-chat-empty-icon {
    background: #edf4ff;
    color: var(--km-chat-navy);
}

#km-chat-widget.km-chat-widget--kismetal-card .km-chat-message-bubble {
    max-width: 78%;
    padding: 10px 12px;
    border-radius: 14px;
    box-shadow: 0 8px 18px rgba(6, 27, 58, .08);
}

#km-chat-widget.km-chat-widget--kismetal-card .km-chat-message-bubble-customer {
    background: #ffffff;
    color: #0f172a;
    border: 1px solid #e5ebf2;
    border-bottom-left-radius: 5px;
}

#km-chat-widget.km-chat-widget--kismetal-card .km-chat-message-bubble-operator {
    background: linear-gradient(135deg, #061b3a, #0b2d5c);
    color: #ffffff;
    border-bottom-right-radius: 5px;
}

#km-chat-widget.km-chat-widget--kismetal-card .km-chat-input-row {
    padding: 8px;
    border-radius: 16px;
    border: 1px solid #d9e2ec;
    background: #ffffff;
    box-shadow: 0 12px 24px rgba(6, 27, 58, .08);
}

#km-chat-widget.km-chat-widget--kismetal-card .km-chat-input-row input {
    min-height: 40px;
    padding: 8px 10px;
    font-size: 14px;
}

#km-chat-widget.km-chat-widget--kismetal-card .km-chat-input-row button {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: var(--km-chat-navy);
    box-shadow: 0 8px 18px rgba(6, 27, 58, .22);
}

#km-chat-widget.km-chat-widget--kismetal-card .km-chat-cancel-link {
    margin-top: 12px;
    color: #64748b;
}

/* Forms */
#km-chat-widget.km-chat-widget--kismetal-card .km-chat-prechat-card,
#km-chat-widget.km-chat-widget--kismetal-card .km-chat-whatsapp-form,
#km-chat-widget.km-chat-widget--kismetal-card .km-chat-offline-form {
    background: transparent;
}

#km-chat-widget.km-chat-widget--kismetal-card .km-chat-prechat-card {
    padding: 16px;
}

#km-chat-widget.km-chat-widget--kismetal-card .km-chat-prechat-head,
#km-chat-widget.km-chat-widget--kismetal-card .km-chat-form-head {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding: 16px;
}

#km-chat-widget.km-chat-widget--kismetal-card .km-chat-field input,
#km-chat-widget.km-chat-widget--kismetal-card .km-chat-field textarea,
#km-chat-widget.km-chat-widget--kismetal-card .km-chat-prechat-form input,
#km-chat-widget.km-chat-widget--kismetal-card .km-chat-offline-form input,
#km-chat-widget.km-chat-widget--kismetal-card .km-chat-offline-form textarea,
#km-chat-widget.km-chat-widget--kismetal-card .km-chat-whatsapp-form input,
#km-chat-widget.km-chat-widget--kismetal-card .km-chat-whatsapp-form textarea {
    min-height: 44px;
    border-radius: 13px;
    border-color: #cfd9e4;
    background: #ffffff;
    box-shadow: 0 6px 14px rgba(6, 27, 58, .04);
}

#km-chat-widget.km-chat-widget--kismetal-card .km-chat-primary-btn {
    min-height: 48px;
    border-radius: 13px;
    background: linear-gradient(135deg, #061b3a, #0b2d5c);
    box-shadow: 0 12px 24px rgba(6, 27, 58, .18);
}

#km-chat-widget.km-chat-widget--kismetal-card .km-chat-primary-btn-whatsapp {
    background: linear-gradient(135deg, #149447, #16b957);
    box-shadow: 0 12px 24px rgba(20, 148, 71, .18);
}

#km-chat-widget.km-chat-widget--kismetal-card .km-chat-back,
#km-chat-widget.km-chat-widget--kismetal-card .km-chat-cancel {
    border-radius: 13px;
}

/* Mobile tuning */
@media (max-width: 767px) {
    #km-chat-widget.km-chat-widget--kismetal-card .km-chat-panel {
        width: auto;
        left: 10px;
        right: 10px;
        bottom: calc(10px + env(safe-area-inset-bottom));
        border-radius: 20px;
    }

    #km-chat-widget.km-chat-widget--kismetal-card .km-chat-header {
        min-height: 82px;
        padding: 16px;
    }

    #km-chat-widget.km-chat-widget--kismetal-card .km-chat-body {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    #km-chat-widget.km-chat-widget--kismetal-card .km-chat-choice-hero h4,
    #km-chat-widget.km-chat-widget--kismetal-card .km-chat-form-head h4 {
        font-size: 19px;
    }

    #km-chat-widget.km-chat-widget--kismetal-card .km-chat-action-card {
        min-height: 96px;
    }

    #km-chat-widget.km-chat-widget--kismetal-card .km-chat-action-icon {
        width: 60px;
        height: 60px;
    }

    #km-chat-widget.km-chat-widget--kismetal-card .km-chat-toggle {
        width: auto;
        min-width: 58px;
        height: 58px;
        padding: unset;
    }

    #km-chat-widget.km-chat-widget--kismetal-card .km-chat-toggle-copy {
        display: none;
    }

    #km-chat-widget.km-chat-widget--kismetal-card .km-chat-messages {
        height: clamp(230px, 42dvh, 320px);
        max-height: 42dvh;
    }
}

/* In-widget notices / alert replacement */
#km-chat-widget .km-chat-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 14px;
    padding: 11px 12px;
    border-radius: 16px;
    font-size: 13px;
    line-height: 1.4;
    box-shadow: 0 14px 28px rgba(15, 23, 42, .10);
    animation: kmChatNoticeIn .18s ease-out;
}

#km-chat-widget .km-chat-notice[hidden] {
    display: none !important;
}

#km-chat-widget .km-chat-notice-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

#km-chat-widget .km-chat-notice-success {
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    color: #166534;
}

#km-chat-widget .km-chat-notice-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

#km-chat-widget .km-chat-notice-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: rgba(153, 27, 27, .12);
    font-weight: 900;
    line-height: 1;
}

#km-chat-widget .km-chat-notice-success .km-chat-notice-icon {
    background: rgba(22, 101, 52, .12);
}

#km-chat-widget .km-chat-notice-info .km-chat-notice-icon {
    background: rgba(30, 64, 175, .12);
}

#km-chat-widget .km-chat-notice-text {
    flex: 1 1 auto;
    min-width: 0;
    font-weight: 700;
}

#km-chat-widget .km-chat-notice-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: inherit;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    opacity: .75;
}

#km-chat-widget .km-chat-notice-close:hover {
    opacity: 1;
    background: rgba(15, 23, 42, .06);
}

@keyframes kmChatNoticeIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/*
    Kismetál online chat layout options
    Use after the current chat-widget.css file.

    Blade change:
    <div id="km-chat-widget" class="km-chat-widget--layout-command">

    Available classes:
    - km-chat-widget--layout-command
    - km-chat-widget--layout-split
    - km-chat-widget--layout-glass
    - km-chat-widget--layout-minimal
    - km-chat-widget--layout-sidepanel
*/

/* =========================================================
   1) COMMAND CARD
   Modern SaaS style, strong header, compact interactive cards.
   ========================================================= */
#km-chat-widget.km-chat-widget--layout-command {
    --km-chat-navy: #061b3a;
    --km-chat-navy-2: #0b2d5c;
    --km-chat-panel: #f7f9fc;
    --km-chat-border: #d8e2ee;
    --km-chat-muted: #64748b;
    --km-chat-shadow: 0 28px 70px rgba(6, 27, 58, .24), 0 10px 22px rgba(6, 27, 58, .12);
}

#km-chat-widget.km-chat-widget--layout-command .km-chat-toggle {
    min-height: 60px;
    border-radius: 999px;
    padding: 0 22px 0 10px;
    background: #061b3a;
    box-shadow: 0 18px 42px rgba(6, 27, 58, .34);
}

#km-chat-widget.km-chat-widget--layout-command .km-chat-toggle-icon {
    border-radius: 999px;
    background: rgba(255, 255, 255, .13);
}

#km-chat-widget.km-chat-widget--layout-command .km-chat-panel {
    width: 410px;
    border-radius: 28px;
    background: var(--km-chat-panel);
    border: 1px solid rgba(216, 226, 238, .95);
    box-shadow: var(--km-chat-shadow);
}

#km-chat-widget.km-chat-widget--layout-command .km-chat-header {
    padding: 20px;
    background: linear-gradient(135deg, #061b3a, #0b2d5c 65%, #164c85);
}

#km-chat-widget.km-chat-widget--layout-command .km-chat-body {
    padding: 18px;
    background: linear-gradient(180deg, #f7f9fc, #ffffff 58%);
}

#km-chat-widget.km-chat-widget--layout-command .km-chat-choice-hero,
#km-chat-widget.km-chat-widget--layout-command .km-chat-form-head,
#km-chat-widget.km-chat-widget--layout-command .km-chat-prechat-head,
#km-chat-widget.km-chat-widget--layout-command .km-chat-session-info {
    border-radius: 22px;
    border-color: var(--km-chat-border);
    background: #ffffff;
    box-shadow: 0 14px 32px rgba(6, 27, 58, .07);
}

#km-chat-widget.km-chat-widget--layout-command .km-chat-action-card {
    min-height: 88px;
    border-radius: 22px;
    border-color: var(--km-chat-border);
    box-shadow: 0 12px 26px rgba(6, 27, 58, .06);
}

#km-chat-widget.km-chat-widget--layout-command .km-chat-action-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 38px rgba(6, 27, 58, .12);
}

#km-chat-widget.km-chat-widget--layout-command .km-chat-action-icon,
#km-chat-widget.km-chat-widget--layout-command .km-chat-input-row button,
#km-chat-widget.km-chat-widget--layout-command .km-chat-primary-btn {
    border-radius: 18px;
}

#km-chat-widget.km-chat-widget--layout-command .km-chat-messages {
    border-radius: 24px;
    background: #ffffff;
    border-color: var(--km-chat-border);
}

/* =========================================================
   2) SPLIT SUPPORT
   Header becomes a compact left identity strip and body feels modular.
   ========================================================= */
#km-chat-widget.km-chat-widget--layout-split {
    --km-chat-navy: #061b3a;
    --km-chat-navy-2: #0b2d5c;
    --km-chat-panel: #ffffff;
    --km-chat-border: #e2e8f0;
    --km-chat-muted: #6b7280;
    --km-chat-shadow: 0 24px 64px rgba(15, 23, 42, .22);
}

#km-chat-widget.km-chat-widget--layout-split .km-chat-toggle {
    border-radius: 18px;
    background: linear-gradient(135deg, #061b3a, #0f365f);
}

#km-chat-widget.km-chat-widget--layout-split .km-chat-panel {
    width: 440px;
    border-radius: 24px;
    background: #ffffff;
}

#km-chat-widget.km-chat-widget--layout-split .km-chat-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 86px;
    padding: 16px;
    background: #ffffff;
    color: #071733;
    border-bottom: 1px solid var(--km-chat-border);
}

#km-chat-widget.km-chat-widget--layout-split .km-chat-header::after {
    display: none;
}

#km-chat-widget.km-chat-widget--layout-split .km-chat-header-main {
    padding: 12px;
    border-radius: 20px;
    background: linear-gradient(135deg, #061b3a, #0b2d5c);
    color: #ffffff;
}

#km-chat-widget.km-chat-widget--layout-split .km-chat-minimize,
#km-chat-widget.km-chat-widget--layout-split .km-chat-close {
    background: #f1f5f9;
    color: #0f172a;
}

#km-chat-widget.km-chat-widget--layout-split .km-chat-body {
    background: #ffffff;
}

#km-chat-widget.km-chat-widget--layout-split .km-chat-choice-hero {
    align-items: center;
    background: #f8fafc;
    border-style: dashed;
}

#km-chat-widget.km-chat-widget--layout-split .km-chat-action-card {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) 34px;
    border-radius: 18px;
}

#km-chat-widget.km-chat-widget--layout-split .km-chat-security-card,
#km-chat-widget.km-chat-widget--layout-split .km-chat-prechat-note {
    border: 1px solid #dbeafe;
    background: #eff6ff;
}

#km-chat-widget.km-chat-widget--layout-split .km-chat-messages {
    border-radius: 18px;
    background: #f8fafc;
}

/* =========================================================
   3) GLASS ASSISTANT
   Premium floating glass style, good on modern landing pages.
   ========================================================= */
#km-chat-widget.km-chat-widget--layout-glass {
    --km-chat-navy: #061b3a;
    --km-chat-navy-2: #143b6a;
    --km-chat-border: rgba(255, 255, 255, .28);
    --km-chat-muted: #64748b;
    --km-chat-shadow: 0 30px 80px rgba(6, 27, 58, .28);
}

#km-chat-widget.km-chat-widget--layout-glass .km-chat-toggle {
    border-radius: 22px;
    background: rgba(6, 27, 58, .92);
    backdrop-filter: blur(14px);
}

#km-chat-widget.km-chat-widget--layout-glass .km-chat-panel {
    width: 420px;
    border-radius: 30px;
    background: rgba(255, 255, 255, .86);
    border: 1px solid rgba(255, 255, 255, .62);
    backdrop-filter: blur(18px);
    box-shadow: var(--km-chat-shadow);
}

#km-chat-widget.km-chat-widget--layout-glass .km-chat-header {
    margin: 10px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(6, 27, 58, .96), rgba(20, 59, 106, .9));
}

#km-chat-widget.km-chat-widget--layout-glass .km-chat-body {
    padding: 10px 18px 18px;
    background: linear-gradient(180deg, rgba(255,255,255,.62), rgba(248,250,252,.88));
}

#km-chat-widget.km-chat-widget--layout-glass .km-chat-choice-hero,
#km-chat-widget.km-chat-widget--layout-glass .km-chat-form-head,
#km-chat-widget.km-chat-widget--layout-glass .km-chat-prechat-head,
#km-chat-widget.km-chat-widget--layout-glass .km-chat-action-card,
#km-chat-widget.km-chat-widget--layout-glass .km-chat-session-info,
#km-chat-widget.km-chat-widget--layout-glass .km-chat-input-row {
    border: 1px solid rgba(226, 232, 240, .9);
    background: rgba(255, 255, 255, .78);
    box-shadow: 0 14px 34px rgba(6, 27, 58, .08);
    backdrop-filter: blur(10px);
}

#km-chat-widget.km-chat-widget--layout-glass .km-chat-action-card {
    border-radius: 24px;
}

#km-chat-widget.km-chat-widget--layout-glass .km-chat-action-card:hover {
    transform: translateY(-2px) scale(1.01);
}

#km-chat-widget.km-chat-widget--layout-glass .km-chat-messages {
    border: 0;
    background: rgba(255,255,255,.5);
}

/* =========================================================
   4) MINIMAL PRO
   Very clean, content-first, less visual noise.
   ========================================================= */
#km-chat-widget.km-chat-widget--layout-minimal {
    --km-chat-navy: #071733;
    --km-chat-navy-2: #0b2d5c;
    --km-chat-panel: #ffffff;
    --km-chat-border: #e5e7eb;
    --km-chat-muted: #6b7280;
    --km-chat-shadow: 0 18px 48px rgba(15, 23, 42, .18);
}

#km-chat-widget.km-chat-widget--layout-minimal .km-chat-toggle {
    min-height: 56px;
    border-radius: 16px;
    background: #071733;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .24);
}

#km-chat-widget.km-chat-widget--layout-minimal .km-chat-panel {
    width: 390px;
    border-radius: 20px;
    background: #ffffff;
}

#km-chat-widget.km-chat-widget--layout-minimal .km-chat-header {
    padding: 16px 18px;
    background: #ffffff;
    color: #071733;
    border-bottom: 1px solid var(--km-chat-border);
}

#km-chat-widget.km-chat-widget--layout-minimal .km-chat-header::after {
    display: none;
}

#km-chat-widget.km-chat-widget--layout-minimal .km-chat-avatar {
    background: #eef4fb;
    color: #071733;
    border-color: #dbe6f1;
}

#km-chat-widget.km-chat-widget--layout-minimal .km-chat-status-line {
    color: #64748b;
}

#km-chat-widget.km-chat-widget--layout-minimal .km-chat-minimize,
#km-chat-widget.km-chat-widget--layout-minimal .km-chat-close {
    background: #f3f4f6;
    color: #111827;
}

#km-chat-widget.km-chat-widget--layout-minimal .km-chat-body {
    background: #ffffff;
}

#km-chat-widget.km-chat-widget--layout-minimal .km-chat-choice-hero,
#km-chat-widget.km-chat-widget--layout-minimal .km-chat-form-head,
#km-chat-widget.km-chat-widget--layout-minimal .km-chat-prechat-head,
#km-chat-widget.km-chat-widget--layout-minimal .km-chat-action-card,
#km-chat-widget.km-chat-widget--layout-minimal .km-chat-session-info,
#km-chat-widget.km-chat-widget--layout-minimal .km-chat-input-row {
    border-radius: 14px;
    box-shadow: none;
    border-color: var(--km-chat-border);
}

#km-chat-widget.km-chat-widget--layout-minimal .km-chat-action-icon {
    border-radius: 12px;
}

#km-chat-widget.km-chat-widget--layout-minimal .km-chat-action-card:hover {
    background: #f9fafb;
    transform: none;
}

#km-chat-widget.km-chat-widget--layout-minimal .km-chat-messages {
    border-radius: 14px;
    background: #f9fafb;
}

/* =========================================================
   5) SIDEPANEL COMPACT
   Desktop feels like a small side drawer, mobile stays bottom sheet.
   ========================================================= */
#km-chat-widget.km-chat-widget--layout-sidepanel {
    --km-chat-navy: #061b3a;
    --km-chat-navy-2: #0b2d5c;
    --km-chat-panel: #f8fafc;
    --km-chat-border: #dbe4ef;
    --km-chat-muted: #637083;
    --km-chat-shadow: -18px 0 60px rgba(6, 27, 58, .18), 0 12px 28px rgba(6, 27, 58, .12);
}

#km-chat-widget.km-chat-widget--layout-sidepanel .km-chat-toggle {
    right: 18px;
    bottom: 28px;
    min-height: 62px;
    border-radius: 20px;
}

#km-chat-widget.km-chat-widget--layout-sidepanel .km-chat-panel {
    position: fixed;
    right: 18px;
    bottom: 18px;
    width: 390px;
    height: min(720px, calc(100vh - 36px));
    max-height: none;
    border-radius: 26px;
    background: var(--km-chat-panel);
}

#km-chat-widget.km-chat-widget--layout-sidepanel .km-chat-header {
    min-height: 92px;
    background: linear-gradient(135deg, #061b3a, #0b2d5c);
}

#km-chat-widget.km-chat-widget--layout-sidepanel .km-chat-body {
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: linear-gradient(180deg, #f8fafc, #ffffff);
}

#km-chat-widget.km-chat-widget--layout-sidepanel .km-chat-conversation {
    min-height: 0;
}

#km-chat-widget.km-chat-widget--layout-sidepanel .km-chat-messages {
    height: clamp(320px, 46vh, 450px);
    border-radius: 20px;
    background: #ffffff;
}

#km-chat-widget.km-chat-widget--layout-sidepanel .km-chat-action-card,
#km-chat-widget.km-chat-widget--layout-sidepanel .km-chat-choice-hero,
#km-chat-widget.km-chat-widget--layout-sidepanel .km-chat-form-head,
#km-chat-widget.km-chat-widget--layout-sidepanel .km-chat-prechat-head,
#km-chat-widget.km-chat-widget--layout-sidepanel .km-chat-session-info {
    border-radius: 20px;
}

@media (max-width: 767px) {
    #km-chat-widget.km-chat-widget--layout-command .km-chat-panel,
    #km-chat-widget.km-chat-widget--layout-split .km-chat-panel,
    #km-chat-widget.km-chat-widget--layout-glass .km-chat-panel,
    #km-chat-widget.km-chat-widget--layout-minimal .km-chat-panel,
    #km-chat-widget.km-chat-widget--layout-sidepanel .km-chat-panel {
        left: 10px;
        right: 10px;
        bottom: calc(10px + env(safe-area-inset-bottom));
        width: auto;
        height: auto;
        max-height: calc(100vh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
        border-radius: 22px;
    }

    #km-chat-widget.km-chat-widget--layout-glass .km-chat-header {
        margin: 8px;
    }
}

@media (max-width: 480px) {
    #km-chat-widget.km-chat-widget--layout-command .km-chat-toggle,
    #km-chat-widget.km-chat-widget--layout-split .km-chat-toggle,
    #km-chat-widget.km-chat-widget--layout-glass .km-chat-toggle,
    #km-chat-widget.km-chat-widget--layout-minimal .km-chat-toggle,
    #km-chat-widget.km-chat-widget--layout-sidepanel .km-chat-toggle {
        width: 58px;
        height: 58px;
        min-height: 58px;
        padding: 0;
        justify-content: center;
    }

    #km-chat-widget.km-chat-widget--layout-command .km-chat-toggle-copy,
    #km-chat-widget.km-chat-widget--layout-split .km-chat-toggle-copy,
    #km-chat-widget.km-chat-widget--layout-glass .km-chat-toggle-copy,
    #km-chat-widget.km-chat-widget--layout-minimal .km-chat-toggle-copy,
    #km-chat-widget.km-chat-widget--layout-sidepanel .km-chat-toggle-copy {
        display: none;
    }
}


