/* Customer chat view — WhatsApp-style (separate from the Tend staff look).
   All rules scoped under #customer-view so staff styles never leak in. */
#customer-view { position: fixed; inset: 0; background: #ECE5DD; z-index: 50; }
#customer-view .wa-shell { display: flex; flex-direction: column; height: 100%; max-width: 900px; margin: 0 auto; background: #ECE5DD; box-shadow: 0 0 24px rgba(0, 0, 0, 0.12); }
#customer-view .wa-head { display: flex; align-items: center; gap: 12px; background: #075E54; color: #fff; padding: 10px 16px; }
#customer-view .wa-head-main { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
#customer-view .wa-head-name { font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#customer-view .wa-logout { background: transparent; border: 1px solid rgba(255, 255, 255, 0.5); color: #fff; border-radius: 999px; height: 36px; padding: 0 16px; font-size: 13px; font-weight: 600; cursor: pointer; flex-shrink: 0; }
#customer-view .wa-logout:hover { background: rgba(255, 255, 255, 0.12); }
#customer-view .wa-msgs { flex: 1; overflow-y: auto; padding: 20px 16px; display: flex; flex-direction: column; gap: 6px; }
#customer-view .wa-loading { align-self: center; color: #667781; font-size: 14px; margin-top: 40px; }
#customer-view .wa-date { align-self: center; background: #FDF3C6; color: #54656F; font-size: 12px; padding: 6px 12px; border-radius: 8px; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08); margin: 8px 0; }
#customer-view .wa-row { display: flex; }
#customer-view .wa-row.mine { justify-content: flex-end; }
#customer-view .wa-row.theirs { justify-content: flex-start; }
#customer-view .wa-bubble { max-width: 75%; padding: 8px 12px 6px; border-radius: 12px; font-size: 15px; line-height: 1.45; color: #111B21; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.12); white-space: pre-wrap; word-break: break-word; }
#customer-view .wa-row.mine .wa-bubble { background: #DCF8C6; border-top-right-radius: 2px; }
#customer-view .wa-row.theirs .wa-bubble { background: #fff; border-top-left-radius: 2px; }
#customer-view .wa-meta { float: right; font-size: 11px; color: #667781; margin: 8px 0 0 12px; white-space: nowrap; }
#customer-view .wa-ticks { letter-spacing: -2px; }
#customer-view .wa-ticks.read { color: #53BDEB; }
#customer-view .wa-empty { align-self: center; text-align: center; color: #667781; font-size: 14px; margin-top: 40px; line-height: 1.6; }
#customer-view .wa-error { color: #D64545; font-size: 13px; text-align: center; padding: 6px 16px; margin: 0; background: #FDF0EF; }
#customer-view .wa-composer { display: flex; gap: 10px; align-items: center; padding: 10px 14px; background: #F0F2F5; }
#customer-view .wa-composer input { flex: 1; min-width: 0; height: 44px; border: 0; border-radius: 999px; padding: 0 16px; background: #fff; outline: none; font-size: 15px; color: #111B21; }
#customer-view .wa-send { width: 46px; height: 46px; border-radius: 50%; border: 0; background: #00A884; color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
#customer-view .wa-send:disabled { opacity: 0.55; cursor: default; }
#customer-view .wa-send svg { width: 22px; height: 22px; fill: #fff; }
@media (max-width: 560px) {
  #customer-view .wa-bubble { max-width: 85%; }
  #customer-view .wa-msgs { padding: 14px 10px; }
}

