.live-chat-widget,
.live-chat-inbox,
.live-chat-notifier {
  --chat-ink: #102a43;
  --chat-blue: #075fa7;
  --chat-gold: #f8bd49;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  color: var(--chat-ink);
  letter-spacing: 0;
  text-transform: none;
}

.live-chat-widget [hidden],
.live-chat-inbox [hidden],
.live-chat-notifier[hidden] { display: none !important; }
.live-chat-widget { position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 1040; }
body:has(.live-chat-widget, .live-chat-notifier) #toTop {
  left: 20px;
  right: auto;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
}
body:has(.live-chat-panel:not([hidden]), .live-chat-notifier:not([hidden])) #toTop {
  visibility: hidden;
  pointer-events: none;
  transition: none;
}
body .live-chat-widget button,
body .live-chat-inbox button {
  min-height: 44px;
  border: 0;
  border-radius: 5px;
  padding: 10px 14px;
  background: var(--chat-blue);
  color: #fff;
  font: inherit;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
}

body .live-chat-widget .live-chat-launcher {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #102a43;
  border: 1px solid #5794c5;
  box-shadow: 0 5px 24px #102a4333;
}
.live-chat-launcher i { color: var(--chat-gold); font-size: 22px; }
.live-chat-badge { display: inline-flex; padding: 2px 6px; border-radius: 4px; color: #102a43; background: var(--chat-gold); font-size: 12px; }
.live-chat-panel { position: absolute; right: 0; bottom: 60px; width: 350px; max-height: min(620px, calc(100dvh - 100px)); overflow-y: auto; border: 1px solid #aac1d5; border-radius: 8px; background: #fff; box-shadow: 0 10px 40px #102a4333; }
.live-chat-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: #102a43; color: #fff; }
.live-chat-header small { display: block; color: #c2d8e9; font-size: 12px; }
body .live-chat-header .live-chat-close { width: 44px; background: transparent; color: #fff; font-size: 24px; padding: 0; }
.live-chat-status { margin: 12px 16px 8px; font-size: 13px; color: #37546b; line-height: 1.5; }
.live-chat-status.is-error { color: #a62323; }
.live-chat-start,
.live-chat-compose { display: grid; gap: 8px; padding: 12px 16px; margin: 0; }
.live-chat-start label,
.live-chat-compose label { margin: 0; font-weight: 600; font-size: 13px; }
body .live-chat-widget input,
body .live-chat-widget textarea,
body .live-chat-inbox textarea { width: 100%; min-height: 44px; padding: 9px 11px; margin: 0; border: 1px solid #9cb5c9; border-radius: 4px; background: #fff; color: #102a43; font-size: 16px; line-height: 1.5; letter-spacing: 0; text-align: left; text-transform: none; }
.live-chat-messages { height: 210px; overflow-y: auto; padding: 12px 16px; border-block: 1px solid #dde6ed; background: #f5f8fc; overscroll-behavior: contain; }
.live-chat-message { max-width: 90%; margin: 0 0 12px; padding: 10px 12px; border: 1px solid #dae4ed; border-radius: 6px; background: #fff; overflow-wrap: anywhere; }
.live-chat-message.is-own { margin-left: auto; background: #e3effa; border-color: #c3d9ec; }
.live-chat-message p { margin: 4px 0; white-space: pre-wrap; line-height: 1.5; color: #102a43; font-size: 14px; }
.live-chat-message small { font-size: 10px; color: #536e83; }
.live-chat-message strong { font-size: 12px; color: #174567; }
.live-chat-phone { display: block; margin: 8px 16px 14px; color: #075fa7; font-size: 13px; }
.live-chat-retry { margin: 8px 16px 12px; }
.live-chat-inbox { display: grid; grid-template-columns: 280px minmax(0, 1fr); margin-top: 20px; border: 1px solid #c6d8e7; border-radius: 8px; overflow: hidden; background: #fff; }
.live-chat-conversations { border-right: 1px solid #d8e3ec; max-height: 700px; overflow-y: auto; background: #f7faff; }
body.portal-studio .live-chat-inbox h2 { padding: 16px; margin: 0; color: #102a43; font: 600 18px ui-monospace, "SFMono-Regular", Consolas, monospace; }
.live-chat-empty { padding: 16px; font-size: 13px; }
.live-chat-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; padding: 12px; font-size: 12px; }
body .live-chat-inbox .live-chat-thread-option { display: block; width: 100%; text-align: left; border-radius: 0; padding: 14px 16px; border-bottom: 1px solid #dde6ee; color: #102a43; background: transparent; }
body .live-chat-inbox .live-chat-thread-option.is-selected { border-left: 3px solid #075fa7; background: #e0eefb; padding-left: 13px; }
.live-chat-thread-option strong { display: block; overflow-wrap: anywhere; }
.live-chat-thread-option small { display: block; margin-top: 5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #496b84; font-weight: 400; }
.live-chat-admin-thread { min-width: 0; }
.live-chat-admin-thread .live-chat-messages { height: 360px; }
.live-chat-notifier { position: fixed; right: 20px; bottom: 20px; z-index: 1040; max-width: min(350px, calc(100vw - 32px)); padding: 14px 18px; border: 1px solid #b78526; border-radius: 5px; background: #fff3d7; box-shadow: 0 5px 20px #102a4322; }
.live-chat-notifier a { display: block; color: #102a43; font-weight: 600; }
.live-chat-notifier .live-chat-status { margin: 0; }
.live-chat-widget :focus-visible,
.live-chat-inbox :focus-visible { outline: 3px solid #f4b841; outline-offset: 2px; }
.live-chat-widget button:disabled,
.live-chat-inbox button:disabled { opacity: .6; cursor: wait; }
@media (max-width: 700px) {
  .live-chat-inbox { grid-template-columns: minmax(0, 1fr); }
  .live-chat-conversations { max-height: 230px; border-right: 0; border-bottom: 1px solid #d8e3ec; }
  .live-chat-admin-thread .live-chat-messages { height: 300px; }
  .live-chat-widget { right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  body:has(.live-chat-widget, .live-chat-notifier) #toTop { left: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .live-chat-panel { width: min(350px, calc(100vw - 24px)); max-height: calc(100dvh - 88px); }
  body .live-chat-widget .live-chat-launcher { min-width: 44px; }
}
