.chat-widget-mask {
  z-index: 1100;
}

.chat-widget-panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 72vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.18);
  overflow: hidden;
}

.chat-widget-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
  background: linear-gradient(135deg, #2563eb 0%, #38bdf8 100%);
  color: #fff;
}

.chat-widget-title {
  font-size: 16px;
  font-weight: 700;
}

.chat-widget-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.chat-widget-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px 8px;
  background: #f8fafc;
  min-height: 180px;
}

.chat-widget-tip {
  text-align: center;
  color: #94a3b8;
  font-size: 12px;
  margin-bottom: 10px;
}

.chat-widget-row {
  display: flex;
  margin-bottom: 10px;
}

.chat-widget-row.mine {
  justify-content: flex-end;
}

.chat-widget-bubble {
  max-width: 78%;
  padding: 10px 12px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  font-size: 14px;
  line-height: 1.5;
  color: #0f172a;
  word-break: break-word;
}

.chat-widget-row.mine .chat-widget-bubble {
  background: #dbeafe;
}

.chat-widget-time {
  margin-top: 4px;
  font-size: 11px;
  color: #94a3b8;
}

.chat-widget-form {
  display: flex;
  gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid #e2e8f0;
  background: #fff;
}

.chat-widget-input {
  flex: 1;
  height: 40px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 0 12px;
  font-size: 14px;
}

.chat-widget-send {
  min-width: 64px;
  height: 40px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563eb 0%, #38bdf8 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.chat-widget-send:disabled {
  opacity: 0.55;
}

.chat-widget-empty {
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
  padding: 24px 0;
}
