/* peerspace/css/style.css */
/* ── Reset & Solar Punk UI Variables ────────────────────────── */

@charset "UTF-8";

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }





[hidden], 
#localOff[hidden] {
  display: none !important;
}


:root {
  /* Solar Punk Palette: Warm, organic, vibrant, bright */
  --bg-color: #eef7f2;
  --bg-gradient: radial-gradient(circle at top left, #fffae8, #e4f5ed 45%, #dcfce7 100%);
  
  /* 3D Glassmorphism Surfaces */
  --surf: rgba(255, 255, 255, 0.45);
  --surf-solid: rgba(255, 255, 255, 0.85);
  --surf-hover: rgba(255, 255, 255, 0.95);
  --surf-inset: rgba(230, 245, 238, 0.4);
  
  /* Borders and Highlights */
  --bdr: rgba(7, 15, 12, 0.25);
  --bdr-light: rgba(255, 255, 255, 0.8);
  --bdr-strong: rgba(16, 185, 129, 0.5);
  
  /* Organic Colors */
  --blue: #0ea5e9;
  --teal: #10b981;
  --green: #059669;
  --amber: #f59e0b;
  --red: #ef4444;
  
  /* Typography */
  --white: #133a27; /* Re-mapped for dark organic text */
  --muted: #537a65;
  --mono: 'IBM Plex Mono', monospace;
  --sans: 'Inter', system-ui, sans-serif;

  /* Proper 3D / Neumorphic / Glass Shadows */
  --shadow-glass: 0 12px 36px 0 rgba(19, 58, 39, 0.08), inset 0 1px 1px rgba(255, 255, 255, 0.9);
  --shadow-btn: 4px 4px 12px rgba(19, 58, 39, 0.1), -4px -4px 12px rgba(255, 255, 255, 1), inset 1px 1px 2px rgba(255,255,255,0.8);
  --shadow-btn-hover: 6px 6px 16px rgba(19, 58, 39, 0.15), -6px -6px 16px rgba(255, 255, 255, 1), inset 1px 1px 2px rgba(255,255,255,0.9);
  --shadow-btn-active: inset 3px 3px 8px rgba(19, 58, 39, 0.1), inset -3px -3px 8px rgba(255, 255, 255, 0.8);
  --shadow-inset: inset 4px 4px 10px rgba(19, 58, 39, 0.06), inset -4px -4px 10px rgba(255, 255, 255, 0.9);
  
  /* Radii for smooth organic feel */
  --rad-lg: 28px;
  --rad-md: 18px;
  --rad-sm: 12px;

  /* Transitions */
  --smooth: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

html, body { height: 100%; overflow: hidden; }
body { 
  background: var(--bg-gradient); 
  background-color: var(--bg-color);
  color: var(--white); 
  font-family: var(--sans); 
  font-size: 13px; 
  position: relative;
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(16, 185, 129, 0.3); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(16, 185, 129, 0.6); }

/* ── Environment / 3D Orbs ──────────────────────────────────── */
.env-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  z-index: -1;
  pointer-events: none;
  animation: float 12s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}
.orb-sun { width: 40vw; height: 40vw; background: rgba(245, 158, 11, 0.3); top: -10%; left: -10%; }
.orb-leaf { width: 50vw; height: 50vw; background: rgba(16, 185, 129, 0.25); bottom: -20%; right: -10%; animation-delay: -4s; }
.orb-sky { width: 35vw; height: 35vw; background: rgba(14, 165, 233, 0.2); top: 30%; right: 20%; animation-delay: -8s; }

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, -40px) scale(1.05); }
}

/* ── 3D & Glass Utility Classes ─────────────────────────────── */
.glass-3d {
  background: var(--surf);
  /* backdrop-filter intentionally removed from both here and ::before.
     ANY element with backdrop-filter (or a child/pseudo with it) is
     promoted to a stacking context by every browser — this is what was
     clipping Quill's picker-options dropdowns regardless of z-index.
     The glass effect is replicated with a slightly more opaque background. */
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--bdr-light);
  box-shadow: var(--shadow-glass);
  position: relative;
  /* NO isolation:isolate — explicit stacking context trap */
  /* NO ::before with backdrop-filter — same trap, different syntax */
}

