/* Guest visit — fixed layout (no split/full thrashing) */

.guest-call-body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: #0a0a0b;
  color: #f4f4f5;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.gcall-bar {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  padding-top: max(0.55rem, env(safe-area-inset-top));
  background: #141416;
  border-bottom: 1px solid #27272a;
  z-index: 10;
}

.gcall-bar-left,
.gcall-bar-right {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.gcall-conn {
  font-size: 0.8rem;
  color: #a1a1aa;
}

.gcall-btn {
  width: auto !important;
  padding: 0.45rem 0.7rem !important;
  font-size: 0.82rem !important;
  border-color: #3f3f46 !important;
  color: #f4f4f5 !important;
  background: #18181b !important;
}

.gcall-btn.is-off {
  opacity: 0.65;
  text-decoration: line-through;
}

.gcall-stage {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  background: #000;
}

/* Single stable frame: remote full-bleed, local PiP */
.gcall-frame {
  position: absolute;
  inset: 0;
  background: #000;
}

.gcall-remote {
  position: absolute;
  inset: 0;
  background: #0a0a0b;
  overflow: hidden;
}

.gcall-remote video,
.gcall-remote .gcall-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
  display: block;
}

.gcall-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
  color: #a1a1aa;
  font-size: 0.95rem;
  line-height: 1.45;
}

.gcall-placeholder.hidden {
  display: none !important;
}

/* Local always PiP — never swaps to full when remote flickers */
.gcall-local {
  position: absolute;
  right: max(0.65rem, env(safe-area-inset-right));
  bottom: max(0.65rem, env(safe-area-inset-bottom));
  width: min(32vw, 160px);
  aspect-ratio: 3 / 4;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 2px solid #3f3f46;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.55);
  background: #18181b;
  z-index: 5;
}

@media (min-width: 600px) {
  .gcall-local {
    width: min(22vw, 200px);
    aspect-ratio: 16 / 10;
  }
}

/* Alone: local is large, still same node (no layout mode swap) */
.gcall-frame.alone .gcall-local {
  inset: 0.5rem;
  width: auto;
  aspect-ratio: auto;
  right: 0.5rem;
  bottom: 0.5rem;
  left: 0.5rem;
  top: 0.5rem;
  border-radius: 0.75rem;
}

.gcall-frame.alone .gcall-remote {
  visibility: hidden;
}

.gcall-local video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
  display: block;
  background: #000;
}

.gcall-pip-label {
  position: absolute;
  left: 0.35rem;
  bottom: 0.35rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.55);
  color: #fafafa;
  z-index: 2;
}

.gcall-err {
  position: absolute;
  left: 50%;
  top: 0.75rem;
  transform: translateX(-50%);
  z-index: 8;
  max-width: 92%;
  margin: 0;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  background: #450a0a;
  color: #fecaca;
  font-size: 0.85rem;
}

.scribe-consent {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.62);
}
.scribe-consent[hidden] { display: none; }
.scribe-consent-card {
  width: min(26rem, 100%);
  background: #18181b;
  border: 1px solid #3f3f46;
  border-radius: 0.9rem;
  padding: 1.1rem 1.15rem 1.2rem;
  color: #fafafa;
}
.scribe-consent-kicker {
  margin: 0 0 0.25rem;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #a1a1aa;
}
.scribe-consent-card h2 { margin: 0 0 0.5rem; font-size: 1.15rem; }
.scribe-consent-card p { margin: 0 0 1rem; color: #d4d4d8; font-size: 0.9rem; line-height: 1.45; }
.scribe-consent-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