/* Customer message actions, voice bubbles, recorder bar, settings view. */
#customer-view .wa-bubble { position: relative; }
#customer-view .wa-action-btn { position: absolute; top: 0; right: 4px; border: 0; background: transparent; color: #8696A0; font-size: 16px; line-height: 1; padding: 2px 4px; cursor: pointer; opacity: 0; }
#customer-view .wa-row:hover .wa-action-btn, #customer-view .wa-action-btn:focus { opacity: 1; }
#customer-view .msg-menu { margin-top: 8px; background: #fff; border: 1px solid #E9EDEF; border-radius: 12px; padding: 6px; box-shadow: 0 4px 16px rgba(0,0,0,0.15); }
#customer-view .msg-menu-react { display: flex; gap: 2px; padding-bottom: 6px; margin-bottom: 6px; border-bottom: 1px solid #E9EDEF; }
#customer-view .msg-react-btn { border: 0; background: transparent; font-size: 20px; padding: 4px 6px; border-radius: 8px; cursor: pointer; }
#customer-view .msg-menu-item { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 8px 10px; font-size: 14px; font-weight: 600; color: #111B21; border-radius: 8px; cursor: pointer; }
#customer-view .msg-menu-item.danger { color: #cf4429; }
#customer-view .reaction-chips { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
#customer-view .reaction-chip { border: 1px solid #E9EDEF; background: #fff; border-radius: 999px; padding: 1px 8px; font-size: 13px; cursor: pointer; }
#customer-view .reaction-chip.mine { border-color: #00A884; background: #E7F7F1; }
#customer-view .wa-edited { font-size: 11px; color: #8696A0; font-style: italic; }
#customer-view .voice-bubble { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
#customer-view .voice-bubble audio { max-width: 220px; height: 36px; }
#customer-view .voice-dur { font-size: 12px; color: #8696A0; }
#customer-view .wa-edit-box { display: flex; gap: 6px; margin-top: 8px; }
#customer-view .wa-edit-box input { flex: 1; min-width: 0; border-radius: 8px; border: 1px solid #E9EDEF; padding: 6px 8px; font-size: 14px; }
#customer-view .wa-edit-box button { border: 0; border-radius: 8px; padding: 6px 10px; font-size: 13px; font-weight: 600; cursor: pointer; background: #E9EDEF; }
#customer-view .wa-edit-box .wa-edit-save { background: #00A884; color: #fff; }
#customer-view .wa-mic { width: 46px; height: 46px; border-radius: 50%; border: 0; background: #fff; color: #54656F; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
#customer-view .wa-mic svg { width: 22px; height: 22px; fill: currentColor; }
#customer-view .wa-attach { width: 46px; height: 46px; border-radius: 50%; border: 0; background: #fff; color: #54656F; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
#customer-view .wa-attach svg { width: 22px; height: 22px; fill: currentColor; }
#customer-view .wa-rec-bar { display: flex; gap: 10px; align-items: center; padding: 0 14px 12px; font-size: 13px; color: #54656F; background: #F0F2F5; }
#customer-view .wa-rec-bar[hidden] { display: none; }
#customer-view .wa-attach-bar { display: flex; gap: 10px; align-items: center; padding: 10px 14px; font-size: 13px; color: #54656F; background: #F0F2F5; }
#customer-view .wa-attach-bar[hidden] { display: none; }
#customer-view .wa-attach-name { max-width: 38%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex-shrink: 0; }
#customer-view .wa-attach-bar input[type="text"] { flex: 1; min-width: 0; height: 40px; border: 0; border-radius: 999px; padding: 0 14px; background: #fff; outline: none; font-size: 14px; color: #111B21; }
#customer-view .wa-attach-btn { border: 0; border-radius: 999px; padding: 8px 14px; background: #00A884; color: #fff; cursor: pointer; font-size: 13px; flex-shrink: 0; }
#customer-view #wa-attach-cancel { background: #fff; color: #54656F; }
#customer-view .media-unavailable { font-size: 13px; color: #8696A0; font-style: italic; margin-top: 6px; }
#customer-view .wa-rec-bar .rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #cf4429; flex: none; }
#customer-view .wa-rec-btn { border: 0; border-radius: 8px; padding: 6px 10px; font-size: 13px; font-weight: 600; cursor: pointer; background: #fff; }
#customer-view .wa-gear { width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,0.14); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
#customer-view .wa-gear svg { width: 20px; height: 20px; fill: #fff; }
#customer-view .wa-head-logo { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
#customer-view .wa-settings { padding: 20px; max-width: 480px; }
#customer-view .wa-settings h3 { margin: 0 0 16px; font-size: 20px; }
#customer-view .wa-settings .field-label { display: block; margin: 14px 0 4px; font-size: 13px; font-weight: 600; }
#customer-view .wa-settings input[type="text"], #customer-view .wa-settings input[type="password"] { width: 100%; box-sizing: border-box; height: 42px; border: 1px solid #E9EDEF; border-radius: 10px; padding: 0 12px; font-size: 15px; }
#customer-view .wa-set-avatar { display: block; width: 72px; height: 72px; border-radius: 50%; object-fit: cover; margin: 6px 0; }
#customer-view .wa-set-btn { margin-top: 10px; border: 0; border-radius: 10px; padding: 10px 16px; font-size: 14px; font-weight: 700; background: #00A884; color: #fff; cursor: pointer; }
#customer-view .wa-set-back { display: block; margin-top: 22px; border: 0; background: transparent; color: #00A884; font-size: 14px; font-weight: 700; cursor: pointer; }