/* .glass-3d::before intentionally removed — see note above */
.inset-3d {
  background: var(--surf-inset);
  box-shadow: var(--shadow-inset);
  border: 1px solid rgba(255,255,255,0.6);
}

/* ── Shell & Global Layout ──────────────────────────────────── */
.shell {
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 16px;
  gap: 16px;
  z-index: 1;
}

/* ── Topbar ─────────────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  height: 60px;
  border-radius: var(--rad-lg);
  flex-shrink: 0;
  transition: var(--smooth);
}

.logo {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-shadow: 0 2px 4px rgba(255,255,255,0.8);
}
.logo-dot {
  width: 10px; height: 10px;
  background: linear-gradient(135deg, var(--amber), var(--teal));
  border-radius: 50%;
  box-shadow: 0 0 10px var(--teal);
}

.room-pill {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), #d97706);
  box-shadow: 2px 2px 8px rgba(245,158,11,0.3), inset 1px 1px 2px rgba(255,255,255,0.5);
  padding: 4px 12px;
  border-radius: var(--rad-sm);
  letter-spacing: 1px;
  flex-shrink: 0;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* Stage strip */
.stage-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  justify-content: center;
}

.stage {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  padding: 4px 10px;
  border-radius: var(--rad-sm);
  background: var(--surf-inset);
  box-shadow: var(--shadow-inset);
  transition: var(--smooth);
}

.sn {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--surf-solid);
  box-shadow: 1px 1px 3px rgba(0,0,0,0.05);
  display: flex; align-items: center; justify-content: center;
  font-size: 9px;
  font-family: var(--mono);
  transition: var(--smooth);
}

.sa { color: var(--bdr-strong); font-size: 14px; font-weight: 700; text-shadow: 0 1px 0 #fff; }

.stage-idle   { opacity: 0.7; }
.stage-active { color: var(--blue); background: rgba(255,255,255,0.8); box-shadow: var(--shadow-btn); }
.stage-active .sn {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(14,165,233,0.2);
  animation: pulse-ring 2s infinite;
}
@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(14,165,233,0.4); }
  100% { box-shadow: 0 0 0 6px rgba(14,165,233,0); }
}

