/* ============================================================
   WONA CHAT — chat.css
   Coomeet-style: full-screen remote video, floating controls
   ============================================================ */

/* Page reset for chat */
body.chat-body-page {
  margin: 0; padding: 0;
  overflow: hidden;
  height: 100vh;
  background: #000;
  font-family: 'Inter', sans-serif;
}

/* ── CHAT HEADER ─────────────────────────────────────────────── */
.chat-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 300;
  height: 50px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
}
.chat-header-inner {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0 18px;
  gap: 8px;
}

/* Logo overrides for white header */
.chat-header .logo-text { color: #111827; }
.chat-header .logo-icon  { font-size: 1.15rem; }

/* Tab nav */
.header-tabs-chat {
  display: flex;
  align-items: stretch;
  align-self: stretch;
  margin-left: 8px;
  gap: 0;
}
.chtab {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 18px;
  font-size: .83rem;
  font-weight: 600;
  color: #6b7280;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: all 150ms ease;
  position: relative;
}
.chtab:hover  { color: #111827; }
.chtab.active { color: #111827; border-bottom-color: #2563eb; }
.chtab-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #ef4444;
  color: #fff;
  font-size: .6rem; font-weight: 800;
}

/* Right area */
.chat-header-right {
  display: flex; align-items: center; gap: 6px;
  margin-left: auto;
}
.icon-btn-chat {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid #e5e7eb;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem;
  transition: all 150ms;
}
.icon-btn-chat:hover { background: #f3f4f6; color: #111827; }
.hdr-avatar-chat {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a855f7, #3b82f6);
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 800; color: #fff;
  text-decoration: none;
}
.hdr-login-btn {
  padding: 5px 14px;
  border-radius: 6px;
  background: #2563eb;
  color: #fff;
  font-size: .78rem; font-weight: 700;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(37,99,235,0.4);
}

/* ── MAIN VIDEO AREA ─────────────────────────────────────────── */
.vchat-main {
  position: fixed;
  top: 50px; left: 0; right: 0; bottom: 0;
  overflow: hidden;
  background: #0a0a0a;
}

/* Remote video fills everything */
.remote-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.remote-layer video {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

/* ── SEARCHING OVERLAY ───────────────────────────────────────── */
.searching-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #0d1117 0%, #131929 50%, #0a0f1e 100%);
}
.searching-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.search-ring {
  width: 60px; height: 60px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.1);
  border-top-color: #2563eb;
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.searching-label {
  font-size: .92rem;
  color: #94a3b8;
  margin: 0;
}
.searching-online {
  display: flex; align-items: center; gap: 7px;
  font-size: .82rem; font-weight: 700;
  color: #f8fafc;
}
.ticker-dot-c {
  width: 7px; height: 7px; border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e;
  animation: glow2 1.8s ease infinite;
  flex-shrink: 0;
}
@keyframes glow2 { 0%,100%{opacity:1;} 50%{opacity:.4;} }

/* ── DISCONNECTED OVERLAY ────────────────────────────────────── */
.disconnected-overlay {
  position: absolute;
  inset: 0; z-index: 5;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
}
.disconnected-inner {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  text-align: center;
}
.disconnected-icon { font-size: 3rem; }
.disconnected-inner p { font-size: .95rem; color: rgba(255,255,255,0.75); margin: 0; }
.btn-next-big {
  padding: 12px 32px;
  border-radius: 9999px;
  background: #2563eb;
  color: #fff;
  font-size: .9rem; font-weight: 700;
  border: none; cursor: pointer;
  box-shadow: 0 4px 20px rgba(37,99,235,0.5);
  transition: all 200ms;
}
.btn-next-big:hover { background: #1d4ed8; transform: translateY(-2px); }

/* ── PiP (your camera, bottom right) ────────────────────────── */
.local-pip {
  position: absolute;
  bottom: 84px;
  right: 16px;
  z-index: 20;
  width: 180px;
  aspect-ratio: 4/3;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.18);
  box-shadow: 0 8px 32px rgba(0,0,0,0.7);
  background: #0d1117;
  transition: width 200ms, bottom 200ms;
}
.local-pip video {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.pip-label {
  position: absolute;
  bottom: 6px; left: 8px;
  font-size: .66rem; font-weight: 700;
  color: rgba(255,255,255,0.75);
  background: rgba(0,0,0,0.5);
  padding: 2px 7px; border-radius: 999px;
}
.pip-no-cam {
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: #0d1117;
  font-size: .75rem; color: #64748b;
}

/* ── FLOATING CONTROLS BAR ───────────────────────────────────── */
.vchat-controls {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 9999px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  white-space: nowrap;
}
.vc-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.85);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.05rem;
  transition: all 180ms ease;
}
.vc-btn:hover { background: rgba(255,255,255,0.18); color: #fff; }
.vc-btn.muted { background: rgba(239,68,68,0.25); color: #fca5a5; border-color: rgba(239,68,68,0.4); }

.vc-btn-next {
  padding: 0 26px;
  height: 44px;
  border-radius: 9999px;
  background: #2563eb;
  color: #fff;
  border: none; cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: .9rem; font-weight: 700;
  display: flex; align-items: center; gap: 7px;
  box-shadow: 0 3px 16px rgba(37,99,235,0.5);
  transition: all 180ms ease;
}
.vc-btn-next:hover { background: #1d4ed8; box-shadow: 0 5px 24px rgba(37,99,235,0.65); transform: translateY(-1px); }

.vc-btn-end {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(239,68,68,0.35);
  background: rgba(239,68,68,0.18);
  color: #fca5a5;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.05rem;
  transition: all 180ms;
}
.vc-btn-end:hover { background: rgba(239,68,68,0.35); color: #fff; }

/* ── CHAT PANEL (right side) ─────────────────────────────────── */
.chat-panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  z-index: 40;
  width: 300px;
  background: #fff;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 24px rgba(0,0,0,0.35);
  transition: transform 250ms ease;
}
.chat-panel.hidden {
  transform: translateX(100%);
}

.cp-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
  flex-shrink: 0;
}
.cp-title { font-size: .85rem; font-weight: 700; color: #111827; }
.cp-close {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid #e5e7eb; background: transparent;
  color: #9ca3af; cursor: pointer; font-size: .75rem;
  display: flex; align-items: center; justify-content: center;
  transition: all 150ms;
}
.cp-close:hover { background: #f3f4f6; color: #374151; }

.cp-online-strip {
  padding: 7px 14px;
  border-bottom: 1px solid #f1f5f9;
  flex-shrink: 0;
}
.cp-online-label {
  display: flex; align-items: center; gap: 5px;
  font-size: .72rem; font-weight: 600; color: #64748b;
}

/* Messages */
.cp-messages {
  flex: 1; overflow-y: auto; padding: 10px 12px;
  display: flex; flex-direction: column; gap: 8px;
  background: #f9fafb;
}
.cp-sys-msg {
  align-self: center;
  font-size: .72rem; color: #9ca3af;
  background: #fff;
  padding: 3px 10px; border-radius: 9999px;
  border: 1px solid #e5e7eb;
}

/* Message bubbles */
.cp-msg { display: flex; flex-direction: column; gap: 2px; max-width: 88%; }
.cp-msg.me   { align-self: flex-end; align-items: flex-end; }
.cp-msg.them { align-self: flex-start; align-items: flex-start; }
.cp-bubble {
  padding: 8px 12px;
  border-radius: 14px;
  font-size: .84rem; line-height: 1.5;
  word-break: break-word;
}
.cp-msg.me   .cp-bubble { background: #2563eb; color: #fff; border-bottom-right-radius: 3px; }
.cp-msg.them .cp-bubble { background: #fff; color: #111827; border: 1px solid #e5e7eb; border-bottom-left-radius: 3px; }
.cp-msg-time { font-size: .64rem; color: #9ca3af; padding: 0 2px; }

/* Input row */
.cp-input-row {
  display: flex; gap: 6px; align-items: flex-end;
  padding: 8px 10px;
  border-top: 1px solid #f1f5f9;
  flex-shrink: 0;
  background: #fff;
}
.cp-input {
  flex: 1;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 8px 11px;
  font-family: 'Inter', sans-serif;
  font-size: .84rem; color: #111827;
  outline: none; resize: none;
  max-height: 90px; min-height: 36px;
  transition: border-color 150ms;
}
.cp-input::placeholder { color: #9ca3af; }
.cp-input:focus { border-color: #2563eb; }
.cp-send {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: #2563eb;
  border: none; color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; flex-shrink: 0;
  transition: background 150ms;
}
.cp-send:hover { background: #1d4ed8; }

/* Report */
.cp-report-bar {
  padding: 6px 12px; border-top: 1px solid #f1f5f9;
  display: flex; align-items: center; justify-content: center;
  background: #fff; flex-shrink: 0;
}
.cp-report-link {
  font-size: .72rem; color: #9ca3af;
  text-decoration: none;
  transition: color 150ms;
}
.cp-report-link:hover { color: #ef4444; }

/* ── CHAT OPEN BUTTON ────────────────────────────────────────── */
.chat-open-btn {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  z-index: 50;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  transition: all 180ms;
}
.chat-open-btn:hover { background: rgba(255,255,255,0.22); }

/* ── PREMIUM NUDGE BAR ───────────────────────────────────────── */
.premium-nudge {
  position: absolute;
  top: 10px; left: 50%; transform: translateX(-50%);
  z-index: 60;
  display: flex; align-items: center; gap: 12px;
  padding: 9px 18px;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 9999px;
  font-size: .78rem; color: rgba(255,255,255,0.85);
  white-space: nowrap;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.pn-btn {
  padding: 5px 14px;
  border-radius: 9999px;
  background: #f59e0b;
  color: #000;
  font-size: .75rem; font-weight: 800;
  text-decoration: none;
  transition: all 150ms;
}
.pn-btn:hover { background: #fbbf24; }
.pn-close {
  background: transparent; border: none;
  color: rgba(255,255,255,0.45); cursor: pointer;
  font-size: .8rem; padding: 0; line-height: 1;
}

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .chat-panel { width: 260px; }
  .local-pip  { width: 120px; bottom: 76px; }
  .vchat-controls { padding: 8px 10px; gap: 6px; }
  .vc-btn      { width: 38px; height: 38px; font-size: .9rem; }
  .vc-btn-next { padding: 0 18px; height: 38px; font-size: .82rem; }
  .vc-btn-end  { width: 38px; height: 38px; }
}
@media (max-width: 560px) {
  .header-tabs-chat { display: none; }
  .chat-panel { width: 100%; top: auto; bottom: 0; height: 50%; border-radius: 16px 16px 0 0; }
  .chat-panel.hidden { transform: translateY(100%); }
  .local-pip  { display: none; }
  .premium-nudge { font-size: .7rem; padding: 7px 14px; }
  .premium-nudge span { display: none; }
}
