/* TransMemo support widget — floating customer-service component.
   Usage: <link rel="stylesheet" href="support-widget.css">
          <script src="support-widget.js"></script>
   Brand: deep navy #0A1A2F / sky blue #38BDF8 / teal #2DD4BF.
   Languages: 简体中文 + English (follows <html lang> or window.ECSW_LANG). */

#ecsw-root { position: fixed; right: 20px; bottom: 20px; z-index: 2147483647;
  font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif; }

#ecsw-fab { width: 60px; height: 60px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, #7DD3FC, #38BDF8); color: #0A1A2F;
  box-shadow: 0 8px 24px rgba(56,189,248,.35); display: flex; align-items: center; justify-content: center;
  transition: transform .2s ease; }
#ecsw-fab:hover { transform: scale(1.06); }
#ecsw-fab svg { width: 28px; height: 28px; }

#ecsw-panel { position: fixed; right: 20px; bottom: 92px; width: 360px; max-width: calc(100vw - 40px);
  max-height: 520px; display: none; flex-direction: column; overflow: hidden;
  background: #0E1B30; border: 1px solid #22334A; border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0,0,0,.5); color: #EDF4FF; }
#ecsw-panel.ecsw-open { display: flex; }

#ecsw-head { padding: 14px 16px; background: linear-gradient(180deg,#12233C,#0E1B30);
  border-bottom: 1px solid #22334A; display: flex; align-items: center; justify-content: space-between; }
#ecsw-head .ecsw-title { font-weight: 700; font-size: 15px; }
#ecsw-head .ecsw-title .ecsw-gold { color: #38BDF8; }
#ecsw-close { background: none; border: none; color: #92A5BD; font-size: 20px; cursor: pointer; line-height: 1; }
#ecsw-close:hover { color: #EDF4FF; }

#ecsw-tabs { display: flex; border-bottom: 1px solid #22334A; }
#ecsw-tabs button { flex: 1; padding: 10px; background: none; border: none; cursor: pointer;
  color: #92A5BD; font-size: 14px; font-weight: 600; border-bottom: 2px solid transparent; }
#ecsw-tabs button.ecsw-active { color: #38BDF8; border-bottom-color: #38BDF8; }

#ecsw-body { padding: 16px; overflow-y: auto; min-height: 220px; max-height: 340px; font-size: 14px; line-height: 1.6; }
#ecsw-body .ecsw-muted { color: #92A5BD; font-size: 13px; }

.ecsw-mailbtn { display: block; width: 100%; margin-top: 14px; padding: 12px; border: none; border-radius: 10px;
  background: linear-gradient(135deg, #7DD3FC, #38BDF8); color: #0A1A2F; font-weight: 700; font-size: 15px;
  cursor: pointer; text-align: center; text-decoration: none; }
.ecsw-mailbtn:hover { filter: brightness(1.06); }
.ecsw-mailaddr { margin-top: 10px; text-align: center; color: #2DD4BF; font-size: 13px; word-break: break-all; }

#ecsw-chat { display: none; flex-direction: column; }
#ecsw-msgs { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.ecsw-msg { max-width: 85%; padding: 9px 12px; border-radius: 12px; font-size: 13.5px; line-height: 1.55; }
.ecsw-msg.ecsw-bot { background: #14253B; color: #EDF4FF; align-self: flex-start; border: 1px solid #22334A; }
.ecsw-msg.ecsw-user { background: #2DD4BF; color: #0A1A2F; align-self: flex-end; font-weight: 500; }
.ecsw-msg .ecsw-tag { display: block; font-size: 11px; color: #92A5BD; margin-bottom: 3px; }
.ecsw-msg.ecsw-user .ecsw-tag { color: #0A1A2F; opacity: .6; }
.ecsw-fallbackbtn { display: inline-block; margin-top: 8px; padding: 7px 12px; border-radius: 8px;
  background: linear-gradient(135deg, #7DD3FC, #38BDF8); color: #0A1A2F; font-weight: 700; font-size: 13px;
  text-decoration: none; }
#ecsw-faqs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
#ecsw-faqs button { padding: 6px 10px; border-radius: 16px; border: 1px solid #2DD4BF; background: none;
  color: #2DD4BF; font-size: 12.5px; cursor: pointer; }
#ecsw-faqs button:hover { background: rgba(45,212,191,.12); }
#ecsw-inputrow { display: flex; gap: 8px; padding: 0 16px 14px; }
#ecsw-input { flex: 1; padding: 10px 12px; border-radius: 10px; border: 1px solid #22334A;
  background: #0A1A2F; color: #EDF4FF; font-size: 14px; outline: none; }
#ecsw-input:focus { border-color: #2DD4BF; }
#ecsw-send { padding: 10px 16px; border: none; border-radius: 10px; cursor: pointer;
  background: linear-gradient(135deg, #7DD3FC, #38BDF8); color: #0A1A2F; font-weight: 700; font-size: 14px; }
.ecsw-typing { color: #92A5BD; font-size: 12.5px; font-style: italic; }

@media (max-width: 480px) {
  #ecsw-root { right: 14px; bottom: 14px; }
  #ecsw-panel { right: 14px; bottom: 86px; }
}