.stage-done { color: var(--green); }
.stage-done .sn { background: var(--green); color: #fff; }

/* Topbar right */
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.who {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  background: var(--surf-inset);
  padding: 4px 12px;
  border-radius: var(--rad-sm);
  box-shadow: var(--shadow-inset);
}

.ctrl-btn {
  padding: 6px 14px;
  background: var(--surf-solid);
  border: 1px solid var(--bdr-light);
  border-radius: var(--rad-sm);
  color: var(--white);
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: var(--smooth);
}
.ctrl-btn:hover { 
  transform: translateY(-2px); 
  box-shadow: var(--shadow-btn-hover); 
  color: var(--green); 
}
.ctrl-btn:active {
  transform: translateY(1px);
  box-shadow: var(--shadow-btn-active);
}

.status-pill {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--rad-lg);
  box-shadow: var(--shadow-btn);
  text-shadow: 0 1px 1px rgba(0,0,0,0.1);
  color: #fff;
}
.status-waiting   { background: linear-gradient(135deg, #fcd34d, #f59e0b); }
.status-connected { background: linear-gradient(135deg, #6ee7b7, #10b981); }
.status-error     { background: linear-gradient(135deg, #fca5a5, #ef4444); }
/* ── Network micro-badge (solarpunk glass) ──────────────────── */
.network-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 4px 14px;
  border-radius: var(--rad-lg);
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-btn);
  transition: var(--smooth);
  text-transform: uppercase;
  color: #fff;
}

.network-badge.direct {
  color: #6ee7b7;           /* matches your "connected" status gradient start */
  border-color: rgba(16, 185, 129, 0.25);
  background: rgba(16, 185, 129, 0.06);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.04), var(--shadow-btn);
}

.network-badge.relayed {
  color: #fcd34d;           /* matches your "waiting" status gradient start */
  border-color: rgba(245, 158, 11, 0.25);
  background: rgba(245, 158, 11, 0.06);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.04), var(--shadow-btn);
}
/* ── Body layout ────────────────────────────────────────────── */
.body {
  flex: 1;
  display: flex;
  gap: 16px;
  min-height: 0;
}

/* ── Left column ─────────────────────────────────────────────── */
.left-col {
  width: 520px;                    /* was 260px  –  now fits 2 columns of 240px */
  border-radius: var(--rad-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 12px;
  gap: 12px;
}

/* ─────────────────────────────────────────────────────────────────
   PeerSpace – larger video grid (all tiles fill the space)
   ───────────────────────────────────────────────────────────────── */
/* related resource: style.css:291:1 */
/*
#videoGrid { 
  height: auto;
  min-height: 150px;
  grid-template-rows: auto;
  align-content: start;
  max-height: calc(-200px + 100vh);
  overflow-y: auto;
  justify-items: stretch;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 12px;
  padding: 12px;
  width: 100%;
}
*/

#videoGrid {
  flex: 1;
  min-height: 150px;
  overflow-y: auto;
  justify-items: stretch;
  align-content: start;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  grid-template-rows: auto;
  gap: 12px;
  padding: 12px;
  width: 100%;
}

/* related resource: style.css:310:1 */
#localTile {
  position: relative;   /* anchors absolute overlays */
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  overflow: hidden;     /* keeps video contained */
}

/* related resource: style.css:320:1 */
#localVideo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* related resource: style.css:329:1 */
.video-tile {
  position: relative;   /* anchors .tile-off and .tile-overlay */
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  overflow: hidden;
}

/* related resource: style.css:339:1 */
.video-tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Placeholder (unchanged) */
.tile-off {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #888;
  font-size: 13px;
  background: #111;
}

.tile-off span:first-child { font-size: 32px; }

/* Overlay (unchanged) */
.tile-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 6px 10px;
  background: linear-gradient(transparent, rgba(0,0,0,0.65));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  pointer-events: none;
}

