.xchat, .xchat * { box-sizing: border-box; letter-spacing: 0; }
.xchat { --chat-accent: #15746e; --chat-bubble: #e9f4f1; --chat-ink: #202926; --chat-muted: #6a7470; --chat-line: #e5e9e6; font: 14px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--chat-ink); -webkit-font-smoothing: antialiased; }
.xchat [hidden] { display: none !important; }
.xchat { --chat-safe-top: env(safe-area-inset-top, 0px); --chat-safe-left: env(safe-area-inset-left, 0px); --chat-safe-right: env(safe-area-inset-right, 0px); }
.xchat button, .xchat input, .xchat textarea, .xchat select { font: inherit; }
.xchat button { cursor: pointer; }
.xchat button:disabled { cursor: default; opacity: .42; }
.xchat :is(button, a, summary):focus-visible { outline: 3px solid #bd9b50; outline-offset: 3px; }
.xchat svg { width: 19px; height: 19px; flex-shrink: 0; stroke-width: 1.65; }
.xchat button svg { pointer-events: none; }
.xchat h1, .xchat h2, .xchat h3, .xchat p { margin: 0; font-family: inherit; }
.xchat h1, .xchat h2, .xchat h3 { color: inherit; line-height: 1.3; }
.xchat small, .xchat time { color: var(--chat-muted); font-size: 12px; }
.xchat-input { display: grid; gap: 7px; font-size: 13px; font-weight: 600; min-width: 0; }
.xchat input:not([type=checkbox]):not([type=color]), .xchat textarea, .xchat select { width: 100%; min-width: 0; padding: 11px 13px; border: 1px solid #dce2dd; border-radius: 7px; background: #fff; color: var(--chat-ink); font-weight: 400; outline: none; transition: border-color .15s, box-shadow .15s; }
.xchat :is(input, textarea, select):focus-visible { border-color: var(--chat-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--chat-accent) 10%, transparent); }
.xchat input::placeholder, .xchat textarea::placeholder { color: #7c847f; }
.xchat textarea { resize: vertical; }
.xchat-check { display: flex; gap: 9px; align-items: center; font-weight: 400; line-height: 1.4; }
.xchat-check input { accent-color: var(--chat-accent); width: 17px; height: 17px; flex-shrink: 0; margin: 0; }
.xchat-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 42px; padding: 9px 15px; border: 1px solid #dce2dd; border-radius: 7px; background: #fff; color: var(--chat-ink); text-decoration: none; font-weight: 600; transition: background .15s, border-color .15s; }
.xchat-button:hover { background: #f4f6f3; border-color: #c1ccc4; }
.xchat-button.primary { background: var(--chat-accent); color: #fff; border-color: var(--chat-accent); box-shadow: 0 2px 3px #11251c0a; }
.xchat-button.primary:hover { background: color-mix(in srgb, var(--chat-accent) 90%, #000); }
.xchat-icon { display: inline-grid; place-items: center; width: 42px; height: 42px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #53605a; flex-shrink: 0; text-decoration: none; }
.xchat-icon:hover { background: #f0f3ef; color: var(--chat-ink); }
.xchat-error { background: #fff1ed; color: #9d2d22; padding: 11px 15px; border: 1px solid #f4dcd5; border-radius: 7px; overflow-wrap: anywhere; }
.xchat-status { min-height: 22px; color: var(--chat-muted); font-size: 12px; }
.xchat-header { display: flex; align-items: center; gap: 14px; padding: 18px 24px; border-bottom: 1px solid var(--chat-line); background: #fff; flex-shrink: 0; }
.xchat-header h1, .xchat-header h2 { font-size: 20px; font-weight: 650; }
.xchat-header > div { min-width: 0; }
.xchat-header strong, .xchat-header small { display: block; overflow-wrap: anywhere; }
.xchat-header-actions { display: flex; align-items: center; gap: 5px; flex-shrink: 0; margin-left: auto; }
.xchat-connection { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--chat-muted); min-width: 0; overflow-wrap: anywhere; }
.xchat-connection::before { content: ''; width: 6px; height: 6px; flex-shrink: 0; border-radius: 50%; background: #a8afa8; }
.xchat-connection[data-connected=true]::before { background: #2b8b62; }
.xchat-avatar { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: #e7efea; color: #476655; font-size: 13px; font-weight: 650; flex-shrink: 0; }
.xchat-avatar[data-tone="1"] { background: #f2eadc; color: #826933; }
.xchat-avatar[data-tone="2"] { background: #e8edf5; color: #516c88; }
.xchat-avatar[data-tone="3"] { background: #f2e7ec; color: #895d74; }
.xchat-conversation { display: flex; text-align: left; align-items: center; gap: 12px; width: 100%; min-width: 0; border: 1px solid transparent; border-radius: 8px; padding: 17px 13px; background: transparent; color: inherit; transition: background .15s, border-color .15s; }
.xchat-conversation:hover { background: #eef2ed; }
.xchat-conversation.is-selected { background: #fff; border-color: #dce4dc; box-shadow: 0 2px 4px #20382a04, inset 3px 0 var(--chat-accent); }
.xchat-conversation-content { min-width: 0; flex: 1; }
.xchat-conversation-heading, .xchat-conversation-bottom { display: flex; align-items: center; gap: 8px; min-width: 0; }
.xchat-conversation-heading { margin-bottom: 5px; align-items: baseline; }
.xchat-conversation-heading strong { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 13px; font-weight: 650; }
.xchat-conversation-heading time { font-size: 10px; flex-shrink: 0; }
.xchat-conversation-bottom small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.xchat-conversation-bottom svg { width: 13px; height: 13px; color: #6e7a70; }
.xchat-count { display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 50%; background: var(--chat-accent); color: white; font-size: 10px; font-weight: 600; flex-shrink: 0; }
.xchat-messages { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 24px; background: #f5f6f3; display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.xchat-day { display: flex; align-items: center; gap: 18px; width: 100%; color: #7b847d; font-size: 11px; margin: 0 0 8px; flex-shrink: 0; }
.xchat-day::before, .xchat-day::after { content: ''; height: 1px; flex: 1; background: #e4e8e1; }
.xchat-day span { text-align: center; }
.xchat-message { width: fit-content; max-width: min(78%, 580px); min-width: 160px; border: 1px solid #e1e7df; border-radius: 8px; border-top-left-radius: 2px; background: #fff; padding: 13px 16px 9px; flex-shrink: 0; box-shadow: 0 2px 2px #24362a03; }
.xchat-message.is-mine { align-self: flex-end; background: var(--chat-bubble); border-color: color-mix(in srgb, var(--chat-bubble) 87%, #7e9888); border-radius: 8px 2px 8px 8px; }
.xchat-message.is-deleted { background: transparent; border-style: dashed; box-shadow: none; color: #6e7870; }
.xchat-message p { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.65; color: inherit; }
.xchat-message-meta { display: flex; flex-wrap: wrap; gap: 5px 8px; margin-bottom: 6px; align-items: center; }
.xchat-message-meta strong { font-size: 12px; overflow-wrap: anywhere; min-width: 0; font-weight: 650; }
.xchat-author-role { font-size: 10px; color: #63736a; }
.xchat-message-footer { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 7px; padding: 0; background: transparent; border: 0; }
.xchat-message-footer :is(time, small) { font-size: 10px; color: #758278; }
.xchat-message-actions { display: flex; gap: 3px; justify-content: flex-end; margin-top: 5px; padding-top: 5px; border-top: 1px solid #203d2e0a; }
.xchat-message-actions button { display: grid; place-items: center; height: 32px; width: 34px; border: 0; border-radius: 5px; background: transparent; color: #61756a; }
.xchat-message-actions button:hover { background: #ffffffa8; color: #263a2d; }
.xchat-message-actions svg { width: 14px; height: 14px; }
.xchat-compose { display: block; padding: 16px 24px 22px; border-top: 1px solid var(--chat-line); background: #fff; flex-shrink: 0; }
.xchat-compose-input { display: flex; align-items: flex-end; gap: 8px; padding: 8px; border: 1px solid #dce4db; border-radius: 8px; background: #fff; box-shadow: 0 2px 5px #223d2905; transition: border-color .15s, box-shadow .15s; }
.xchat-compose-input:focus-within { border-color: var(--chat-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--chat-accent) 7%, transparent); }
.xchat .xchat-compose textarea { max-height: 140px; min-height: 48px; flex: 1; padding: 5px 6px; border: 0; border-radius: 0; resize: none; box-shadow: none; }
.xchat-compose button { background: var(--chat-accent); color: #fff; height: 44px; width: 44px; }
.xchat-compose button:hover { background: color-mix(in srgb, var(--chat-accent) 90%, #000); }
.xchat-empty { margin: auto; text-align: center; padding: 28px; color: var(--chat-muted); }
.xchat-empty-state { margin: auto; width: min(360px, 100%); text-align: center; padding: 24px 0; }
.xchat-empty-state > span { display: grid; place-items: center; width: 62px; height: 62px; margin: 0 auto 24px; border: 1px solid #d9e1d6; border-radius: 8px; background: #fff; box-shadow: 0 4px 10px #25392b05; color: var(--chat-accent); }
.xchat-empty-state svg { width: 26px; height: 26px; }
.xchat-empty-state h2 { font-size: 20px; font-weight: 600; margin-bottom: 8px; }
.xchat-empty-state p { font-size: 13px; color: var(--chat-muted); }
.xchat-pager { display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 12px 18px; flex-shrink: 0; }
.xchat-pager small { font-size: 11px; }
.xchat-form { display: grid; gap: 18px; padding: 26px; }
.xchat-form h2 { font-size: 22px; font-weight: 650; }
.xchat-welcome { margin-bottom: 3px; }
.xchat-welcome-icon { display: inline-grid; place-items: center; width: 42px; height: 42px; border: 1px solid #e1e7dc; border-radius: 8px; background: #f3f6ee; color: var(--chat-accent); margin-bottom: 16px; }
.xchat-welcome p { margin-top: 9px; color: var(--chat-muted); font-size: 13px; line-height: 1.65; }
.xchat-form-note { display: flex; gap: 9px; align-items: flex-start; line-height: 1.55; }
.xchat-form-note svg { width: 15px; height: 15px; margin-top: 2px; }
.xchat-guest-form > .primary { min-height: 48px; justify-content: space-between; padding-inline: 17px; }
.xchat-dialog { border: 1px solid #dce4dc; border-radius: 8px; width: min(520px, calc(100% - 32px)); padding: 26px; color: inherit; box-shadow: 0 24px 90px #13261c24; }
.xchat-dialog h2 { font-size: 20px; margin-bottom: 12px; }
.xchat-dialog::backdrop { background: #15251d6b; }
.xchat-dialog form { display: grid; gap: 16px; }
.xchat-dialog menu { display: flex; justify-content: flex-end; gap: 9px; padding: 0; margin: 0; flex-wrap: wrap; }
.xchat-dialog textarea { min-height: 140px; }
.xchat-dialog .xchat-pager { padding: 20px 0 0; flex-wrap: wrap; }
.xchat-launcher { position: fixed; z-index: 74; bottom: 26px; right: 26px; width: 58px; height: 58px; border: 3px solid #fff; border-radius: 50%; background: var(--chat-accent); color: white; box-shadow: 0 5px 22px #182b292b; display: grid; place-items: center; touch-action: none; user-select: none; }
.xchat-launcher:hover { background: color-mix(in srgb, var(--chat-accent) 88%, #000); }
.xchat-launcher > span { display: none; }
.xchat-launcher svg { width: 26px; height: 26px; }
.xchat-launcher b { position: absolute; top: -4px; right: -3px; border: 2px solid #fff; }
.xchat-drawer { margin: 0 0 0 auto; width: min(430px, 100%); max-width: 100%; height: min(100dvh, var(--chat-viewport-height, 100dvh)); max-height: min(100dvh, var(--chat-viewport-height, 100dvh)); padding: 0; border: 0; color: var(--chat-ink); background: #fff; box-shadow: -15px 0 60px #12241b24; }
.xchat-drawer[open] { display: flex; flex-direction: column; }
.xchat-drawer { padding: var(--chat-safe-top) var(--chat-safe-right) 0 var(--chat-safe-left); }
.xchat-drawer::backdrop { background: #16251c52; }
.xchat-drawer[data-side=left] { margin: 0 auto 0 0; --chat-enter-x: -24px; }
.xchat-customer-header { padding: 24px 20px; background: var(--chat-header-bg, #202e2a); border-top: 3px solid var(--chat-accent); border-bottom: 0; color: var(--chat-header-text, #fff); gap: 12px; }
.xchat-brand-mark { width: 40px; height: 40px; padding: 6px; object-fit: contain; background: #fff; border-radius: 7px; flex-shrink: 0; }
.xchat-customer-heading { flex: 1; }
.xchat-customer-heading small { color: inherit; opacity: .8; font-size: 11px; margin-bottom: 3px; }
.xchat-customer-heading h2 { font-size: 19px; overflow-wrap: anywhere; }
.xchat-customer-header .xchat-icon { width: 34px; height: 36px; color: inherit; }
.xchat-customer-header .xchat-icon:hover { background: #ffffff12; color: inherit; }
.xchat-channel-bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 22px; border-bottom: 1px solid var(--chat-line); background: #fff; flex-shrink: 0; }
.xchat-channel-bar > svg { width: 15px; height: 15px; color: #a2987b; }
.xchat-drawer-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.xchat-drawer-list { flex: 1; min-height: 0; overflow-y: auto; padding: 0 12px; }
.xchat-drawer-list .xchat-conversation { border-bottom: 1px solid #ebeee8; border-radius: 0; padding-block: 21px; }
.xchat-drawer .xchat-error { margin: 8px 14px; }
.xchat-drawer .xchat-status { padding: 0 18px; }
.xchat-drawer .xchat-messages { padding: 22px 18px; }
.xchat-drawer .xchat-message { max-width: 90%; }
.xchat-drawer .xchat-compose { padding: 14px 18px max(16px, env(safe-area-inset-bottom)); }
.xchat-guest-form { overflow-y: auto; }
.xchat-guest-form small { font-weight: 400; }
.xchat-history-heading { gap: 12px; padding-bottom: 22px; }
.xchat-history-heading p { color: var(--chat-muted); font-size: 13px; }
.xchat-history-heading button { margin-top: 6px; }
.xchat-honeypot { position: absolute !important; left: -10000px; }
.xchat-start-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 12px; border-bottom: 1px solid var(--chat-line); }
.xchat-start-modes button { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 9px 6px; border: 1px solid transparent; border-radius: 6px; background: #f5f6f3; color: var(--chat-muted); font-size: 12px; font-weight: 600; }
.xchat-start-modes button[aria-pressed=true] { border-color: var(--chat-accent); color: var(--chat-accent); background: #fff; }
.xchat-order-confirmation { display: flex; align-items: flex-start; gap: 12px; padding: 16px; background: #f2f7f4; border: 1px solid #d8e5dd; border-radius: 8px; overflow-wrap: anywhere; }
.xchat-order-confirmation > svg { color: var(--chat-accent); margin-top: 3px; }
.xchat-order-confirmation > div { min-width: 0; }
.xchat-order-confirmation small { color: var(--chat-muted); }
.xchat-order-confirmation h2 { margin: 3px 0 8px; font-size: 19px; }
.xchat-order-reference { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 5px; font-size: 11px; color: var(--chat-muted); overflow-wrap: anywhere; }
.xchat-order-reference svg { width: 13px; height: 13px; }
.xchat-app-page { margin: 0; background: #f5f6f3; }
.xchat-staff { height: min(100dvh, var(--chat-viewport-height, 100dvh)); display: flex; flex-direction: column; }
.xchat-staff { padding: var(--chat-safe-top) var(--chat-safe-right) 0 var(--chat-safe-left); }
.xchat-app-header { min-height: 83px; padding: 16px 26px; gap: 32px; }
.xchat-staff .xchat-brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.xchat-brand img { width: 40px; height: 40px; object-fit: contain; padding: 4px; border: 1px solid var(--chat-line); border-radius: 7px; }
.xchat-brand .xchat-brand-name { font-size: 10px; font-weight: 500; color: #828b83; margin-bottom: 2px; }
.xchat-app-header > .xchat-connection { padding-left: 24px; border-left: 1px solid var(--chat-line); }
.xchat-staff-profile { display: flex; align-items: center; gap: 10px; padding-left: 20px; margin-left: 16px; border-left: 1px solid var(--chat-line); }
.xchat-staff-profile strong { font-size: 12px; font-weight: 650; }
.xchat-staff-profile small { font-size: 10px; }
.xchat-staff-profile > span:last-child { max-width: 130px; }
.xchat-staff-profile .xchat-avatar { width: 35px; height: 35px; background: #252f28; color: #fff; font-size: 11px; }
.xchat-workspace { display: grid; grid-template-columns: 340px minmax(0, 1fr); flex: 1; min-height: 0; }
.xchat-inbox { display: flex; flex-direction: column; background: #f9faf7; border-right: 1px solid #e1e6dd; min-height: 0; overflow-y: auto; }
.xchat-inbox-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 27px 24px 20px; }
.xchat-inbox-heading small { font-size: 11px; }
.xchat-inbox-heading h2 { display: flex; align-items: center; gap: 10px; font-size: 23px; margin-top: 4px; font-weight: 650; }
.xchat-inbox-heading h2 span { display: inline-grid; place-items: center; min-width: 25px; height: 23px; padding: 0 6px; font-size: 11px; border: 1px solid #e0e6d8; border-radius: 6px; background: #eff3e9; color: #748066; font-weight: 600; }
.xchat-inbox-heading > svg { width: 22px; height: 22px; color: #a2ad99; }
.xchat-search { padding: 0 20px 15px; display: grid; gap: 12px; }
.xchat-search-field { display: flex; align-items: center; min-width: 0; background: #fff; border: 1px solid #dfe5da; border-radius: 7px; }
.xchat .xchat-search-field input { border: 0; background: transparent; padding-right: 0; font-size: 12px; box-shadow: none; }
.xchat-search-field:focus-within { outline: 2px solid color-mix(in srgb, var(--chat-accent) 20%, transparent); }
.xchat-search-field .xchat-icon { width: 36px; height: 36px; margin-right: 3px; }
.xchat-filters summary { display: flex; align-items: center; gap: 8px; list-style: none; cursor: pointer; font-size: 12px; color: #65715f; padding: 5px 2px; }
.xchat-filters summary::-webkit-details-marker { display: none; }
.xchat-filters summary svg { width: 15px; height: 15px; }
.xchat-filters summary svg:last-child { margin-left: auto; }
.xchat-filters[open] summary svg:last-child { transform: rotate(180deg); }
.xchat-filter-fields { display: grid; gap: 12px; padding-top: 14px; }
.xchat-dates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.xchat-dates .xchat-input { font-size: 11px; }
.xchat-dates input { padding-inline: 7px !important; font-size: 12px; }
.xchat-list-label { font-size: 11px; color: #828b7c; padding: 12px 24px 10px; border-top: 1px solid #e6ebe1; }
.xchat-inbox [data-chat-list] { padding: 0 12px 16px; }
.xchat-inbox .xchat-pager { margin-top: auto; border-top: 1px solid #e6ebe1; background: #f9faf7; padding-bottom: max(12px, env(safe-area-inset-bottom)); }
.xchat-thread { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.xchat-thread-header { min-height: 94px; justify-content: space-between; }
.xchat-contact { display: flex; align-items: center; gap: 13px; min-width: 0; }
.xchat-contact > div { min-width: 0; }
.xchat-contact strong { font-size: 15px; font-weight: 650; }
.xchat-contact .xchat-contact-details { display: flex; flex-wrap: wrap; gap: 4px 15px; margin-top: 3px; font-size: 11px; }
.xchat-contact-details span { display: flex; align-items: center; gap: 5px; min-width: 0; overflow-wrap: anywhere; }
.xchat-contact-details svg { width: 12px; height: 12px; }
.xchat-state { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: #577747; background: #f1f6ea; border-radius: 6px; padding: 5px 9px; flex-shrink: 0; }
.xchat-state::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.xchat-state[data-closed=true] { color: #727b73; background: #f2f4f0; }
.xchat-thread-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 8px 24px; border-bottom: 1px solid var(--chat-line); background: #fff; flex-shrink: 0; }
.xchat-thread-controls .xchat-button { font-size: 12px; min-height: 34px; padding: 6px 11px; border-color: #dce3d9; }
.xchat-thread-controls svg { width: 14px; height: 14px; }
.xchat-thread-controls .xchat-check { font-size: 11px; gap: 6px; color: #6b7568; }
.xchat-retention { display: flex; gap: 6px; align-items: center; margin-left: auto; font-size: 10px !important; }
.xchat-thread > .xchat-messages { padding: 28px max(28px, calc((100% - 820px) / 2)); }
.xchat-thread > .xchat-compose { padding: 16px max(28px, calc((100% - 820px) / 2)) 22px; }
.xchat-login { width: min(430px, calc(100% - 32px)); margin: auto; background: #fff; border: 1px solid #dfe5da; border-top: 3px solid var(--chat-accent); border-radius: 8px; padding: 32px; box-shadow: 0 20px 70px #263a2310; }
.xchat-login-brand { display: flex; align-items: center; gap: 12px; padding-bottom: 26px; margin-bottom: 26px; border-bottom: 1px solid var(--chat-line); }
.xchat-login-brand strong, .xchat-login-brand small { display: block; }
.xchat-login-brand strong { font-size: 13px; font-weight: 650; }
.xchat-login-brand small { font-size: 11px; }
.xchat-login img { width: 42px; height: 42px; object-fit: contain; }
.xchat-login form { display: grid; gap: 19px; }
.xchat-login-heading h1 { font-size: 26px; font-weight: 650; margin-bottom: 8px; }
.xchat-login-heading p { font-size: 13px; color: var(--chat-muted); }
.xchat-login .xchat-check { font-size: 12px; }
.xchat-login .primary { justify-content: space-between; min-height: 47px; }
.xchat-login-footer { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 25px; font-size: 11px; color: #86907e; }
.xchat-login-footer svg { width: 13px; height: 13px; }
.xchat-staff > .xchat-error { margin: 8px 16px; }
.xchat-back { display: none; }
.xchat-settings { max-width: 940px; }
.xchat-settings-grid { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 30px; }
.xchat-settings fieldset { margin: 0 0 24px; padding: 0 0 24px; border: 0; border-bottom: 1px solid var(--chat-line); display: grid; gap: 16px; }
.xchat-settings legend { font-size: 17px; font-weight: 650; padding-bottom: 16px; }
.xchat-color-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.xchat-color-row input { width: 52px; height: 36px; border: 1px solid #ccd8d4; border-radius: 5px; padding: 3px; }
.xchat-preview { border: 1px solid #dce5e2; border-radius: 8px; overflow: hidden; height: fit-content; }
.xchat-preview .xchat-header { background: var(--chat-header-bg, #202e2a); color: var(--chat-header-text, #fff); border-top: 3px solid var(--chat-accent); }
.xchat-preview .xchat-message { min-width: 0; max-width: 100%; }
@media (max-width: 1100px) {
  .xchat-staff-profile { padding-left: 12px; margin-left: 6px; }
  .xchat-staff-profile > span:last-child { display: none; }
  .xchat-app-header { gap: 22px; }
  .xchat-workspace { grid-template-columns: 310px minmax(0, 1fr); }
  .xchat-thread-header { flex-wrap: wrap; gap: 10px; }
  .xchat-retention { margin-left: 0; }
}
@media (max-width: 720px) {
  .xchat input:not([type=checkbox]):not([type=color]), .xchat textarea, .xchat select { font-size: 16px; }
  .xchat-launcher { width: 28px; height: 140px; padding: 12px 0; right: 0; top: calc(50% - 70px); bottom: auto; border: 1px solid #ffffff70; border-right: 0; border-radius: 7px 0 0 7px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; touch-action: none; }
  .xchat-launcher > span { display: inline; writing-mode: vertical-rl; white-space: nowrap; font-size: 12px; font-weight: 600; }
  .xchat-launcher svg { width: 17px; height: 17px; }
  .xchat-launcher[data-side=left] { right: auto; left: 0; border-right: 1px solid #ffffff70; border-left: 0; border-radius: 0 7px 7px 0; }
  .xchat-drawer { width: min(430px, 100%); }
  .xchat-header { padding: 14px 16px; gap: 10px; }
  .xchat-header h1, .xchat-header h2 { font-size: 18px; }
  .xchat-app-header { min-height: 72px; gap: 10px; flex-wrap: wrap; }
  .xchat-app-header .xchat-brand img { width: 33px; height: 33px; }
  .xchat-app-header .xchat-brand-name { font-size: 9px; }
  .xchat-app-header > .xchat-connection { order: 3; width: 100%; padding: 0; border: 0; font-size: 10px; margin-top: -2px; }
  .xchat-header-actions { gap: 1px; }
  .xchat-header-actions .xchat-icon { width: 40px; height: 42px; }
  .xchat-staff-profile { display: none; }
  .xchat-workspace { grid-template-columns: minmax(0, 1fr); }
  .xchat-thread { display: none; }
  .xchat-staff.has-thread .xchat-inbox { display: none; }
  .xchat-staff.has-thread .xchat-thread { display: flex; }
  .xchat-back { display: grid; width: 40px; }
  .xchat-thread-header { justify-content: flex-start; flex-wrap: nowrap; min-height: 84px; }
  .xchat-thread-header .xchat-avatar, .xchat-thread-header .xchat-state { display: none; }
  .xchat-contact-details { gap: 2px 12px !important; }
  .xchat-thread-controls { padding: 8px 16px; gap: 8px 12px; }
  .xchat-thread-controls .xchat-check > svg { display: none; }
  .xchat-thread > .xchat-messages { padding: 20px 16px; }
  .xchat-thread > .xchat-compose { padding: 12px 16px max(16px, env(safe-area-inset-bottom)); }
  .xchat-message { max-width: 90%; padding: 12px 14px 8px; }
  .xchat-message p { font-size: 14px; }
  .xchat-customer-header { padding: 20px 18px; gap: 10px; }
  .xchat-customer-header .xchat-icon { width: 40px; height: 42px; }
  .xchat-message-actions button { width: 40px; height: 38px; }
  .xchat-channel-bar { padding: 9px 20px; }
  .xchat-form { padding: 24px 22px; }
  .xchat-settings-grid { grid-template-columns: minmax(0, 1fr); }
  .xchat-settings .xchat-preview { display: none; }
  .xchat-hide-mobile { display: none; }
  .xchat-inbox-heading { padding-top: 24px; }
}
@media (max-width: 360px) {
  .xchat-staff .xchat-brand { gap: 8px; }
  .xchat-app-header { padding-inline: 12px; }
  .xchat-app-header .xchat-brand img { display: none; }
  .xchat-customer-header .xchat-brand-mark { width: 32px; height: 32px; padding: 4px; }
  .xchat-customer-header { gap: 8px; padding-inline: 12px; }
  .xchat-form { padding-inline: 18px; }
  .xchat-dates { grid-template-columns: minmax(0, 1fr); }
}
.xchat[data-compact=true] .xchat-app-header { min-height: 56px; padding-block: 8px; }
.xchat[data-compact=true] .xchat-app-header > .xchat-connection, .xchat[data-compact=true] .xchat-app-header .xchat-brand-name { display: none; }
.xchat[data-compact=true] .xchat-thread-header { min-height: 60px; padding-block: 8px; }
.xchat[data-compact=true] .xchat-thread-controls { padding-block: 4px; }
.xchat[data-compact=true] .xchat-retention { display: none; }
.xchat[data-compact=true] .xchat-thread > .xchat-compose, .xchat[data-compact=true] .xchat-drawer .xchat-compose { padding-block: 8px; }
.xchat[data-compact=true] .xchat-customer-header { padding-block: 12px; }
.xchat[data-compact=true] .xchat-channel-bar { padding-block: 5px; }
.xchat[data-compact=true] .xchat-login { margin-block: 16px; padding: 22px; }
.xchat[data-compact=true] .xchat-login-brand { margin-bottom: 16px; padding-bottom: 16px; }
@media (prefers-reduced-motion: no-preference) {
  .xchat-drawer[open] { animation: xchat-enter .2s ease-out; }
  @keyframes xchat-enter { from { opacity: 0; transform: translateX(var(--chat-enter-x, 24px)); } to { opacity: 1; transform: translateX(0); } }
}
@media (prefers-reduced-motion: reduce) {
  .xchat *, .xchat *::before, .xchat *::after { transition: none !important; animation: none !important; }
}
