#es-guest-chat { font: 16px/1.45 system-ui, sans-serif; color: #142b33; }
#es-guest-chat [hidden] { display: none !important; }
#es-guest-chat * { box-sizing: border-box; }
#es-guest-chat button, #es-guest-chat select, #es-guest-chat textarea { font: inherit; color: #142b33; border: 1px solid #67818a; border-radius: 8px; background: white; padding: 8px; }
#es-guest-chat button { min-height: 44px; cursor: pointer; }
#es-guest-chat button:disabled { opacity: .6; cursor: default; }
#es-guest-chat :focus-visible { outline: 3px solid #007c89; outline-offset: 2px; }
#es-guest-chat .es-chat-launcher { position: fixed; bottom: 96px; right: 18px; z-index: 1100; background: #073b46; color: white; }
#es-chat-panel { position: fixed; bottom: 148px; right: 18px; z-index: 1101; width: min(390px, calc(100vw - 24px)); max-height: calc(100dvh - 172px); overflow-y: auto; background: #f7fbfc; border: 1px solid #67818a; border-radius: 14px; padding: 14px; box-shadow: 0 8px 28px #0004; }
#es-chat-panel header, #es-chat-panel .es-chat-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
#es-chat-panel h2 { font-size: 18px; margin: 0; color: #142b33; }
#es-chat-panel p { margin: 10px 0; }
#es-chat-panel .es-chat-log { height: 220px; min-height: 80px; overflow-y: auto; border: 1px solid #67818a; border-radius: 8px; padding: 8px; background: white; }
#es-chat-panel article { padding: 8px; margin: 6px 0; border-radius: 8px; background: #e4f1f4; overflow-wrap: anywhere; white-space: pre-wrap; }
#es-chat-panel article[data-role="guest"] { background: #f1effb; }
#es-chat-panel article strong { display: block; font-size: 13px; }
#es-chat-panel .es-chat-sources { white-space: normal; margin-top: 8px; padding-top: 6px; border-top: 1px solid currentColor; font-size: 12px; }
#es-chat-panel .es-chat-sources small, #es-chat-panel .es-chat-sources a { display: block; }
#es-chat-panel .es-chat-sources a { color: inherit; text-decoration: underline; overflow-wrap: anywhere; }
#es-chat-panel textarea { display: block; width: 100%; resize: vertical; max-height: 150px; }
#es-chat-panel form > label { display: block; margin-top: 10px; }
#es-chat-panel form button { margin-top: 8px; }
#es-chat-panel details { margin-top: 14px; border-top: 1px solid #67818a; padding-top: 8px; }
#es-chat-panel details label { display: block; margin: 8px 0; }
#es-chat-panel [data-chat="error"] { color: #972c20; }
#es-guest-chat[data-mode="integrated"] .es-chat-launcher { z-index: 10020; }
#es-guest-chat[data-mode="integrated"] #es-chat-panel { z-index: 10021; }
#es-guest-chat .es-chat-modes { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
#es-guest-chat .es-chat-modes [aria-pressed="true"] { background: #073b46; color: white; }
#es-guest-chat fieldset { min-width: 0; border: 1px solid #67818a; border-radius: 8px; padding: 10px; }
#es-guest-chat fieldset label, #es-guest-chat fieldset input { display: block; width: 100%; }
#es-guest-chat fieldset input { min-width: 0; padding: 8px; margin: 4px 0 8px; border: 1px solid #67818a; border-radius: 6px; font: inherit; }
#es-guest-chat[data-mode="integrated"] .es-chat-log { display: flex; flex-direction: column; gap: 6px; }
#es-guest-chat[data-mode="integrated"] article { width: fit-content; max-width: 85%; min-width: 0; margin: 0; align-self: flex-start; }
#es-guest-chat[data-mode="integrated"] article[data-role="staff"] { align-self: flex-end; background: #073b46; color: white; }
#es-guest-chat[data-mode="integrated"] article[data-role="system"] { align-self: center; }
@media (max-width: 480px), (max-height: 600px) { #es-chat-panel { bottom: 12px; right: 12px; max-height: calc(100dvh - 24px); } #es-chat-panel .es-chat-log { height: 25dvh; } }

/* Match DaftarEvent guest and Dashboard account palettes within the existing EventSilat drawer. */
#es-guest-chat[data-preview="false"] { font-family: inherit; }
#es-guest-chat[data-preview="false"] #es-chat-panel { background: #fff; color: #203e35; border-color: #ccd9d0; padding: 16px; border-radius: 12px; }
#es-guest-chat[data-preview="false"] .es-chat-launcher { background: #28665d; border-color: #28665d; }
#es-guest-chat[data-preview="false"] #es-chat-panel h2 { color: #28665c; font-size: 16px; }
#es-guest-chat[data-preview="false"] #es-chat-panel p { font-size: 13px; }
#es-guest-chat[data-session-mode="guest"] #es-chat-panel { width: min(370px, calc(100vw - 24px)); }
#es-guest-chat[data-session-mode="guest"] button { background: #28665d; color: #fff; border-color: #28665d; }
#es-guest-chat[data-session-mode="guest"] article { background: #edf4ef; padding: 10px; }
#es-guest-chat[data-session-mode="guest"] article[data-role="staff"] { background: #28665d; color: #fff; }
#es-guest-chat[data-session-mode="customer"] #es-chat-panel { color: #243c39; border-color: #dfe8e2; border-radius: 14px; padding: 18px; }
#es-guest-chat[data-session-mode="customer"] .es-chat-log { gap: 12px; }
#es-guest-chat[data-session-mode="customer"] article { max-width: 88%; padding: 10px 12px; border: 1px solid #dfe8e2; border-radius: 12px; background: #f4f7f3; }
#es-guest-chat[data-session-mode="customer"] article[data-role="staff"], #es-guest-chat[data-session-mode="customer"] article[data-role="ai"] { align-self: flex-end; background: #e8f2ee; border-color: #cbded5; color: #243c39; }
#es-guest-chat[data-session-mode="customer"] article[data-role="ai"] { background: #edf1f8; border-color: #d7dfed; }
#es-guest-chat[data-session-mode="customer"] article strong { color: #28665c; font-size: 12px; }
#es-guest-chat[data-session-mode="customer"] button { border-color: #28665c; background: #f4f7f3; color: #28665c; }
#es-chat-panel .es-chat-signin-confirm { position: sticky; top: 0; z-index: 2; padding: 14px; margin: 10px 0; border: 2px solid #28665c; border-radius: 10px; background: #fff; box-shadow: 0 4px 16px #0002; }
#es-chat-panel .es-chat-signin-confirm a { display: inline-block; padding: 12px 16px; margin-right: 8px; border-radius: 8px; background: #28665d; color: #fff; }

/* DaftarEvent's direct one-launcher / one-panel layout, without mode or setup controls. */
#es-guest-chat[data-preview="false"] .es-chat-launcher { bottom: 20px; right: 20px; padding: 12px 16px; border: 0; border-radius: 8px; }
#es-guest-chat[data-preview="false"] #es-chat-panel { bottom: 80px; right: 20px; max-height: 80vh; box-shadow: 0 8px 30px #0002; }
#es-guest-chat[data-preview="false"] #es-chat-title { font-size: 16px; color: #28665c; }
#es-guest-chat[data-preview="false"] .es-chat-log { height: auto; min-height: 0; max-height: 35vh; border: 0; padding: 0; margin: 12px 0; background: transparent; gap: 8px; }
#es-guest-chat[data-session-mode="customer"] .es-chat-log { max-height: 280px; margin: 14px 0; gap: 12px; }
#es-guest-chat[data-session-mode="customer"] .es-chat-launcher { width: min(390px, calc(100vw - 32px)); padding: 12px 18px; text-align: left; font-weight: 600; color: #28665c; background: #fff; border: 1px solid #dfe8e2; border-radius: 14px; box-shadow: 0 8px 32px #243c3926; }
#es-guest-chat[data-preview="false"] #es-chat-panel form > label { margin-top: 10px; }
#es-guest-chat[data-preview="false"] #es-chat-panel textarea { border-color: #ccd9d0; }
#es-guest-chat[data-session-mode="customer"] #es-chat-panel textarea { border-color: #dfe8e2; }
#es-guest-chat [data-chat="account-label"] { white-space: pre-line; overflow-wrap: anywhere; }
@media (max-width: 767px) { #es-guest-chat[data-preview="false"] .es-chat-launcher { right: 16px; bottom: 16px; } #es-guest-chat[data-preview="false"] #es-chat-panel { right: 16px; bottom: 76px; } }