.tile-name-label {
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tile-badges {
  display: flex;
  gap: 4px;
  font-size: 13px;
}

.tile-novid video {
  opacity: 0.15;
}

/* ── Controls bar (keep as‑is) ── */
.video-controls {
  display: flex;
  gap: 8px;
  justify-content: center;
  padding: 8px 0;
  flex-shrink: 0;      /* prevents bar from shrinking in flex column */
}

.video-controls button {
  padding: 6px 14px;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  background: #222;
  color: #ddd;
  transition: background .15s;
}

.video-controls button:hover   { background: #333; }
.video-controls button.muted   { background: #7f1d1d; color: #fca5a5; }
.video-controls button.cam-off { background: #1c1917; color: #a8a29e; }

.vid-slot {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--rad-md);
  overflow: hidden;
  min-height: 0;
  max-height: 180px;
}

.vid-slot video {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.vid-off {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.vid-icon  { font-size: 32px; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1)); }
.vid-label { font-size: 10px; font-weight: 700; color: var(--muted); letter-spacing: 1px; text-shadow: 0 1px 0 #fff; }

.vid-tag {
  position: absolute;
  bottom: 8px; left: 8px;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: rgba(19, 58, 39, 0.4);
  backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: var(--rad-sm);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Log box */
.log-box {
  flex: 0 1 200px;
  min-height: 100px;
  max-height: 30vh;
  display: flex;
  flex-direction: column;
  background: var(--surf-solid);
  border-radius: var(--rad-md);
  box-shadow: var(--shadow-inset);
  overflow: hidden;
}

.log-title {
  padding: 12px 14px;
  font-size: 11px;
  font-weight: 800;
  color: var(--green);
  letter-spacing: 1px;
  border-bottom: 1px solid var(--bdr);
  background: rgba(255,255,255,0.5);
}

.signal-log {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.log-row {
  display: flex;
  gap: 8px;
  font-size: 11px;
  font-family: var(--mono);
  line-height: 1.5;
  padding: 6px;
  border-radius: var(--rad-sm);
  background: rgba(255,255,255,0.6);
  box-shadow: 1px 1px 3px rgba(0,0,0,0.03);
  animation: fadein .3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
@keyframes fadein { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

.log-ts  { color: var(--muted); font-weight: 600; }
.log-msg { word-break: break-word; color: var(--white); }

.log-info   .log-msg { color: var(--muted); }
.log-ok     .log-row { background: rgba(16,185,129,0.1); border-left: 3px solid var(--green); }
.log-warn   .log-row { background: rgba(245,158,11,0.1); border-left: 3px solid var(--amber); }
.log-error  .log-row { background: rgba(239,68,68,0.1);  border-left: 3px solid var(--red); }

/* Stats */
.stats-row {
  display: flex;
  background: var(--surf-solid);
  border-top: 1px solid var(--bdr);
}

.stat {
  flex: 1;
  padding: 10px 4px;
  text-align: center;
  border-right: 1px solid var(--bdr);
}
.stat:last-child { border-right: none; }

.sv {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--teal);
  text-shadow: 0 1px 0 #fff;
}
.sk {
  font-size: 9px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .5px;
  margin-top: 2px;
}

/* ── Right column ────────────────────────────────────────────── */
.right-col {
  flex: 1;
  border-radius: var(--rad-lg);
  display: flex;
  flex-direction: column;
  overflow: visible !important;
}

/* Tabs */
.tabs-bar {
  display: flex;
  background: rgba(255,255,255,0.4);
  border-bottom: 1px solid var(--bdr-light);
  padding: 8px 16px 0;
  gap: 8px;
}

.tab {
  padding: 12px 24px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  background: var(--surf-inset);
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: var(--rad-md) var(--rad-md) 0 0;
  cursor: pointer;
  transition: var(--smooth);
  box-shadow: inset 0 -4px 6px rgba(0,0,0,0.02);
}
.tab:hover:not(.active) { color: var(--green); background: rgba(255,255,255,0.6); }
.tab.active { 
  color: var(--green); 
  background: var(--surf-solid); 
  box-shadow: 0 -4px 12px rgba(19,58,39,0.05);
  border-color: var(--bdr-light);
}

.tabs-body {
  flex: 1;
  position: relative;
  background: var(--surf-solid);
  overflow: visible !important;
}

.tab-pane {
  display: none;
  flex-direction: column;
  height: 100%;
}
.tab-pane.active { display: flex; animation: tabfadein 0.4s ease-out; }

/* Separate fade for tab panes — NO transform, which would create a stacking context
   and clip Quill dropdowns for the 0.4s duration of the animation */
@keyframes tabfadein { from { opacity: 0; } to { opacity: 1; } }

/* ── Document ────────────────────────────────────────────────── */

/* Still useful as a belt-and-suspenders, but lower value now */
#docToolbar {
  position: relative;
  z-index: 20;
  overflow: visible; /* ensure options can bleed below */
}

.doc-ed {
  flex: 1;
  padding: 24px;
  background: transparent;
  border: none;
  color: var(--white);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.8;
  resize: none;
  outline: none;
  /* position:relative + z-index:1 REMOVED — made editor a higher stacking context
     than the toolbar, causing picker dropdowns to render behind the canvas */
}
.doc-ed::placeholder { color: var(--muted); font-style: italic; opacity: 0.6; }
.doc-ed:disabled { opacity: 0.5; cursor: not-allowed; }

.doc-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  background: rgba(255,255,255,0.6);
  border-top: 1px solid var(--bdr-light);
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

/* ── Chat ────────────────────────────────────────────────────── */
.chat-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-msg {
  max-width: 75%;
  padding: 12px 16px;
  border-radius: var(--rad-md);
  font-size: 14px;
  line-height: 1.5;
  box-shadow: var(--shadow-btn);
}

.chat-self { 
  align-self: flex-end; 
  background: linear-gradient(135deg, #a7f3d0, #34d399); 
  border-bottom-right-radius: 4px;
  color: #064e3b;
}
.chat-remote { 
  align-self: flex-start; 
  background: #ffffff; 
  border-bottom-left-radius: 4px;
}

.chat-name { font-size: 10px; font-weight: 800; opacity: 0.6; margin-bottom: 4px; }
.chat-text { font-weight: 500; }

.typing-ind {
  font-size: 11px;
  font-weight: 600;
  color: var(--teal);
  padding: 0 20px 10px;
  animation: pulse 1.5s infinite alternate;
}
@keyframes pulse { from { opacity: 0.5; } to { opacity: 1; } }

.chat-bar {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  background: rgba(255,255,255,0.7);
  border-top: 1px solid var(--bdr-light);
}

.chat-in {
  flex: 1;
  border-radius: var(--rad-md);
  color: var(--white);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  padding: 12px 16px;
  outline: none;
  transition: var(--smooth);
  border: 2px solid transparent;
}
.chat-in:focus { border-color: var(--teal); background: #fff; box-shadow: 0 4px 12px rgba(16,185,129,0.15); }
.chat-in::placeholder { color: var(--muted); }

.chat-btn {
  padding: 0 24px;
  background: linear-gradient(135deg, var(--teal), var(--green));
  border: none;
  border-radius: var(--rad-md);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: var(--smooth);
}
.chat-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: var(--shadow-btn-hover); }
.chat-btn:active:not(:disabled) { transform: translateY(1px); box-shadow: var(--shadow-btn-active); }
.chat-btn:disabled { opacity: 0.4; filter: grayscale(1); cursor: not-allowed; }

/* ── Files ───────────────────────────────────────────────────── */
.files-pane {
  padding: 24px;
  gap: 16px;
}

.drop-zone {
  border: 2px dashed var(--bdr-strong);
  border-radius: var(--rad-lg);
  transition: var(--smooth);
  cursor: pointer;
}
.drop-zone:hover, .drop-zone.dz-over { 
  border-color: var(--green); 
  background: rgba(16,185,129,0.1); 
  box-shadow: 0 0 20px rgba(16,185,129,0.2);
}

.dz-inner {
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}
.dz-ico  { font-size: 48px; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1)); }
.dz-text { font-size: 14px; font-weight: 500; color: var(--muted); line-height: 1.6; }
.dz-text strong { color: var(--green); font-weight: 800; }

.file-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.file-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff;
  border-radius: var(--rad-md);
  padding: 12px 16px;
  box-shadow: var(--shadow-btn);
}

.file-ico  { font-size: 24px; }
.file-body { flex: 1; min-width: 0; }
.file-name { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--white); }
.file-meta { font-size: 11px; font-weight: 600; color: var(--muted); margin: 4px 0 8px; }
.file-bar  { height: 6px; background: var(--surf-inset); border-radius: 4px; overflow: hidden; box-shadow: var(--shadow-inset); }
.file-fill { height: 100%; background: linear-gradient(90deg, var(--teal), var(--green)); border-radius: 4px; transition: width 0.4s ease; }
.file-pct  { font-size: 12px; font-weight: 800; color: var(--green); flex-shrink: 0; }

/* ── Lobby (index.html) ──────────────────────────────────────── */
.lobby-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  z-index: 1;
}

.lobby-card {
  padding: 48px;
  width: 100%;
  max-width: 480px;
  border-radius: var(--rad-lg);
}

.lobby-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.lobby-logo-dot { 
  width: 14px; height: 14px; 
  background: linear-gradient(135deg, var(--amber), var(--teal)); 
  border-radius: 50%; 
  box-shadow: 0 0 12px var(--teal); 
}
.lobby-logo-name { font-size: 28px; font-weight: 800; color: var(--green); text-shadow: 0 2px 4px rgba(255,255,255,0.8); }
.lobby-tag { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 36px; }

.field-group { margin-bottom: 24px; }
.field-label { display: block; font-size: 11px; font-weight: 800; color: var(--muted); letter-spacing: 1px; margin-bottom: 8px; }
.field-row   { display: flex; gap: 12px; }

.field-input {
  width: 100%;
  border-radius: var(--rad-md);
  color: var(--white);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  padding: 14px 18px;
  outline: none;
  transition: var(--smooth);
}
.field-input:focus { background: #fff; box-shadow: 0 4px 16px rgba(16,185,129,0.15); border: 1px solid var(--teal); }
.field-input::placeholder { color: rgba(83, 122, 101, 0.5); font-weight: 500; }
.field-input.mono { font-family: var(--mono); font-size: 18px; letter-spacing: 3px; text-transform: uppercase; }

.lbtn {
  padding: 14px 20px;
  border: 1px solid var(--bdr-light);
  border-radius: var(--rad-md);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: var(--smooth);
  box-shadow: var(--shadow-btn);
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.lbtn:hover { transform: translateY(-2px); box-shadow: var(--shadow-btn-hover); }
.lbtn:active { transform: translateY(1px); box-shadow: var(--shadow-btn-active); }

.lbtn-icon { background: var(--surf-solid); color: var(--muted); font-size: 18px; padding: 0 16px; }
.lbtn-sec  { background: var(--surf-solid); color: var(--green); }
.lbtn-pri  { background: linear-gradient(135deg, #34d399, #059669); color: #fff; border-color: rgba(255,255,255,0.4); }

.lobby-actions { display: flex; gap: 12px; margin-top: 32px; }
.lobby-actions .lbtn { flex: 1; }

.lobby-err { margin-top: 12px; font-size: 12px; font-weight: 700; color: var(--red); background: rgba(239,68,68,0.1); padding: 8px 12px; border-radius: var(--rad-sm); }

.lobby-note {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--bdr-strong);
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.8;
}
.lobby-note strong { color: var(--green); font-weight: 800; }
.muted-icon { font-size: 16px; vertical-align: middle; }


/* ── Quill Word-like Editor / Solarpunk Overrides ────────────── */

.doc-ed {
  flex: 1;
  background: var(--surf-solid) !important;
  border: 1px solid var(--bdr-light) !important;
  border-top: none !important;
  border-radius: 0 0 var(--rad-md) var(--rad-md) !important;
  color: var(--white);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.8;
  display: flex;
  flex-direction: column;
}

.ql-toolbar.ql-snow {
  background: rgba(255, 255, 255, 0.92); /* replace backdrop-filter with opacity */
  border: 1px solid var(--bdr-light) !important;
  border-radius: var(--rad-md) var(--rad-md) 0 0;
  padding: 10px !important;
  box-shadow: 0 4px 12px rgba(19, 58, 39, 0.05);
}

.ql-editor {
  flex: 1;
  padding: 24px 32px !important;
  overflow-y: auto;
}

.ql-editor.ql-blank::before {
  color: var(--muted) !important;
  font-style: italic;
  opacity: 0.6;
}

/* Solarpunk Icons & Accents */
.ql-snow .ql-stroke { stroke: var(--muted) !important; }
.ql-snow .ql-fill { fill: var(--muted) !important; }
.ql-snow .ql-picker { color: var(--muted) !important; }
.ql-snow .ql-picker-options { 
  background: var(--surf-solid) !important; 
  border: 1px solid var(--bdr) !important; 
  border-radius: var(--rad-sm);
  box-shadow: var(--shadow-glass);
  z-index: 9999 !important;
}

/* Lifted expanded picker above the editor canvas */
.ql-snow .ql-picker.ql-expanded {
  position: relative;
  z-index: 9999 !important;
}

.ql-toolbar.ql-snow { overflow: visible !important; }

.ql-snow .ql-active .ql-stroke,
.ql-snow .ql-picker-label:hover .ql-stroke,
.ql-snow button:hover .ql-stroke { stroke: var(--green) !important; }

.ql-snow .ql-active .ql-fill,
.ql-snow .ql-picker-label:hover .ql-fill,
.ql-snow button:hover .ql-fill { fill: var(--green) !important; }

.ql-snow .ql-active { color: var(--green) !important; }

/* Custom Additions */
.custom-action-btn {
  background: transparent;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 2px 6px;
  transition: var(--smooth);
  opacity: 0.8;
}
.custom-action-btn:hover { 
  transform: scale(1.1); 
  opacity: 1;
  filter: drop-shadow(0 2px 4px rgba(16,185,129,0.4)); 
}

/* Table overrides to look beautiful */
.ql-editor table {
  border-collapse: collapse;
  width: 100%;
  margin: 16px 0;
  border: 2px solid var(--bdr-strong);
  border-radius: var(--rad-sm);
  overflow: hidden;
}
.ql-editor td, .ql-editor th {
  border: 1px solid var(--bdr);
  padding: 8px 12px;
  background: rgba(255,255,255,0.4);
}

/* ═══════════════════════════════════════════════════════════════
   LIVE FEED / TRANSCRIPT TAB
   ═══════════════════════════════════════════════════════════════ */

.transcript-pane {
  display: none;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}
.transcript-pane.active { display: flex; animation: tabfadein 0.4s ease-out; }

/* Whisper loader bar */
.whisper-loader {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  background: rgba(245, 158, 11, 0.08);
  border-bottom: 1px solid rgba(245, 158, 11, 0.2);
  flex-shrink: 0;
}
.whisper-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--amber);
  white-space: nowrap;
  flex-shrink: 0;
}
.whisper-track {
  flex: 1;
  height: 6px;
  background: var(--surf-inset);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: var(--shadow-inset);
}
.whisper-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--amber), var(--teal));
  border-radius: 4px;
  transition: width 0.5s ease;
}

