#bdshop-support-chat-root {
  --sc-primary: #083862;
  --sc-primary-dark: #0f5bb8;
  --sc-bg: #ffffff;
  --sc-muted: #64748b;
  --sc-border: #e2e8f0;
  font-family: 'Onest', ui-sans-serif, system-ui, sans-serif;
  position: relative;
  z-index: 99990;
  max-width: 100%;
  overflow-x: hidden;
}

#bdshop-support-chat-root *,
#bdshop-support-chat-root *::before,
#bdshop-support-chat-root *::after {
  box-sizing: border-box;
}

#bdshop-support-chat-root [hidden] {
  display: none !important;
}

#bdshop-support-chat-root.is-open #bdshop-support-chat-launcher {
  display: none !important;
}

#bdshop-support-chat-root button,
#bdshop-support-chat-root input,
#bdshop-support-chat-root textarea {
  font-family: inherit;
  line-height: normal;
}

#bdshop-support-chat-root button {
  appearance: none;
  -webkit-appearance: none;
}

#bdshop-support-chat-launcher {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 99990;
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--sc-primary), var(--sc-primary-dark));
  color: #fff;
  box-shadow: 0 10px 30px rgba(8, 56, 98, 0.35);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#bdshop-support-chat-launcher:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(8, 56, 98, 0.45);
}

#bdshop-support-chat-panel {
  position: fixed;
  right: 20px;
  bottom: 88px;
  z-index: 99991;
  width: min(380px, calc(100vw - 24px));
  max-width: calc(100% - 24px);
  height: min(560px, calc(100vh - 120px));
  background: var(--sc-bg);
  border: 1px solid var(--sc-border);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
  display: none;
  flex-direction: column;
  overflow: hidden;
}

#bdshop-support-chat-panel.open {
  display: flex;
}

#bdshop-support-chat-panel.sc-compact {
  height: auto;
}

#bdshop-support-chat-panel.sc-compact .sc-body {
  flex: 0 1 auto;
  overflow: visible;
}

.sc-header {
  background: linear-gradient(135deg, var(--sc-primary), var(--sc-primary-dark));
  color: #fff;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sc-header-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.sc-header-text {
  min-width: 0;
  flex: 1;
}

.sc-header-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.sc-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 0 1 auto;
}

.sc-header p {
  margin: 2px 0 0;
  font-size: 12px;
  opacity: 0.9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sc-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.sc-call-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  text-decoration: none;
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.15s ease;
  margin-top: 1px;
  padding: 0;
}

.sc-call-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.sc-call-btn.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.sc-call-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 14px;
  background: #ecfdf5;
  border-bottom: 1px solid #bbf7d0;
  color: #065f46;
  font-size: 12px;
}

.sc-call-bar-actions {
  display: flex;
  gap: 6px;
}

.sc-call-bar-actions button {
  border: none;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.sc-call-accept {
  background: #16a34a;
  color: #fff;
}

.sc-call-decline,
.sc-call-end {
  background: #ef4444;
  color: #fff;
}

.sc-call-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.45);
}

.sc-call-overlay[hidden] {
  display: none !important;
}

.sc-call-overlay-card {
  position: relative;
  width: min(100%, 20rem);
  border-radius: 18px;
  background: #fff;
  padding: 24px 20px 20px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
}

.sc-call-overlay-pulse {
  width: 72px;
  height: 72px;
  margin: 0 auto 14px;
  border-radius: 999px;
  background: #d1fae5;
  position: relative;
}

.sc-call-overlay-pulse::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: inherit;
  border: 2px solid rgba(16, 185, 129, 0.35);
  animation: sc-call-ping 1.4s ease-out infinite;
}

@keyframes sc-call-ping {
  0% { transform: scale(0.92); opacity: 1; }
  100% { transform: scale(1.2); opacity: 0; }
}

.sc-call-overlay-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
}

