/* meeting-room.css — in-app video call (Daily Prebuilt embed).
   Rendered by js/meeting-room.js. Full-screen by default; `.is-min` docks it
   to a corner tile so the call keeps running while the lawyer works in Lex. */

#lex-call-overlay {
  position: fixed;
  inset: 0;
  z-index: 4000;                 /* above modals + topbars */
  display: none;                /* flipped to flex when a call opens */
  flex-direction: column;
  background: #0b0d10;
  transition: box-shadow 0.18s ease, border-radius 0.18s ease;
}

.lex-call-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0.9rem;
  background: #14171c;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.lex-call-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  color: #f4f5f7;
  font-weight: 600;
  font-size: 0.95rem;
}
.lex-call-title-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Small pulsing "live" dot. */
.lex-call-live {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6);
  animation: lexCallPulse 2s infinite;
}
@keyframes lexCallPulse {
  0%   { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
  70%  { box-shadow: 0 0 0 7px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.lex-call-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 0 0 auto;
}

/* Bar buttons — quiet, on-dark, distinct from the app's light-theme .btn. */
.lex-call-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #e8eaed;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.32rem 0.7rem;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.lex-call-btn:hover { background: rgba(255, 255, 255, 0.12); }
.lex-call-btn-leave {
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(239, 68, 68, 0.16);
  color: #ffb4b4;
}
.lex-call-btn-leave:hover { background: rgba(239, 68, 68, 0.28); }

.lex-call-stage {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
}
.lex-call-stage iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Lock background scroll only while the call is full-screen. */
body.lex-call-open { overflow: hidden; }

/* ── Minimized: a draggable-looking corner tile ─────────────────── */
#lex-call-overlay.is-min {
  inset: auto;
  right: 1rem;
  bottom: 1rem;
  width: min(380px, 82vw);
  height: auto;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
#lex-call-overlay.is-min .lex-call-stage { height: 214px; }
#lex-call-overlay.is-min .lex-call-title { cursor: pointer; }
#lex-call-overlay.is-min .lex-call-bar { padding: 0.45rem 0.6rem; }
/* Copy-invite is redundant in the tiny tile — hide to keep it clean. */
#lex-call-overlay.is-min #lex-call-copy { display: none; }

/* ── "You left the meeting" screen (Google-Meet style) ──────────── */
#lex-call-overlay.is-left {
  align-items: center;
  justify-content: center;
  background: #0b0d10;
}
.lex-call-left { display: flex; align-items: center; justify-content: center; width: 100%; padding: 1.5rem; }
.lex-call-left-card {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 0.6rem;
  background: #14171c;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 2.2rem 2.4rem;
  max-width: 420px; width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.lex-call-left-icon {
  display: grid; place-items: center;
  width: 60px; height: 60px; border-radius: 50%;
  background: rgba(255,255,255,0.06); color: #cfd3d8;
  margin-bottom: 0.3rem;
}
.lex-call-left-title { font-size: 1.25rem; font-weight: 600; color: #f4f5f7; }
.lex-call-left-sub { font-size: 0.88rem; color: #9aa0a6; margin-bottom: 0.9rem; }
.lex-call-left-actions { display: flex; gap: 0.6rem; }
.lex-call-btn-primary {
  border-color: transparent;
  background: var(--gold, #b08d57);
  color: #fff;
  font-weight: 600;
  padding: 0.5rem 1.4rem;
}
.lex-call-btn-primary:hover { background: #c29a63; }
.lex-call-left-actions .lex-call-btn { padding: 0.5rem 1.2rem; }

/* ── Invite-people panel (layers over the call, or standalone) ───── */
#lex-invite-modal {
  position: fixed;
  inset: 0;
  z-index: 5000;                 /* above the call overlay (4000) */
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  padding: 1.5rem;
}
.lex-invite-card {
  background: #14171c;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 1.5rem 1.6rem;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.lex-invite-title { font-size: 1.1rem; font-weight: 600; color: #f4f5f7; margin-bottom: 0.35rem; }
.lex-invite-sub { font-size: 0.82rem; color: #9aa0a6; margin-bottom: 0.9rem; line-height: 1.5; }
.lex-invite-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 9px;
  color: #f4f5f7;
  font: inherit;
  font-size: 0.9rem;
  padding: 0.6rem 0.7rem;
  resize: vertical;
  box-sizing: border-box;
}
.lex-invite-input:focus { outline: none; border-color: var(--gold, #b08d57); }
.lex-invite-actions { display: flex; justify-content: flex-end; gap: 0.6rem; margin-top: 1rem; }

@media (max-width: 640px) {
  .lex-call-bar { padding: 0.5rem 0.65rem; gap: 0.5rem; }
  .lex-call-title { font-size: 0.85rem; }
  .lex-call-btn { padding: 0.3rem 0.55rem; font-size: 0.75rem; }
  #lex-call-overlay.is-min { right: 0.6rem; bottom: 0.6rem; width: min(300px, 88vw); }
  #lex-call-overlay.is-min .lex-call-stage { height: 170px; }
  .lex-call-left-card { padding: 1.8rem 1.4rem; }
}
