/* Mobile-first, responsive, light/dark. No external deps. */
:root {
  --bg: #f4f6fb;
  --card: #ffffff;
  --fg: #0b1020;
  --muted: #5b6478;
  --accent: #1f7a4d;
  --accent-press: #17603b;
  --border: #e6e9f2;
  --shadow: 0 10px 40px rgba(16, 24, 40, 0.12);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1020;
    --card: #141a2e;
    --fg: #eef1f8;
    --muted: #9aa4bd;
    --accent: #2ea36a;
    --accent-press: #268a59;
    --border: #232a42;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  display: grid;
  place-items: center;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
}

.card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 32px 24px 24px;
  text-align: center;
}

.brand { font-size: 44px; line-height: 1; margin-bottom: 8px; }
h1 { font-size: clamp(1.35rem, 5vw, 1.7rem); margin: 8px 0 6px; letter-spacing: -0.02em; }
.sub { color: var(--muted); margin: 0 0 24px; font-size: 0.98rem; line-height: 1.45; }

.mount { display: flex; justify-content: center; min-height: 60px; }

/* Our own fallback/primary button (used when driving the SDK button ourselves). */
.talk-btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  width: 100%;
  max-width: 320px;
  padding: 16px 20px;
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border-radius: 14px;
  transition: transform 0.06s ease, background 0.15s ease, opacity 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px; /* comfortable touch target */
}
.talk-btn:hover { background: var(--accent-press); }
.talk-btn:active { transform: scale(0.985); }
.talk-btn[disabled] { opacity: 0.6; cursor: default; }
.talk-btn .dot {
  width: 10px; height: 10px; border-radius: 50%; background: #fff;
}
.talk-btn.is-live .dot { animation: pulse 1.2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

/* Style the SignalWire web component button to match, via its CSS custom props. */
sw-click-to-call {
  --interactive-status-success: var(--accent);
  --radius-md: 14px;
  --type-family-body: inherit;
  --type-size-body: 1.05rem;
  display: inline-block;
  width: 100%;
  max-width: 320px;
}

.status { margin: 18px 0 4px; color: var(--muted); font-size: 0.92rem; min-height: 1.2em; }
.status.err { color: #d1483b; }
.retry {
  margin-top: 8px; appearance: none; border: 1px solid var(--border); background: transparent;
  color: var(--fg); border-radius: 10px; padding: 10px 16px; font-size: 0.95rem; cursor: pointer;
}
.hint { color: var(--muted); font-size: 0.8rem; margin: 20px 0 0; }