.sc-call-overlay-sub {
  margin: 6px 0 0;
  font-size: 13px;
  color: #047857;
}

.sc-call-overlay-pulse.is-live {
  background: #86efac;
}

.sc-call-overlay-pulse.is-live::after {
  border-color: rgba(34, 197, 94, 0.55);
  animation: sc-call-ping 1s ease-out infinite;
}

.sc-call-overlay-timer {
  margin: 10px 0 0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #047857;
  font-variant-numeric: tabular-nums;
}

.sc-call-overlay-timer[hidden] {
  display: none !important;
}

.sc-call-overlay-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.sc-call-overlay-actions button {
  flex: 1;
  border: none;
  border-radius: 12px;
  padding: 12px 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.sc-call-overlay-accept {
  background: #16a34a;
  color: #fff;
}

.sc-call-overlay-decline {
  background: #ef4444;
  color: #fff;
}

.sc-header-agent-avatar {
  flex-shrink: 0;
}

.sc-agent-avatar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
}

.sc-agent-avatar-md {
  width: 38px;
  height: 38px;
  font-size: 13px;
}

.sc-agent-avatar-sm {
  width: 28px;
  height: 28px;
  font-size: 10px;
}

.sc-agent-avatar-default {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.sc-agent-avatar .sc-status-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 2px solid var(--sc-primary-dark);
  background: #94a3b8;
}

.sc-agent-avatar .sc-status-dot.online {
  background: #22c55e;
}

.sc-close {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  cursor: pointer;
}

.sc-body {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 14px;
  background: #f8fafc;
}

.sc-loading {
  font-size: 13px;
  color: #64748b;
  text-align: center;
  padding: 24px 12px;
}

.sc-step-title {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  margin: 0 0 10px;
}

.sc-step-intro {
  font-size: 13px;
  color: var(--sc-muted);
  margin: 0 0 14px;
  line-height: 1.45;
}

.sc-dept-list {
  display: grid;
  gap: 8px;
}

.sc-dept-btn {
  text-align: left;
  border: 1px solid var(--sc-border);
  background: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
}

.sc-dept-btn:hover {
  border-color: #93c5fd;
  background: #eff6ff;
}

.sc-dept-btn strong {
  display: block;
  font-size: 13px;
  color: #0f172a;
}

.sc-dept-btn span {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--sc-muted);
}

.sc-field {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
}

.sc-field label {
  font-size: 12px;
  color: #334155;
  font-weight: 500;
}

.sc-field input,
.sc-field textarea,
.sc-field select {
  border: 1px solid var(--sc-border);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  width: 100%;
  max-width: 100%;
}

.sc-field select {
  background: #fff;
}

.sc-primary-btn {
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--sc-primary);
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}

.sc-primary-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.sc-messages {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

.sc-msg-row {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  max-width: 92%;
  min-width: 0;
}

.sc-msg-row.staff {
  align-self: flex-start;
}

.sc-msg-row .sc-agent-avatar {
  margin-bottom: 2px;
}

.sc-msg {
  max-width: 100%;
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.4;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.sc-msg.customer {
  align-self: flex-end;
  max-width: 85%;
  background: var(--sc-primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.sc-msg.staff,
.sc-msg.agent,
.sc-msg.system {
  align-self: flex-start;
  max-width: 100%;
  background: #fff;
  border: 1px solid var(--sc-border);
  color: #0f172a;
  border-bottom-left-radius: 4px;
}

.sc-msg time {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  opacity: 0.7;
}

.sc-auto-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #10b981;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.3;
  max-width: 100%;
}

.sc-auto-sparkle {
  flex-shrink: 0;
}

.sc-auto-badge-text {
  min-width: 0;
}

.sc-footer {
  display: none;
}

.sc-composer {
  display: none;
  flex-direction: column;
  flex-shrink: 0;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  border-top: 1px solid var(--sc-border);
  background: #fff;
}

#bdshop-support-chat-root .sc-composer.is-visible {
  display: flex !important;
}

.sc-input-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px 10px;
  background: #fff;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.sc-input-bar.is-recording #sc-message-input {
  opacity: 0.5;
  pointer-events: none;
}

.sc-input-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.sc-action-btn {
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.sc-action-btn:hover {
  background: #eff6ff;
  color: var(--sc-primary);
}

.sc-action-btn.recording {
  background: #fef2f2;
  color: #dc2626;
  animation: sc-pulse 1.2s ease-in-out infinite;
}

@keyframes sc-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

#bdshop-support-chat-root #sc-message-input {
  flex: 1;
  min-width: 0;
  width: 100%;
  border: 1px solid var(--sc-border);
  border-radius: 20px;
  padding: 9px 14px;
  font-size: 13px;
  margin: 0;
  background: #f8fafc;
}

#bdshop-support-chat-root #sc-message-input:focus {
  outline: none;
  border-color: #93c5fd;
  background: #fff;
}

#bdshop-support-chat-root .sc-send-btn {
  flex-shrink: 0;
  border: none;
  border-radius: 20px;
  padding: 0 16px;
  height: 36px;
  background: var(--sc-primary);
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

#bdshop-support-chat-root .sc-send-btn:hover {
  background: var(--sc-primary-dark);
}

.sc-toolbar {
  display: none;
}

.sc-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  margin-bottom: 10px;
}

.sc-status {
  font-size: 11px;
  color: var(--sc-muted);
  margin-bottom: 8px;
}

.sc-pending-preview {
  padding: 8px 10px 0;
}

.sc-pending-preview:not([hidden]) {
  display: block;
}

.sc-pending-image-wrap {
  width: 100%;
  margin-bottom: 4px;
}

.sc-pending-image-wrap .sc-pending-thumb {
  width: 100%;
  max-height: 120px;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  background: #e2e8f0;
}

.sc-pending-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--sc-border);
  border-radius: 8px;
  background: #f8fafc;
}

.sc-pending-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.sc-pending-name {
  flex: 1;
  font-size: 12px;
  color: #334155;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sc-pending-clear {
  border: none;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  font-size: 14px;
}

.sc-voice-bar {
  align-items: center;
  gap: 8px;
  padding: 8px 10px 0;
  font-size: 13px;
  color: #334155;
  background: #fef2f2;
  border-bottom: 1px solid #fecaca;
}

.sc-voice-bar:not([hidden]) {
  display: flex;
}

.sc-voice-bar #sc-voice-timer {
  flex: 1;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: #dc2626;
}

.sc-voice-cancel {
  color: #b91c1c !important;
}

.sc-voice-send {
  background: var(--sc-primary) !important;
  color: #fff !important;
  border-color: var(--sc-primary) !important;
}

.sc-voice-cancel,
.sc-voice-send {
  width: auto !important;
  min-width: 64px;
  height: 32px !important;
  padding: 0 12px !important;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--sc-border);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.sc-order-picker {
  padding: 8px 10px 0;
  flex-direction: column;
  gap: 6px;
}

.sc-order-picker:not([hidden]) {
  display: flex;
}

.sc-order-picker input {
  border: 1px solid var(--sc-border);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
}

.sc-order-list {
  max-height: 140px;
  overflow-y: auto;
  display: grid;
  gap: 4px;
}

.sc-order-empty {
  font-size: 12px;
  color: var(--sc-muted);
  margin: 4px 0;
}

.sc-img-attach {
  max-width: 100%;
  max-height: 200px;
  border-radius: 8px;
  display: block;
  cursor: pointer;
}

.sc-file-attach {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: inherit;
  text-decoration: none;
  font-weight: 500;
}

.sc-file-attach small {
  font-size: 10px;
  opacity: 0.75;
  font-weight: 400;
}

.sc-order-card {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sc-order-link,
.sc-order-id-link,
.sc-inline-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 600;
  font-size: 13px;
}

.sc-order-link:hover,
.sc-order-id-link:hover,
.sc-inline-link:hover {
  opacity: 0.85;
}

.sc-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  white-space: pre-wrap;
  word-break: break-word;
}

.sc-find-here-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  padding: 8px 14px;
  border-radius: 999px;
  border: none;
  background: #0f766e;
  color: #fff !important;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
  cursor: pointer;
}

.sc-msg.customer .sc-find-here-btn {
  background: rgba(255, 255, 255, 0.95);
  color: #0f766e !important;
}

.sc-find-here-btn:hover {
  filter: brightness(1.05);
  opacity: 1;
}

.sc-order-title {
  font-size: 13px;
}

.sc-order-id {
  font-size: 11px;
  opacity: 0.85;
}

.sc-order-meta {
  font-size: 11px;
  opacity: 0.85;
}

.sc-order-item {
  position: relative;
  text-align: left;
  border: 1px solid var(--sc-border);
  background: #fff;
  border-radius: 8px;
  padding: 8px 52px 8px 10px;
  cursor: pointer;
}

.sc-order-item em {
  display: block;
  margin-top: 1px;
  font-size: 10px;
  font-style: normal;
  color: var(--sc-muted);
}

.sc-order-item:hover {
  border-color: #93c5fd;
  background: #eff6ff;
}

.sc-order-item strong {
  display: block;
  font-size: 12px;
  color: #0f172a;
}

.sc-order-item span {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--sc-muted);
}

.sc-order-view {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  font-weight: 600;
  color: var(--sc-primary);
  text-decoration: none;
  padding: 4px 6px;
  border-radius: 6px;
  background: #eff6ff;
}

.sc-order-view:hover {
  background: #dbeafe;
}

.sc-product-picker {
  padding: 8px 10px 0;
  flex-direction: column;
  gap: 6px;
}

.sc-product-picker:not([hidden]) {
  display: flex;
}

.sc-product-picker input {
  border: 1px solid var(--sc-border);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
}

.sc-product-list {
  max-height: 160px;
  overflow-y: auto;
  display: grid;
  gap: 4px;
}

.sc-product-empty {
  font-size: 12px;
  color: var(--sc-muted);
  margin: 4px 0;
}

.sc-product-card {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  max-width: 100%;
  min-width: 0;
}

.sc-product-image-wrap {
  flex-shrink: 0;
}

.sc-product-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.sc-msg.customer .sc-product-thumb {
  border-color: var(--sc-border);
}

.sc-product-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.sc-product-link,
.sc-product-view {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 600;
  font-size: 13px;
}

.sc-product-link:hover,
.sc-product-view:hover {
  opacity: 0.85;
}

.sc-product-title {
  font-size: 13px;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.sc-product-meta,
.sc-product-desc {
  font-size: 11px;
  opacity: 0.85;
}

.sc-product-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sc-product-price {
  font-size: 12px;
  font-weight: 700;
}

.sc-product-regular-price {
  margin-left: 6px;
  font-size: 10px;
  font-weight: 400;
  opacity: 0.75;
}

.sc-product-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  padding: 8px 56px 8px 8px;
  border: 1px solid var(--sc-border);
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
}

.sc-product-item:hover {
  border-color: #93c5fd;
  background: #f8fbff;
}

.sc-product-item-thumb {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--sc-border);
}

.sc-product-item-text {
  min-width: 0;
  flex: 1;
}

.sc-product-item-text strong {
  display: block;
  font-size: 12px;
  line-height: 1.3;
}

.sc-product-item-text span {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--sc-muted);
}

.sc-product-item-current {
  border-color: #93c5fd;
  background: #eff6ff;
}

.sc-product-item-current strong {
  color: var(--sc-primary);
}

