.rkm-chat { position: fixed; right: 16px; bottom: 20px; z-index: 55; font-family: Inter, system-ui, -apple-system, sans-serif; color: #111834; }
@media (min-width: 768px) { .rkm-chat { right: 24px; bottom: 28px; } }
@keyframes rkmChatBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes rkmChatIn { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes rkmDot { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

.rkm-chat-launcher { width: 60px; height: 60px; border-radius: 50%; border: 3px solid #f4b318; background: #1d2857; color: #f4b318; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 12px 28px -8px rgba(17,24,52,.55); animation: rkmChatBob 2.4s ease-in-out infinite; margin-left: auto; padding: 0; }
.rkm-chat-launcher:hover { background: #26336a; }
.rkm-chat-launcher:focus-visible, .rkm-chat button:focus-visible, .rkm-chat a:focus-visible, .rkm-chat textarea:focus-visible { outline: 3px solid #f4b318; outline-offset: 2px; }
.rkm-chat.is-open .rkm-chat-launcher { animation: none; }

.rkm-chat-tip { position: absolute; right: 70px; bottom: 12px; white-space: nowrap; background: #fff; color: #111834; border: 1px solid #e4e5eb; border-radius: 12px 12px 4px 12px; padding: 8px 12px; font-size: 13px; font-weight: 600; box-shadow: 0 10px 24px -10px rgba(17,24,52,.35); cursor: pointer; animation: rkmChatIn .3s ease-out; }
.rkm-chat-tip[hidden] { display: none; }

.rkm-chat-panel { position: absolute; right: 0; bottom: 74px; width: 360px; max-width: calc(100vw - 32px); height: min(560px, calc(100vh - 120px)); background: #fff; border-radius: 18px; border: 1px solid #e4e5eb; box-shadow: 0 24px 60px -18px rgba(17,24,52,.45); display: flex; flex-direction: column; overflow: hidden; animation: rkmChatIn .22s ease-out; }
.rkm-chat-panel[hidden] { display: none; }
.rkm-chat-head { background: #1d2857; color: #fff; padding: 12px 12px 12px 14px; display: flex; align-items: center; gap: 10px; }
.rkm-chat-av { width: 38px; height: 38px; border-radius: 50%; background: #f4b318; color: #1d2857; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.rkm-chat-av svg { width: 22px; height: 22px; }
.rkm-chat-ttl { flex: 1; display: flex; flex-direction: column; line-height: 1.25; }
.rkm-chat-ttl strong { font-size: 15px; }
.rkm-chat-ttl span { font-size: 12px; color: #c7c9d5; }
.rkm-chat-close { width: 44px; height: 44px; border: 0; background: transparent; color: #c7c9d5; border-radius: 10px; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.rkm-chat-close:hover { background: rgba(255,255,255,.08); color: #fff; }

.rkm-chat-log { flex: 1; overflow-y: auto; padding: 14px 12px; background: #f7f7fa; display: flex; flex-direction: column; gap: 8px; overscroll-behavior: contain; }
.rkm-chat-msg { max-width: 86%; padding: 9px 12px; font-size: 14px; line-height: 1.55; border-radius: 14px; word-wrap: break-word; overflow-wrap: anywhere; }
.rkm-chat-bot { align-self: flex-start; background: #fff; border: 1px solid #e4e5eb; border-radius: 14px 14px 14px 4px; }
.rkm-chat-me { align-self: flex-end; background: #1d2857; color: #fff; border-radius: 14px 14px 4px 14px; white-space: pre-wrap; }
.rkm-chat-bot a { color: #1d2857; font-weight: 600; text-decoration: underline; text-decoration-color: #f4b318; text-underline-offset: 2px; }
.rkm-chat-typing { display: flex; gap: 4px; padding: 12px 14px; }
.rkm-chat-typing i { width: 7px; height: 7px; border-radius: 50%; background: #8a8f9c; animation: rkmDot 1.2s infinite; }
.rkm-chat-typing i:nth-child(2) { animation-delay: .15s; }
.rkm-chat-typing i:nth-child(3) { animation-delay: .3s; }

.rkm-chat-quick { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px 0; background: #f7f7fa; }
.rkm-chat-quick[hidden] { display: none; }
.rkm-chat-q { border: 1px solid #f4b318; background: #fff8e6; color: #6b4a00; border-radius: 999px; padding: 7px 12px; font-size: 13px; font-weight: 600; cursor: pointer; min-height: 36px; }
.rkm-chat-q:hover { background: #fdecb8; }

.rkm-chat-form { display: flex; gap: 8px; align-items: flex-end; padding: 10px; border-top: 1px solid #e4e5eb; background: #fff; }
.rkm-chat-form textarea { flex: 1; resize: none; border: 1px solid #c7c9d5; border-radius: 12px; padding: 10px 12px; font: inherit; font-size: 16px; line-height: 1.4; max-height: 110px; color: #111834; background: #fff; }
.rkm-chat-send { width: 44px; height: 44px; border: 0; border-radius: 12px; background: #1d2857; color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; padding: 0; }
.rkm-chat-send:disabled { opacity: .5; cursor: wait; }

.rkm-chat-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 12px 10px; background: #fff; }
.rkm-chat-wa { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: #128c4a; text-decoration: none; min-height: 32px; }
.rkm-chat-wa:hover { text-decoration: underline; }
.rkm-chat-note { font-size: 11px; color: #5d6279; text-align: right; }

@media (max-width: 480px) {
	.rkm-chat.is-open { right: 0; bottom: 0; left: 0; top: 0; }
	.rkm-chat.is-open .rkm-chat-panel { position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; height: 100dvh; border-radius: 0; border: 0; }
	.rkm-chat.is-open .rkm-chat-launcher { display: none; }
	.rkm-chat-head { padding-top: max(12px, env(safe-area-inset-top)); }
	.rkm-chat-foot { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { .rkm-chat-launcher, .rkm-chat-panel, .rkm-chat-tip { animation: none; } }

.rkm-chat-wa-btn { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 8px; background: #25d366; color: #fff !important; text-decoration: none !important; font-weight: 700; font-size: 13px; border-radius: 10px; padding: 9px 12px; min-height: 40px; }
.rkm-chat-wa-btn:hover { background: #1fb457; }
.rkm-chat-calc-btn { display: flex; align-items: center; justify-content: center; margin-top: 8px; background: #fff8e6; border: 1px solid #f4b318; color: #6b4a00 !important; text-decoration: none !important; font-weight: 700; font-size: 13px; border-radius: 10px; padding: 9px 12px; min-height: 40px; }
.rkm-chat-calc-btn:hover { background: #fdecb8; }