/* Ready note */
.transcript-note {
  padding: 8px 20px;
  font-size: 11px;
  font-weight: 600;
  color: var(--teal);
  background: rgba(16, 185, 129, 0.06);
  border-bottom: 1px solid rgba(16, 185, 129, 0.15);
  flex-shrink: 0;
}

/* Scrollable feed */
#transcriptFeed {
  display: block;
  height: 500px;
  max-height: 70vh;
  overflow-y: scroll;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px;
  background: rgba(255,255,255,0.05);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

/* Each transcript chunk */
.tx-chunk {
  display: flex;
  flex-direction: column;
  gap: 4px;
  animation: fadein 0.35s ease-out;
}
.tx-self  .tx-bubble { background: linear-gradient(135deg, #a7f3d0, #34d399); color: #064e3b; align-self: flex-end; border-bottom-right-radius: 4px; }
.tx-remote .tx-bubble { background: #fff; align-self: flex-start; border-bottom-left-radius: 4px; }

.tx-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}
.tx-self  .tx-meta { justify-content: flex-end; }
.tx-remote .tx-meta { justify-content: flex-start; }

.tx-speaker {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--surf-inset);
  color: var(--muted);
  box-shadow: var(--shadow-inset);
}
.tx-time {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  font-family: var(--mono);
}

.tx-bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: var(--rad-md);
  font-size: 14px;
  line-height: 1.55;
  font-weight: 500;
  box-shadow: var(--shadow-btn);
  word-break: break-word;
}

