/* Look and feel taken from the event room's pre-event countdown (room-couple-eu: includes/desktop.php,
   css/mingleroom.css, css/couple_mobile.css): light grey card, Rubik titles, Nunito body, blue to purple
   timer pill, yellow pill buttons. The backdrop behind the card is a guess. */
:root {
  --nunito: "Nunito", system-ui, sans-serif;
  --rubik: "Rubik", system-ui, sans-serif;
  --purple: #7227D0;
  --purple2: #702AD0;
  --purple3: #6A39D2;
  --blue: #26c1e3;
  --gray200: #f4f4f7;
  --gray400: #e1e3e8;
  --gray500: #d7dae0;
  --line: #BDC3CA;
  --text-high: #212121;
  --text-mid: #5B6476;
  --backdrop: #f4f4f6;
  --glow: 0 10px 28px rgba(114, 39, 208, 0.38);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--backdrop);
  color: var(--text-high);
  font-family: var(--nunito);
  font-size: 16px;
  line-height: 1.4;
}

.proto {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 2;
  font-size: 12px;
  color: var(--text-mid);
  border: 1px solid #d3d3dc;
  border-radius: 999px;
  padding: 3px 10px;
}

.stage { display: flex; justify-content: center; padding: 28px 16px 40px; }

.setup {
  width: 100%;
  max-width: 560px;
  background: #fff;
  border-radius: 32px;
  box-shadow: 0 30px 70px rgba(90, 70, 160, 0.20);
  padding: 40px 44px 32px;
  text-align: center;
}

