/* Giao diện chủ yếu dùng class Tailwind (CDN). File này chỉ giữ phần Tailwind không tiện làm. */

[hidden] { display: none !important; }

/* Cỡ chữ Tailwind giảm 2px so với mặc định */
:root {
  --text-xs: 10px;
  --text-sm: 12px;
  --text-base: 14px;
  --text-lg: 16px;
  --text-xl: 18px;
  --text-2xl: 22px;
}

html, body { height: 100%; -webkit-text-size-adjust: 100%; }
body { font-size: 14px; font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }

/* iOS: font-size >= 16px để Safari không tự zoom khi focus */
input, select, textarea { font-size: 16px; }

/* iPhone: chừa tai thỏ và thanh home */
.safe-area { padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left); }
.safe-bottom { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }

/* Điện thoại: mỗi lúc chỉ một màn (danh sách nhóm hoặc nội dung chat) */
@media (max-width: 767px) {
  .chat { display: none; }
  body.show-chat .sidebar { display: none; }
  body.show-chat .chat { display: flex; }
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(96px + env(safe-area-inset-bottom));
  transform: translate(-50%, 8px);
  background: rgba(15, 23, 42, .92);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, .25);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 50;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