/* End meeting button bar */
.transcript-footer {
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.7);
  border-top: 1px solid var(--bdr-light);
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.transcript-toggle-btn {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: var(--rad-md);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: var(--smooth);
  color: #fff;
}
.transcript-toggle-btn:hover  { transform: translateY(-2px); box-shadow: var(--shadow-btn-hover); }
.transcript-toggle-btn:active { transform: translateY(1px);  box-shadow: var(--shadow-btn-active); }

/* Recording state — red */
.tx-btn-recording { background: linear-gradient(135deg, #fca5a5, #ef4444); }
/* Paused state — green */
.tx-btn-paused    { background: linear-gradient(135deg, #6ee7b7, #10b981); }

.summarise-btn {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: var(--rad-md);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: var(--smooth);
  background: linear-gradient(135deg, #93c5fd, #3b82f6);
  color: #fff;
}
.summarise-btn:hover  { transform: translateY(-2px); box-shadow: var(--shadow-btn-hover); }
.summarise-btn:active { transform: translateY(1px);  box-shadow: var(--shadow-btn-active); }

/* End Meeting in topbar */
.ctrl-btn-end {
  background: linear-gradient(135deg, #fca5a5, #ef4444) !important;
  color: #fff !important;
  border-color: rgba(255,255,255,0.3) !important;
}


/* ═══════════════════════════════════════════════════════════════
   SUMMARY MODAL
   ═══════════════════════════════════════════════════════════════ */

.summary-overlay {
  position: fixed;
  inset: 0;
  /* Solid semi-transparent backdrop — NO backdrop-filter (stacking context trap) */
  background: rgba(10, 30, 20, 0.72);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadein 0.3s ease-out;
}

.summary-card {
  width: 100%;
  max-width: 680px;
  max-height: 88vh;
  border-radius: var(--rad-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* Override glass-3d background to be more opaque for modal legibility */
  background: rgba(255, 255, 255, 0.96) !important;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
}

.summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--bdr-light);
  flex-shrink: 0;
}
.summary-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--green);
  letter-spacing: -0.3px;
}
.summary-close {
  font-size: 12px;
  padding: 6px 14px;
}

/* Spinner state */
.summary-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 60px 24px;
  flex: 1;
}
.spinner-ring {
  width: 48px;
  height: 48px;
  border: 4px solid var(--surf-inset);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.spinner-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  font-family: var(--mono);
}

/* Content state */
.summary-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sum-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  background: var(--surf-inset);
  padding: 10px 14px;
  border-radius: var(--rad-md);
  box-shadow: var(--shadow-inset);
}
.sum-speaker-chip {
  background: linear-gradient(135deg, #a7f3d0, #34d399);
  color: #064e3b;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
}

.sum-section h3 {
  font-size: 13px;
  font-weight: 800;
  color: var(--green);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}
.sum-section p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--white);
  background: rgba(255,255,255,0.6);
  padding: 12px 16px;
  border-radius: var(--rad-md);
  border-left: 3px solid var(--teal);
}
.sum-section ul {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 0;
  list-style: none;
}
.sum-section li {
  font-size: 13px;
  line-height: 1.6;
  padding: 8px 12px;
  background: rgba(255,255,255,0.7);
  border-radius: var(--rad-sm);
  box-shadow: var(--shadow-btn);
  border-left: 3px solid var(--amber);
  word-break: break-all;
}
.sum-section li a { color: var(--blue); text-decoration: none; word-break: break-all; }
.sum-section li a:hover { text-decoration: underline; }
.sum-empty { color: var(--muted) !important; font-style: italic; border-left-color: var(--bdr) !important; }
.sum-error { color: var(--red); font-size: 13px; padding: 16px; background: rgba(239,68,68,0.08); border-radius: var(--rad-md); }

.summary-actions {
  padding: 16px 24px;
  border-top: 1px solid var(--bdr-light);
  display: flex;
  justify-content: flex-end;
  flex-shrink: 0;
}

/* dz-disabled state used by file drop zone */
.dz-disabled { opacity: 0.5; pointer-events: none; }
