.customer-chat { --cc-blue: #075cce; --cc-ink: #172940; --cc-muted: #637389; position: fixed; right: 24px; bottom: var(--cc-bottom, 24px); z-index: 1050; font: 14px/1.5 system-ui, -apple-system, sans-serif; color: var(--cc-ink); }
.customer-chat *, .customer-chat *::before, .customer-chat *::after { box-sizing: border-box; }
.customer-chat [hidden] { display: none !important; }
.customer-chat button, .customer-chat input, .customer-chat textarea { font: inherit; }
.customer-chat button { cursor: pointer; border: 0; }
.customer-chat button:disabled { opacity: .55; cursor: not-allowed; }
.customer-chat :focus-visible { outline: 3px solid #f3b53e; outline-offset: 3px; }
.customer-chat h2, .customer-chat h3, .customer-chat p { margin: 0; }
.customer-chat .cc-launcher { display: flex; align-items: center; gap: 10px; margin-left: auto; padding: 16px 22px; border-radius: 999px; background: var(--cc-blue); color: white; box-shadow: 0 6px 24px #13395a33; font-weight: 650; }
.customer-chat .cc-panel { position: absolute; bottom: 74px; right: 0; display: flex; flex-direction: column; width: 390px; height: 620px; max-height: calc(100dvh - 120px); overflow: hidden; border-radius: 20px; background: white; box-shadow: 0 16px 70px #10263d33; border: 1px solid #e3e9f1; }
.customer-chat .cc-header { display: flex; align-items: center; gap: 12px; padding: 21px; background: var(--cc-blue); color: white; }
.customer-chat .cc-header h2 { font-size: 18px; font-weight: 700; color: inherit; line-height: 1.3; }
.customer-chat .cc-title-emoji { vertical-align: text-bottom; }
.customer-chat .cc-header p { font-size: 12px; color: #d4e3f4; margin-top: 3px; }
.customer-chat .cc-avatar { position: relative; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: white; }
.customer-chat .cc-avatar img { width: 28px; height: 28px; object-fit: contain; }
.customer-chat .cc-status { position: absolute; bottom: -2px; right: -2px; width: 13px; height: 13px; border-radius: 50%; background: #9aa5b1; border: 2px solid var(--cc-blue); }
.customer-chat .cc-status.cc-online { background: #29c46f; }
.customer-chat .cc-minimize { background: transparent; color: white; width: 36px; height: 36px; border-radius: 8px; font-size: 26px; }
.customer-chat .cc-menu { position: relative; margin-left: auto; }
.customer-chat .cc-menu-toggle { background: transparent; color: white; width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.customer-chat .cc-menu-toggle:hover { background: rgba(255, 255, 255, .12); }
.customer-chat .cc-menu-list { position: absolute; top: calc(100% + 8px); right: 0; z-index: 5; display: flex; flex-direction: column; gap: 2px; min-width: 200px; padding: 6px; border-radius: 12px; background: white; box-shadow: 0 12px 32px #10263d33; border: 1px solid #e3e9f1; }
.customer-chat .cc-menu-list button { padding: 10px 12px; border-radius: 8px; background: transparent; color: var(--cc-ink); font-size: 13px; font-weight: 600; text-align: left; }
.customer-chat .cc-menu-list button:hover { background: #f4f8fd; }
.customer-chat .cc-content { padding: 10px 22px 22px; overflow-y: auto; flex: 1; min-height: 0; overscroll-behavior: contain; background: linear-gradient(#f4f8fd, #fff 220px); }
.customer-chat h3 { font-size: 24px; line-height: 1.3; font-weight: 700; margin: 12px 0; color: var(--cc-ink); }
.customer-chat .cc-contact > p, .customer-chat .cc-start > p { color: var(--cc-muted); margin-bottom: 20px; }
.customer-chat .cc-eyebrow { font-size: 10px; letter-spacing: 1.5px; font-weight: 750; color: var(--cc-blue); }
.customer-chat label { display: block; font-size: 12px; font-weight: 650; margin-bottom: 6px; }
.customer-chat input { width: 100%; height: 46px; padding: 12px; margin-bottom: 16px; border: 1px solid #d7e0eb; border-radius: 10px; background: white; color: var(--cc-ink); box-shadow: none; }
.customer-chat .cc-small { font-size: 11px; line-height: 1.6; }
.customer-chat .cc-primary { background: var(--cc-blue); color: white; padding: 12px 16px; border-radius: 10px; font-weight: 650; }
.customer-chat .cc-contact-submit, .customer-chat .cc-start-submit, .customer-chat .cc-new { width: 100%; }
.customer-chat .cc-secondary { background: #edf3fa; color: #214f7e; padding: 8px 10px; border-radius: 8px; font-size: 12px; }
.customer-chat .cc-error { padding: 12px; border-radius: 10px; background: #fff0ed; color: #a33122; margin-bottom: 12px; overflow-wrap: anywhere; }
.customer-chat .cc-messages { display: flex; flex-direction: column; gap: 14px; }
.customer-chat .cc-message { max-width: 90%; align-self: flex-start; }
.customer-chat .cc-message-user { align-self: flex-end; }
.customer-chat .cc-message > p, .customer-chat .cc-message-body { background: #edf2f8; padding: 12px 14px; border-radius: 14px 14px 14px 4px; white-space: pre-wrap; overflow-wrap: anywhere; }
.customer-chat .cc-message-user p { background: var(--cc-blue); color: white; border-radius: 14px 14px 4px 14px; }
.customer-chat .cc-message small { display: block; color: var(--cc-muted); font-size: 10px; margin: 4px 3px; }
.customer-chat .cc-message-user small { text-align: right; }
.customer-chat .cc-pending { opacity: 1; }
.customer-chat .cc-message-system { max-width: 100%; align-self: center; text-align: center; }
.customer-chat .cc-message-system p { background: transparent; font-size: 12px; color: var(--cc-muted); padding: 6px; }
.customer-chat .cc-typing p { padding: 14px 16px; }
.customer-chat .cc-typing-dots { display: flex; align-items: center; gap: 4px; }
.customer-chat .cc-typing-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--cc-muted); }
.customer-chat .cc-empty { text-align: center; color: var(--cc-muted); padding: 28px 10px 16px; }
.customer-chat .cc-quick { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.customer-chat .cc-quick button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 16px; border: 1px solid #d7e0eb; border-radius: 999px; background: white; color: var(--cc-ink); font-size: 13px; font-weight: 650; text-align: left; transition: background-color .15s, border-color .15s; }
.customer-chat .cc-quick button:hover { background: #f4f8fd; border-color: var(--cc-blue); }
.customer-chat .cc-quick svg { flex-shrink: 0; color: var(--cc-blue); }
.customer-chat .cc-confirm { display: flex; flex-wrap: wrap; gap: 8px; border: 1px solid #d7e0eb; border-radius: 10px; padding: 12px; margin: 0 0 12px; }
.customer-chat .cc-confirm p { width: 100%; margin-bottom: 2px; }
.customer-chat .cc-foot { flex-shrink: 0; padding: 14px 22px; border-top: 1px solid #edf1f6; background: white; }
.customer-chat .cc-composer { display: flex; align-items: flex-end; gap: 6px; border: 1px solid #cddbea; border-radius: 999px; background: white; padding: 5px 5px 5px 18px; }
.customer-chat .cc-composer:focus-within { border-color: var(--cc-blue); box-shadow: 0 0 0 3px #075cce22; }
.customer-chat .cc-composer :focus-visible { outline: none; }
.customer-chat textarea { flex: 1; width: auto; border: 0; resize: none; min-height: 24px; max-height: 90px; padding: 6px 0; box-shadow: none; background: transparent; color: var(--cc-ink); }
.customer-chat textarea::placeholder { color: var(--cc-muted); }
.customer-chat .cc-send { flex-shrink: 0; display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0; border-radius: 50%; }
.customer-chat .cc-counter { display: none; }
.customer-chat .cc-disclaimer { margin-top: 6px; text-align: center; font-size: 9px; color: var(--cc-muted); }
.customer-chat .cc-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 480px) {
    .customer-chat { right: 12px; bottom: var(--cc-bottom, max(12px, env(safe-area-inset-bottom))); }
    .customer-chat .cc-panel { width: calc(100vw - 24px); bottom: 66px; height: 640px; max-height: calc(100dvh - 100px - env(safe-area-inset-bottom)); border-radius: 16px; }
    .customer-chat .cc-content { padding: 10px 18px 18px; }
    .customer-chat .cc-foot { padding: 10px 18px; }
    .customer-chat input, .customer-chat textarea { font-size: 16px; }
    .customer-chat .cc-launcher { padding: 13px 18px; }
}
@media (prefers-reduced-motion: no-preference) {
    .customer-chat .cc-panel { animation: cc-appear .18s ease-out; transform-origin: bottom right; }
    .customer-chat .cc-panel.cc-closing { animation: cc-disappear .16s ease-in forwards; }
    .customer-chat .cc-typing-dots span { animation: cc-bounce 1.2s infinite ease-in-out; }
    .customer-chat .cc-typing-dots span:nth-child(2) { animation-delay: .15s; }
    .customer-chat .cc-typing-dots span:nth-child(3) { animation-delay: .3s; }
    @keyframes cc-appear { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
    @keyframes cc-disappear { from { opacity: 1; transform: translateY(0) scale(1); } to { opacity: 0; transform: translateY(8px) scale(.98); } }
    @keyframes cc-bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
}

.customer-chat .cc-message-body { white-space: normal; }
.customer-chat .cc-message-body p { margin: 0 0 10px; }
.customer-chat .cc-message-body p:last-child { margin-bottom: 0; }
.customer-chat .cc-message-body ul, .customer-chat .cc-message-body ol { margin: 8px 0; padding-left: 20px; }
.customer-chat .cc-message-body li { margin: 5px 0; }
.customer-chat .cc-message-body strong { font-weight: 700; }
.customer-chat .cc-message-body a { color: #075cce; text-decoration: underline; overflow-wrap: anywhere; }
