.ksk-chat { --ksk-green: #216b40; --ksk-ink: #243d35; position: fixed; right: 24px; bottom: 24px; z-index: 2147482000; font: 14px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ksk-ink); }
.ksk-chat *, .ksk-chat *::before, .ksk-chat *::after { box-sizing: border-box; }
.ksk-chat [hidden] { display: none !important; }
.ksk-chat button, .ksk-chat input, .ksk-chat textarea { font: inherit; }
.ksk-chat button { cursor: pointer; }
.ksk-chat button:focus-visible, .ksk-chat input:focus-visible, .ksk-chat textarea:focus-visible, .ksk-chat a:focus-visible { outline: 3px solid #b7d995; outline-offset: 3px; }
.ksk-chat-launcher { min-height: 48px; padding: 13px 21px; border: 1px solid transparent; border-radius: 99px; background: var(--ksk-green); color: white; box-shadow: 0 8px 24px #203c3426; font-weight: 600 !important; }
.ksk-chat-panel { display: flex; flex-direction: column; width: min(380px, calc(100vw - 32px)); max-height: min(730px, calc(100dvh - 106px)); margin-bottom: 12px; background: #fffefb; border: 1px solid #d8e1d9; border-radius: 20px; box-shadow: 0 16px 65px #223d352b; overflow: hidden; }
.ksk-chat-header { padding: 20px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; background: #f0f4ec; border-bottom: 1px solid #dfe6db; }
.ksk-chat-header strong { font-size: 18px; }
.ksk-chat-status { margin: 4px 0 0; color: #486459; font-size: 12px; }
.ksk-chat-close { width: 32px; height: 32px; padding: 0; background: transparent; border: 1px solid #cad7c8; border-radius: 50%; color: #486459; font-size: 23px !important; line-height: 1; flex-shrink: 0; }
.ksk-chat-log { overflow-y: auto; min-height: 12px; max-height: 280px; flex: 1 1 auto; padding: 14px 18px; overscroll-behavior: contain; }
.ksk-chat-log:empty { padding: 0; }
.ksk-chat-message { width: fit-content; max-width: 92%; padding: 10px 12px; margin: 0 0 10px; border-radius: 14px; background: #edf2e8; }
.ksk-chat-message-visitor { margin-left: auto; background: #e7eee8; }
.ksk-chat-message-system { background: #f4f3ed; }
.ksk-chat-message small { color: #526d5f; font-weight: 600; font-size: 11px; }
.ksk-chat-message p { white-space: pre-wrap; overflow-wrap: anywhere; margin: 3px 0; }
.ksk-chat-message time { display: block; text-align: right; font-size: 10px; color: #597367; }
.ksk-chat-form { flex: 0 0 auto; border-top: 1px solid #e4e8df; padding: 16px 18px 18px; overflow-y: auto; }
.ksk-chat-contacts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.ksk-chat-contacts label, .ksk-chat-text-label { display: block; font-size: 11px; color: #486459; }
.ksk-chat input:not([type="checkbox"]), .ksk-chat textarea { display: block; width: 100%; border: 1px solid #cddacc; border-radius: 9px; background: #fff; color: #243d35; padding: 10px; margin-top: 4px; font-size: 13px; }
.ksk-chat textarea { resize: vertical; min-height: 82px; max-height: 160px; }
.ksk-chat-consent { display: flex; align-items: flex-start; gap: 8px; font-size: 10px; color: #546d61; margin-top: 11px; }
.ksk-chat-consent input { margin: 3px 0 0; accent-color: var(--ksk-green); flex-shrink: 0; }
.ksk-chat a { color: #244f43; text-decoration: underline; }
.ksk-chat-feedback { min-height: 0; font-size: 11px; margin: 9px 0; color: #735b32; }
.ksk-chat-feedback:empty { margin: 8px 0; }
.ksk-chat-submit, .ksk-chat-restart { width: 100%; border: 1px solid var(--ksk-green); border-radius: 9px; background: var(--ksk-green); color: #fff; padding: 11px 12px; font-weight: 600 !important; }
.ksk-chat button:disabled { opacity: .6; cursor: wait; }
@media (max-width: 480px) { .ksk-chat { right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); left: 16px; } .ksk-chat-launcher { display: block; margin-left: auto; font-size: 13px !important; } .ksk-chat-panel { width: 100%; max-height: calc(100dvh - 94px); } .ksk-chat-header { padding: 15px 18px; } .ksk-chat-log { max-height: 230px; } }
@media (prefers-reduced-motion: no-preference) { .ksk-chat-panel { animation: ksk-chat-enter .18s ease-out; } @keyframes ksk-chat-enter { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } } }
