.workbench-container .customer-message-link,
.user-consultation .customer-message-link { color: #0369a1; text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.workbench-container .bg-sky-500 .customer-message-link,
.user-consultation .user-message .customer-message-link { color: inherit; }
.customer-message-link:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 2px; }
.customer-chat-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; font-size: 13px; }
.customer-chat-controls label { display: flex; align-items: center; gap: 8px; }
.customer-chat-controls select { padding: 6px 10px; color: #0f172a; background: #fff; border: 1px solid #cbd5e1; border-radius: 6px; }
.customer-chat-note { font-size: 12px; }
.customer-chat-button { appearance: none; cursor: pointer; border: 1px solid #cbd5e1; padding: 8px 12px; border-radius: 7px; color: #334155; background: #fff; font: inherit; }
.customer-chat-button:hover { background: #f0f9ff; }
.customer-chat-button:disabled { opacity: .5; cursor: not-allowed; }
.customer-chat-primary { color: #fff; background: #0284c7; border-color: #0284c7; }
.customer-chat-primary:hover { background: #0369a1; }
.customer-chat-danger { color: #be123c; }
.customer-chat-overlay { position: fixed; inset: 0; z-index: 3000; background: #0f172a66; display: flex; align-items: center; justify-content: center; padding: 12px; box-sizing: border-box; }
.customer-chat-dialog { width: min(620px, 100%); max-height: calc(var(--customer-viewport-height, 100dvh) - 24px); background: #fff; color: #0f172a; border-radius: 14px; box-shadow: 0 18px 60px #0f172a40; display: flex; flex-direction: column; overflow: hidden; font: 14px/1.5 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
.customer-chat-dialog *, .customer-chat-dialog *::before, .customer-chat-dialog *::after { box-sizing: border-box; }
.customer-chat-dialog-header, .customer-chat-dialog-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 18px; flex-shrink: 0; }
.customer-chat-dialog-header { border-bottom: 1px solid #e2e8f0; }
.customer-chat-dialog-header h2 { margin: 0; font-size: 18px; font-weight: 600; }
.customer-chat-dialog-header button { min-width: 36px; font-size: 20px; padding: 2px 8px; }
.customer-chat-dialog-body { padding: 16px 18px; overflow-y: auto; min-height: 0; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.customer-chat-dialog-footer { justify-content: flex-end; border-top: 1px solid #e2e8f0; }
.customer-chat-hint { margin: 0 0 10px; color: #64748b; font-size: 12px; }
.customer-chat-field { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; font-weight: 500; }
.customer-chat-dialog textarea, .customer-chat-dialog input, .customer-chat-dialog select { width: 100%; font: inherit; border: 1px solid #cbd5e1; border-radius: 7px; background: #fff; color: #0f172a; padding: 9px 10px; }
.customer-chat-dialog textarea { resize: vertical; min-height: 66px; }
.customer-chat-dialog input:focus, .customer-chat-dialog textarea:focus, .customer-chat-dialog select:focus { outline: 2px solid #7dd3fc; outline-offset: 1px; }
.customer-chat-section-title { margin: 22px 0 10px; font-size: 15px; font-weight: 600; }
.customer-chat-editor { border: 1px solid #e2e8f0; background: #f8fafc; padding: 12px; border-radius: 9px; margin-bottom: 12px; }
.customer-chat-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.customer-chat-row strong { white-space: nowrap; font-size: 12px; }
.customer-chat-row select { flex: 1; min-width: 0; }
.customer-chat-external { display: inline-flex; min-height: 36px; align-items: center; color: #0369a1; text-decoration: underline; }
.customer-chat-preview { max-width: 100%; max-height: 260px; object-fit: contain; display: block; margin: 8px auto; border-radius: 8px; }
.customer-chat-preview[hidden] { display: none; }
.customer-chat-error { flex-shrink: 0; color: #be123c; padding: 0 18px; white-space: pre-wrap; }
.customer-chat-error:empty { display: none; }
.customer-chat-picker { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.customer-chat-quick-item { text-align: left; white-space: pre-wrap; overflow-wrap: anywhere; padding: 12px; }
@media (max-width: 1024px) {
  .customer-chat-controls select, .customer-chat-controls .customer-chat-button, .customer-chat-dialog .customer-chat-button { min-height: 44px; }
  .customer-chat-controls .customer-chat-button { font-size: 13px !important; }
  .customer-chat-controls { gap: 8px; margin-top: 10px; }
  .customer-chat-note { flex-basis: 100%; }
  .customer-chat-note:empty { display: none; }
  .workbench-container .input-toolbar .customer-chat-quick-button { font-size: 13px; padding: 6px 10px; }
  .customer-chat-dialog textarea, .customer-chat-dialog input, .customer-chat-dialog select { font-size: 16px; }
  .customer-chat-overlay { top: var(--customer-viewport-top, 0px); bottom: auto; height: var(--customer-viewport-height, 100dvh); padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom)); }
  .customer-chat-dialog { max-height: 100%; }
  .customer-chat-dialog-header, .customer-chat-dialog-footer { padding: 10px 12px; }
  .customer-chat-dialog-body { padding: 12px; }
}
/* Member H5: keep keyboard resizing inside the chat, never scroll the document. */
html[data-member-chat-mobile], html[data-member-chat-mobile] body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}
html[data-member-chat-mobile] .user-consultation[data-v-6b283345] {
  position: fixed;
  top: var(--member-viewport-top, 0px);
  left: 0;
  width: 100%;
  height: var(--member-viewport-height, 100dvh);
  min-height: 0;
  overflow: hidden;
}
html[data-member-chat-mobile] .user-consultation .chat-container {
  width: 100%;
  max-width: none;
  height: 100%;
  min-height: 0;
  margin: 0;
  border-radius: 0;
}
html[data-member-chat-mobile] .user-consultation .cs-info-header,
html[data-member-chat-mobile] .user-consultation .message-input-container {
  flex-shrink: 0;
}
html[data-member-chat-mobile] .user-consultation .message-list {
  min-height: 0;
  overscroll-behavior-y: contain;
  overflow-anchor: none;
}
html[data-member-chat-mobile] .user-consultation .message-item { flex-shrink: 0; }
html[data-member-chat-mobile] .user-consultation .cs-info-header { padding-top: max(12px, env(safe-area-inset-top)); }
html[data-member-chat-mobile] .user-consultation .input-wrapper { align-items: flex-end; padding: 8px 0; gap: 8px; }
html[data-member-chat-mobile] .user-consultation .message-textarea {
  min-width: 0;
  min-height: 44px;
  max-height: 104px;
  box-sizing: border-box;
  font-size: 16px;
  line-height: 24px;
  overflow-y: auto;
}
html[data-member-chat-mobile] .user-consultation .send-button { min-height: 44px; }
html[data-member-chat-mobile] .user-consultation .message-input-container {
  padding: 6px max(12px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
}
html[data-member-keyboard="open"] .user-consultation .message-input-container { padding-bottom: 6px; }