.title {
  margin: 0 0 12px;
  font-family: var(--rubik);
  font-weight: 700;
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.body-copy { margin: 0 auto; max-width: 440px; font-size: 19px; line-height: 1.45; color: #3b3b3f; }

.line { border: 0; border-top: 1px solid var(--gray400); width: 100%; margin: 28px 0; }

.doors { margin: 0 0 12px; font-weight: 700; font-size: 20px; text-transform: uppercase; }

.pill {
  margin: 0 auto;
  width: 100%;
  max-width: 340px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 60px;
  background: var(--purple);
  box-shadow: var(--glow);
  color: #fff;
  font-family: var(--rubik);
  font-weight: 700;
  font-size: 32px;
  font-variant-numeric: tabular-nums;
}

/* Alex lives where the coins promo sits on the real page. */
.guide { text-align: left; }
.guide-head { display: flex; gap: 14px; align-items: center; }

.face {
  flex: none;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  padding: 4px;
  background: var(--purple);
  transition: box-shadow 0.2s;
}
.face { overflow: hidden; }
/* Alex "listens": the portrait sits in a circular clip, and a layer inside it sways and tilts from the base of her
   neck on a slow 5 second loop (the blink is the GIF itself, also 5 seconds). The picture is scaled up a little so
   the edges never show while it moves. */
.portrait { width: 100%; height: 100%; border-radius: 50%; overflow: hidden; border: 2px solid #fff; background: #fff; }
.pose { width: 100%; height: 100%; transform-origin: 50% 101.7%; animation: listen 5s linear infinite; will-change: transform; }
.pose img { width: 100%; height: 100%; display: block; object-fit: cover; transform: scale(1.07); }
@keyframes listen {
  0% { transform: translate(-0.440%, 0.680%) rotate(0.940deg); }
  2.5% { transform: translate(-0.262%, 0.677%) rotate(1.088deg); }
  5% { transform: translate(-0.094%, 0.651%) rotate(1.184deg); }
  7.5% { transform: translate(0.059%, 0.607%) rotate(1.231deg); }
  10% { transform: translate(0.190%, 0.551%) rotate(1.238deg); }
  12.5% { transform: translate(0.298%, 0.490%) rotate(1.215deg); }
  15% { transform: translate(0.383%, 0.430%) rotate(1.172deg); }
  17.5% { transform: translate(0.446%, 0.374%) rotate(1.121deg); }
  20% { transform: translate(0.492%, 0.327%) rotate(1.069deg); }
  22.5% { transform: translate(0.525%, 0.288%) rotate(1.022deg); }
  25% { transform: translate(0.551%, 0.257%) rotate(0.983deg); }
  27.5% { transform: translate(0.574%, 0.231%) rotate(0.951deg); }
  30% { transform: translate(0.598%, 0.206%) rotate(0.922deg); }
  32.5% { transform: translate(0.626%, 0.179%) rotate(0.889deg); }
  35% { transform: translate(0.658%, 0.143%) rotate(0.844deg); }
  37.5% { transform: translate(0.693%, 0.096%) rotate(0.778deg); }
  40% { transform: translate(0.727%, 0.033%) rotate(0.682deg); }
  42.5% { transform: translate(0.755%, -0.045%) rotate(0.549deg); }
  45% { transform: translate(0.771%, -0.140%) rotate(0.376deg); }
  47.5% { transform: translate(0.768%, -0.248%) rotate(0.162deg); }
  50% { transform: translate(0.741%, -0.365%) rotate(-0.089deg); }
  52.5% { transform: translate(0.685%, -0.484%) rotate(-0.368deg); }
  55% { transform: translate(0.596%, -0.598%) rotate(-0.666deg); }
  57.5% { transform: translate(0.474%, -0.700%) rotate(-0.965deg); }
  60% { transform: translate(0.321%, -0.781%) rotate(-1.251deg); }
  62.5% { transform: translate(0.142%, -0.834%) rotate(-1.506deg); }
  65% { transform: translate(-0.057%, -0.855%) rotate(-1.712deg); }
  67.5% { transform: translate(-0.267%, -0.838%) rotate(-1.857deg); }
  70% { transform: translate(-0.477%, -0.784%) rotate(-1.929deg); }
  72.5% { transform: translate(-0.675%, -0.694%) rotate(-1.922deg); }
  75% { transform: translate(-0.852%, -0.572%) rotate(-1.835deg); }
  77.5% { transform: translate(-0.996%, -0.424%) rotate(-1.671deg); }
  80% { transform: translate(-1.100%, -0.259%) rotate(-1.440deg); }
  82.5% { transform: translate(-1.159%, -0.086%) rotate(-1.155deg); }
  85% { transform: translate(-1.170%, 0.087%) rotate(-0.831deg); }
  87.5% { transform: translate(-1.133%, 0.248%) rotate(-0.487deg); }
  90% { transform: translate(-1.053%, 0.391%) rotate(-0.142deg); }
  92.5% { transform: translate(-0.934%, 0.509%) rotate(0.187deg); }
  95% { transform: translate(-0.786%, 0.597%) rotate(0.484deg); }
  97.5% { transform: translate(-0.618%, 0.654%) rotate(0.738deg); }
  100% { transform: translate(-0.440%, 0.680%) rotate(0.940deg); }
}
.face.speaking { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(112, 42, 208, 0.40); }
  50% { box-shadow: 0 0 0 10px rgba(112, 42, 208, 0); }
}

.who { min-width: 0; }
.guide-name { margin: 0; font-family: var(--rubik); font-weight: 500; font-size: 20px; }
.tag {
  font-family: var(--nunito);
  font-size: 11px;
  font-weight: 700;
  color: var(--purple3);
  background: #e6e0f8;
  border-radius: 999px;
  padding: 2px 8px;
  margin-left: 6px;
  vertical-align: middle;
}
.guide-sub { margin: 0; color: var(--text-mid); font-size: 15px; }

.mute {
  margin-left: auto;
  flex: none;
  font: inherit;
  font-size: 13px;
  color: var(--text-mid);
  background: transparent;
  border: 1px solid var(--gray500);
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
}
.mute[aria-pressed="true"] { color: var(--text-high); background: var(--gray400); }

/* The conversation: scrolls, newest at the bottom. */
.log {
  margin: 16px 0 0;
  background: var(--gray200);
  border: 0;
  border-radius: 20px;
  padding: 14px;
  max-height: min(46vh, 380px);
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.log:empty { display: none; }
.msg {
  max-width: 86%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 17px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.msg.alex { align-self: flex-start; background: #fff; box-shadow: 0 1px 3px rgba(40, 30, 80, 0.08); border-bottom-left-radius: 4px; }
.msg.member { align-self: flex-end; color: #fff; background: var(--purple); border-bottom-right-radius: 4px; }
.msg.alex + .msg.alex { margin-top: -4px; }
.msg.problem { color: #8a1f1f; background: #fbeaea; }

.typing { display: inline-flex; gap: 5px; align-items: center; padding: 14px 16px; }
.typing i {
  width: 8px; height: 8px; border-radius: 50%; background: var(--text-mid); opacity: 0.35;
  animation: dot 1.2s ease-in-out infinite;
}
.typing i:nth-child(2) { animation-delay: 0.18s; }
.typing i:nth-child(3) { animation-delay: 0.36s; }
@keyframes dot { 0%, 60%, 100% { opacity: 0.35; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-4px); } }

.btn-yellow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 240px;
  height: 56px;
  margin: 18px auto 0;
  border: 0;
  border-radius: 200px;
  background: var(--purple);
  box-shadow: var(--glow);
  color: #fff;
  font-family: var(--rubik);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.3s ease-in-out;
}
.btn-yellow:hover { transform: scale(1.05); }

.chips { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.chip {
  font-family: var(--nunito);
  font-weight: 600;
  font-size: 15px;
  color: var(--text-high);
  background: var(--gray200);
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 10px 14px;
  min-height: 56px;
  cursor: pointer;
  text-align: left;
  line-height: 1.25;
}
.chip:hover { border-color: var(--purple); background: #fff; }
.chip[aria-pressed="true"] { background: #e6e0f8; border-color: var(--purple3); color: var(--purple3); }

button:focus-visible { outline: 3px solid var(--purple); outline-offset: 2px; }

.bottom { margin: 24px 0 0; color: var(--text-mid); font-size: 16px; }
.fine { margin: 8px 0 0; color: var(--text-mid); font-size: 12px; }

/* Phone: the real page is full screen, not a card. */
@media (max-width: 600px) {
  .stage { padding: 0; }
  .setup { max-width: none; min-height: 100vh; border-radius: 0; box-shadow: none; padding: 56px 20px 28px; }
  .title { font-size: 24px; }
  .body-copy { font-size: 16px; }
  .pill { width: 220px; height: 52px; font-size: 28px; }
  .face { width: 88px; height: 88px; }
  .line { margin: 20px 0; }
  .proto { top: 8px; right: 8px; color: var(--text-mid); border-color: var(--gray500); }
}

@media (prefers-reduced-motion: reduce) {
  .face.speaking { animation: none; box-shadow: 0 0 0 4px rgba(112, 42, 208, 0.35); }
  .pose { animation: none; }
  .btn-yellow { transition: none; }
}

/* Ask anything */
/* Message box: one rounded field that grows with the text, buttons inside on the right (the usual chat layout). */
.ask { margin-top: 12px; }
.composer {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  background: var(--gray200);
  border: 1px solid transparent;
  border-radius: 26px;
  padding: 6px 6px 6px 18px;
}
.composer:focus-within { background: #fff; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(114, 39, 208, 0.18); }
.composer textarea {
  flex: 1;
  min-width: 0;
  max-height: 140px;
  resize: none;
  overflow-y: hidden;          /* grows instead of scrolling; see growInput() */
  scrollbar-width: none;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: var(--nunito);
  font-size: 16px;            /* 16px stops iOS zooming the page on focus */
  line-height: 1.4;
  color: var(--text-high);
  padding: 8px 0;
}
.composer textarea::-webkit-scrollbar { display: none; }
.icon {
  flex: none;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}
.icon.send { color: #fff; background: var(--purple); }
.icon.send:disabled { opacity: 0.45; cursor: default; }
.icon.mic { color: var(--purple3); background: transparent; }
.icon.mic:hover { background: #e6e0f8; }
.icon.mic.on { color: #fff; background: var(--purple2); }
.icon:focus-visible { outline: 3px solid var(--purple); outline-offset: 2px; }
.fine[hidden] + .fine { margin-top: 0; }

@media (prefers-reduced-motion: reduce) {
  .typing i { animation: none; opacity: 0.7; }
}

.msg a { color: var(--purple); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.msg a:hover { color: var(--purple2); }

/* Camera and mic check */
.devices { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.selfview { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; transform: scaleX(-1); border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--purple); background: var(--gray200); }
.dev { font-size: 13px; font-weight: 700; border-radius: 999px; padding: 4px 10px; background: var(--gray200); color: var(--text-mid); }
.dev.ok { background: #e3f6ea; color: #1d6b3a; }
.dev.bad { background: #fbeaea; color: #8a1f1f; }
.meter { width: 64px; height: 8px; border-radius: 999px; background: var(--gray400); overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: var(--purple); transition: width 0.06s linear; }
.linkbtn { font: inherit; font-size: 13px; font-weight: 600; color: var(--purple); background: none; border: 0; padding: 4px 2px;
  cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.linkbtn:hover { color: var(--purple2); }
@media (prefers-reduced-motion: reduce) { .meter i { transition: none; } }

/* rough words while you are still speaking */
.composer textarea.live { color: var(--text-mid); font-style: italic; }
