/* ==========================================================================
   Verification call — shared styling for the customer and agent pages.

   Deliberately the same design language as the rental app
   (halit-88.github.io/ez-rentals-app): white background, black text and
   buttons, same typography and controls. The call is a step inside that
   flow, so it must not look like a different product.
   ========================================================================== */

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f5f5f7;
  --ink: #0a0a0a;
  --ink-2: #444444;
  --ink-3: #767680;
  --line: #e2e2e6;
  --line-strong: #111111;
  --danger: #c0261c;
  --ok: #0a7d33;
  --radius: 14px;
  --radius-sm: 10px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}
body { min-height: 100vh; min-height: 100dvh; }

/* ---- shell ---------------------------------------------------------- */

.app {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}
@media (max-width: 600px) { .app { border-left: 0; border-right: 0; } }

.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  padding: 14px 20px 12px;
}
.topbar-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -0.02em; font-size: 17px; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px; background: var(--ink); color: #fff;
  display: grid; place-items: center; font-size: 15px; font-weight: 800;
}
.badge {
  font-size: 12px; font-weight: 600; color: var(--ink-3);
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
}
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
.badge .dot.online { background: var(--ok); box-shadow: 0 0 0 3px rgba(10, 125, 51, 0.15); }
.badge .dot.ringing { background: var(--danger); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: 0.25; } }

.main { flex: 1; padding: 24px 20px 20px; }

/* ---- typography ----------------------------------------------------- */

.title { font-size: 25px; font-weight: 800; letter-spacing: -0.03em; margin: 0 0 6px; line-height: 1.15; }
.sub { font-size: 15px; color: var(--ink-2); margin: 0 0 22px; line-height: 1.45; }
.hint { font-size: 12.5px; color: var(--ink-3); margin-top: 14px; line-height: 1.55; text-align: center; }

.hero { text-align: center; padding: 20px 0 8px; }
.hero-mark {
  width: 84px; height: 84px; border-radius: 24px; margin: 0 auto 22px;
  background: var(--surface-2); border: 1px solid var(--line);
  display: grid; place-items: center; font-size: 40px;
}
.hero-mark.solid { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---- buttons -------------------------------------------------------- */

.btn {
  width: 100%;
  font-family: var(--font);
  font-size: 16px; font-weight: 700;
  border-radius: var(--radius);
  padding: 15px 20px;
  cursor: pointer;
  border: 1px solid var(--ink);
  background: var(--ink); color: #fff;
  transition: transform 0.06s ease, opacity 0.2s, background 0.15s;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn:active { transform: scale(0.985); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn:hover:not(:disabled) { background: #262626; }

.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); border-color: var(--ink); }

.btn-danger { background: var(--danger); border-color: var(--danger); }
.btn-danger:hover:not(:disabled) { background: #a51f16; }

.btn + .btn { margin-top: 12px; }

/* ---- inputs --------------------------------------------------------- */

.field { margin-bottom: 16px; text-align: left; }
label.lbl { display: block; font-size: 13px; font-weight: 600; margin-bottom: 7px; }
input[type="text"], input[type="password"] {
  width: 100%; font-family: var(--font); font-size: 16px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 13px 14px; outline: none; transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none; appearance: none;
}
input:focus { border-color: var(--line-strong); box-shadow: 0 0 0 3px rgba(10, 10, 10, 0.08); }

/* ---- callout / status ----------------------------------------------- */

.callout {
  border: 1px solid var(--line); border-left: 3px solid var(--ink);
  border-radius: var(--radius-sm); padding: 13px 15px; background: var(--surface-2);
  font-size: 13.5px; color: var(--ink-2); line-height: 1.5; text-align: left; margin: 18px 0;
}
.callout b { color: var(--ink); }

.status {
  font-size: 14px; color: var(--ink-2); min-height: 20px;
  margin: 16px 0 0; text-align: center; line-height: 1.5;
}

.ref-chip {
  display: inline-block; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 15px; font-weight: 700; letter-spacing: 0.05em;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 16px; margin: 4px 0 20px;
}

/* ---- waiting callers (agent console) -------------------------------- */

.sec {
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--ink-3); margin: 24px 0 12px; padding-bottom: 8px;
  border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between;
}

.caller {
  display: flex; align-items: center; gap: 13px; text-align: left;
  padding: 14px; border-radius: var(--radius); margin-bottom: 10px;
  background: var(--surface); border: 1px solid var(--line);
}
.caller.ringing {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(10, 10, 10, 0.07);
  animation: pulse 1.4s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(10, 10, 10, 0.07); }
  50%      { box-shadow: 0 0 0 8px rgba(10, 10, 10, 0.03); }
}
.caller-ico {
  width: 42px; height: 42px; flex: 0 0 auto; border-radius: 12px;
  background: var(--surface-2); display: grid; place-items: center; font-size: 19px;
}
.caller.ringing .caller-ico { background: var(--ink); }
.caller-body { flex: 1; min-width: 0; }
.caller-name { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.caller-meta { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.caller .btn { width: auto; flex: 0 0 auto; padding: 11px 20px; font-size: 14px; border-radius: 11px; }

.empty { font-size: 13.5px; color: var(--ink-3); text-align: center; padding: 22px 0; }

/* ---- video ---------------------------------------------------------- */

.stage { display: none; }
.stage.live { display: block; }

.video-wrap {
  position: relative; width: 100%; aspect-ratio: 3/4;
  background: var(--surface-2); border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--line); margin-bottom: 14px;
}
.video-wrap > div#remote-player { position: absolute; inset: 0; }
.tag {
  position: absolute; left: 10px; bottom: 10px; z-index: 5;
  background: rgba(10, 10, 10, 0.72); color: #fff;
  padding: 5px 11px; border-radius: 8px; font-size: 12px; font-weight: 600;
}
.self {
  position: absolute; right: 10px; bottom: 10px; width: 96px; aspect-ratio: 3/4; z-index: 6;
  border-radius: 10px; overflow: hidden; border: 2px solid #fff;
  background: var(--surface-2); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}
.self > div { position: absolute; inset: 0; }
