/* ZGroup Chat Pro UI 2.0 — Messenger Style (Light Theme) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

:root {
  --blue: #3fb8e8;
  --blue-light: #e8f8ff;
  --bubble-me: #d6f4ff;
  --bubble-other: #f5f6f7;
  --border: #e0e0e0;
  --text: #222;
  --radius: 16px;
  --shadow: 0 2px 6px rgba(0,0,0,0.08);
}

body, .zgcw-app {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  font-size: 14px;
}

/* --- Layout --- */
.zgcw-app {
  display: flex;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  max-width: 960px;
  margin: 30px auto;
  height: 600px;
}

/* --- Sidebar --- */
.zgcw-sidebar {
  width: 250px;
  background: var(--blue-light);
  border-right: 1px solid #d0ecf8;
  display: flex;
  flex-direction: column;
  padding: 12px;
}

.zgcw-search-inp {
  border: 1px solid #c2e6f3;
  border-radius: 8px;
  padding: 8px 10px;
  outline: none;
  margin-bottom: 10px;
}

.zgcw-room-item {
  padding: 8px 10px;
  border-radius: 8px;
  margin-bottom: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

.zgcw-room-item:hover { background: #d8f1fb; }
.zgcw-room-item.active { background: var(--blue); color: #fff; }

.zgcw-online {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid #d0ecf8;
}

.zgcw-online h4 { font-size: 13px; margin-bottom: 6px; font-weight: 600; }

/* --- Chat main --- */
.zgcw-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.zgcw-header {
  background: var(--blue-light);
  padding: 12px 16px;
  font-weight: 600;
  border-bottom: 1px solid #d0ecf8;
}

.zgcw-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scroll-behavior: smooth;
}

/* --- Bubble --- */
.zgcw-bubble {
  max-width: 70%;
  padding: 8px 12px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
  opacity: 0;
  transform: translateY(10px);
  animation: fadeUp 0.25s forwards;
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

.zgcw-bubble.me {
  align-self: flex-end;
  background: var(--bubble-me);
  border-bottom-right-radius: 4px;
}

.zgcw-bubble.other {
  align-self: flex-start;
  background: var(--bubble-other);
  border-bottom-left-radius: 4px;
}

.zgcw-bubble.temp { opacity: 0.6; }

/* --- Avatar --- */
.zgcw-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  margin-right: 8px;
  flex-shrink: 0;
}

/* --- Meta info --- */
.zgcw-bubble .meta {
  font-size: 11px;
  color: #666;
  margin-bottom: 4px;
}

.zgcw-bubble .who { font-weight: 500; margin-right: 4px; }

/* --- Input area --- */
.zgcw-input {
  display: flex;
  align-items: center;
  border-top: 1px solid var(--border);
  padding: 8px;
  background: #fff;
}

.zgcw-text {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 8px 14px;
  outline: none;
  resize: none;
  height: 38px;
  font-family: inherit;
  font-size: 14px;
  transition: border 0.2s;
}

.zgcw-text:focus { border-color: var(--blue); }

.zgcw-send {
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  margin-left: 8px;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transfo
  
/* === ADMIN MODAL === */
.zgcw-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.zgcw-modal-inner {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  width: 400px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  animation: popup 0.25s ease;
}

@keyframes popup {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.zgcw-rooms-list {
  max-height: 200px;
  overflow-y: auto;
  margin-bottom: 10px;
}

.zgcw-room-row {
  display: flex;
  gap: 5px;
  margin-bottom: 6px;
}
.zgcw-room-row input {
  flex: 1;
  padding: 5px;
}
.zgcw-room-row .del {
  background: #ff5f5f;
  color: #fff;
  border: none;
  padding: 4px 8px;
  cursor: pointer;
  border-radius: 4px;
}

.zgcw-room-add-btn,
.zgcw-save-rooms,
.zgcw-modal-close {
  background: #35b5e8;
  color: #fff;
  border: none;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  margin-right: 5px;
}
.zgcw-room-add-btn:hover,
.zgcw-save-rooms:hover,
.zgcw-modal-close:hover {
  background: #249ed2;
}
/* Ẩn avatar người dùng trong khung chat */
.zgcw-avatar {
  display: none !important;
}