.sc-current-product {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 10px 8px;
  padding: 8px;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #eff6ff;
  min-width: 0;
  max-width: calc(100% - 20px);
  overflow: hidden;
}

.sc-current-product:not([hidden]) {
  display: flex;
}

.sc-current-product-thumb {
  flex-shrink: 0;
}

.sc-current-product-img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--sc-border);
}

.sc-current-product-text {
  min-width: 0;
  flex: 1;
}

.sc-current-product-label {
  display: block;
  font-size: 10px;
  color: var(--sc-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sc-current-product-text strong {
  display: block;
  font-size: 12px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sc-current-product-send {
  flex-shrink: 0;
  border: none;
  border-radius: 999px;
  background: var(--sc-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 7px 10px;
  cursor: pointer;
}

.sc-current-product-send:hover {
  opacity: 0.92;
}

.sc-voice-msg {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sc-voice-play {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.25);
  color: inherit;
  cursor: pointer;
  font-size: 11px;
  padding: 0;
}

.sc-msg.staff .sc-voice-play,
.sc-msg.agent .sc-voice-play {
  background: #eff6ff;
  color: var(--sc-primary);
}

.sc-voice-dur {
  font-size: 12px;
  opacity: 0.85;
}

.sc-voice-msg.unavailable {
  opacity: 0.7;
}

.sc-voice-unavail {
  font-size: 10px;
  opacity: 0.75;
  font-style: italic;
}

.sc-forward-pill {
  font-size: 11px;
  text-align: center;
  opacity: 0.9;
}

.sc-unavailable {
  font-size: 12px;
  opacity: 0.8;
  font-style: italic;
}

/* Isolate widget from global site / Tailwind overrides */
#bdshop-support-chat-root button {
  margin: 0;
  text-transform: none;
  letter-spacing: normal;
  line-height: normal;
}

#bdshop-support-chat-root input,
#bdshop-support-chat-root textarea,
#bdshop-support-chat-root select {
  margin: 0;
  max-width: 100%;
  appearance: none;
  -webkit-appearance: none;
}

#bdshop-support-chat-root img,
#bdshop-support-chat-root video,
#bdshop-support-chat-root audio {
  max-width: 100%;
}

#bdshop-support-chat-root input:focus,
#bdshop-support-chat-root textarea:focus,
#bdshop-support-chat-root select:focus {
  outline: none !important;
  box-shadow: none !important;
  --tw-ring-color: transparent !important;
}

#bdshop-support-chat-root #sc-message-input:focus {
  border-color: #93c5fd !important;
  background: #fff !important;
}

#bdshop-support-chat-launcher {
  background: linear-gradient(135deg, var(--sc-primary), var(--sc-primary-dark)) !important;
  color: #fff !important;
}

#bdshop-support-chat-root .sc-header {
  background: linear-gradient(135deg, var(--sc-primary), var(--sc-primary-dark)) !important;
}

#bdshop-support-chat-root .sc-primary-btn,
#bdshop-support-chat-root .sc-send-btn {
  background: var(--sc-primary) !important;
  color: #fff !important;
}

#bdshop-support-chat-root .sc-primary-btn:hover,
#bdshop-support-chat-root .sc-send-btn:hover {
  background: var(--sc-primary-dark) !important;
}

#bdshop-support-chat-root .sc-dept-btn {
  background: #fff !important;
  color: inherit !important;
}

#bdshop-support-chat-root .sc-dept-btn:hover {
  border-color: #93c5fd !important;
  background: #eff6ff !important;
}

#bdshop-support-chat-root .sc-msg.customer {
  background: var(--sc-primary) !important;
  color: #fff !important;
}

@media (max-width: 480px) {
  #bdshop-support-chat-launcher {
    right: 16px;
    bottom: max(16px, env(safe-area-inset-bottom, 0px));
  }

  #bdshop-support-chat-panel {
    left: 12px;
    right: 12px;
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    width: auto;
    max-width: none;
    height: min(560px, calc(100dvh - 100px));
  }

  body:has(#bdshop-support-chat-root.is-open) {
    overflow-x: hidden;
  }
}

/* Dedicated support chat page (/chat, /support-chat) */
body.support-chat-page {
  background: #f1f5f9;
}

.support-chat-page-main {
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.support-chat-page-shell {
  width: 100%;
  max-width: 580px;
  margin: 0 auto;
  padding: 1.5rem 1rem 2.5rem;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.support-chat-page-unavailable {
  text-align: center;
  padding: 3rem 1rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
}

.support-chat-page-unavailable h1 {
  margin: 0 0 0.75rem;
  font-size: 1.35rem;
  color: #0f172a;
}

.support-chat-page-unavailable p {
  margin: 0 0 1.25rem;
  color: #64748b;
  line-height: 1.5;
}

.support-chat-page-home-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1rem;
  border-radius: 10px;
  background: #083862;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
}

#bdshop-support-chat-root.sc-page-mode {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#bdshop-support-chat-root.sc-page-mode #bdshop-support-chat-launcher {
  display: none !important;
}

#bdshop-support-chat-root.sc-page-mode #bdshop-support-chat-panel {
  position: relative;
  right: auto;
  bottom: auto;
  display: flex !important;
  width: 100%;
  max-width: 100%;
  flex: 1 1 auto;
  height: min(720px, calc(100vh - 220px));
  min-height: 560px;
  margin: 0 auto;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
}

#bdshop-support-chat-root.sc-page-mode #bdshop-support-chat-panel.sc-compact {
  height: min(720px, calc(100vh - 220px));
  min-height: 560px;
}

#bdshop-support-chat-root.sc-page-mode #bdshop-support-chat-panel.sc-compact .sc-body {
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
}

#bdshop-support-chat-root.sc-page-mode .sc-close-page {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

#bdshop-support-chat-root.sc-page-mode .sc-close-icon {
  display: block;
}

@media (max-width: 767px) {
  body.support-chat-page {
    overflow: hidden;
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
    background: #fff;
  }

  body.support-chat-page > header,
  body.support-chat-page > footer,
  body.support-chat-page #back-to-top {
    display: none !important;
  }

  body.support-chat-page .support-chat-page-main {
    min-height: 100dvh;
    padding: 0;
    margin: 0;
    max-width: 100%;
    overflow-x: hidden;
  }

  body.support-chat-page .support-chat-page-shell {
    max-width: 100%;
    width: 100%;
    padding: 0;
    margin: 0;
    min-height: 100dvh;
    overflow-x: hidden;
  }

  #bdshop-support-chat-root.sc-page-mode {
    position: fixed;
    inset: 0;
    z-index: 99999;
    min-height: 100dvh;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  #bdshop-support-chat-root.sc-page-mode #bdshop-support-chat-panel {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100dvh;
    max-width: 100%;
    max-height: none;
    min-height: 100dvh;
    margin: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    overflow-x: hidden;
  }

  #bdshop-support-chat-root.sc-page-mode .sc-body {
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  #bdshop-support-chat-root.sc-page-mode .sc-input-bar {
    padding-bottom: max(10px, env(safe-area-inset-bottom, 0px));
  }
}

/* Support GPT async reply indicator */
.sc-awaiting-reply .sc-awaiting-bubble {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #475569;
  font-size: 13px;
  opacity: 0.95;
}
.sc-awaiting-dots {
  display: inline-flex;
  gap: 3px;
  align-items: center;
}
.sc-awaiting-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #64748b;
  display: inline-block;
  animation: sc-await-bounce 1.1s infinite ease-in-out;
}
.sc-awaiting-dots i:nth-child(2) { animation-delay: 0.15s; }
.sc-awaiting-dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes sc-await-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.45; }
  40% { transform: translateY(-3px); opacity: 1; }
}
