/* idid.live: one stylesheet for the static pages and the Worker-rendered ones.
   Carries over the look of the PHP site (OTP/default.css): Work Sans, light grey,
   pill inputs and green pill buttons. */

:root {
  --bg: #f5f5f5;
  --ink: #262626;
  --muted: #666666;
  --card: #f7f7f7;
  --green: #4caf50;
  --green-dark: #0e582c;
  --error: #b3261e;
  --error-bg: #fdecea;
  --warn: #8f5a00;
  --wavy: url("https://static.vecteezy.com/system/resources/previews/050/521/218/original/white-wavy-abstract-business-background-white-and-grey-soft-subtle-background-flowing-dynamic-curvy-lines-for-websites-and-social-media-vector.jpg");
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0 max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px));
  min-height: 100vh;
  font-family: 'Work Sans', system-ui, sans-serif;
  color: var(--ink);
  background-color: var(--bg);
  text-align: center;
  line-height: 1.5;
}

/* Background used on the PHP pages: full on the homepage, faded elsewhere. */
body.wavy { background: var(--wavy) center / cover no-repeat fixed, var(--bg); }
body.wavy-soft { position: relative; z-index: 0; }
body.wavy-soft::before {
  content: "";
  position: fixed;
  inset: 0;
  background: var(--wavy) center / cover no-repeat;
  opacity: 0.5;
  z-index: -1;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--green-dark); outline-offset: 2px; }

h1 { font-size: 1.4rem; font-weight: 600; margin: 0; }
p { margin: 0; }

.panel {
  max-width: 440px;
  margin: 0 auto;
  padding: 32px 0 48px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.brand img { display: block; margin: 8px auto; }

.filled-button {
  display: inline-block;
  align-self: center;
  border: 0;
  cursor: pointer;
  font: inherit;
  background-color: var(--green);
  color: #fff;
  font-size: 13px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 12px 30px;
  border-radius: 30px;
  transition: background-color 0.3s, color 0.3s;
}
.filled-button:hover { background-color: #fff; color: var(--green-dark); text-decoration: none; }

.link-button {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.link-button:hover { text-decoration: underline; }

.form-control {
  display: block;
  width: 100%;
  padding: 0.55rem 1.1rem;
  font: inherit;
  font-size: 1rem;
  color: #495057;
  background-color: #fff;
  border: 1px solid #ced4da;
  border-radius: 3rem;
}

.stack { display: flex; flex-direction: column; gap: 10px; text-align: left; }
.stack label { font-weight: 600; font-size: 0.9rem; padding-left: 1.1rem; }
.cf-turnstile { align-self: center; min-height: 65px; }

.invite-input, .code-input { text-align: center; font-size: 1.4rem; letter-spacing: 0.3em; font-variant-numeric: tabular-nums; }
.invite-input { max-width: 300px; align-self: center; }
.invite-input::placeholder, .code-input::placeholder { letter-spacing: normal; }

.hint { font-size: 0.86rem; color: var(--muted); }
.status { min-height: 1.5em; text-align: center; }
.error { color: var(--error); background: var(--error-bg); border-radius: 10px; padding: 8px 12px; }
.warning { color: var(--warn); }
.footer-links { font-size: 0.9rem; color: var(--muted); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Homepage */
.home .logo { margin: 40px 0 60px; }
.option {
  display: block;
  color: #000;
  width: 90%;
  max-width: 500px;
  background-color: var(--card);
  padding: 20px;
  margin: 15px auto;
  font-size: 1.2em;
  border-radius: 12px;
  transition: background-color 0.2s ease;
}
.option:hover { background-color: #fff; text-decoration: none; }

/* Receiver */
.invite-label { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.invite-code { font-size: 2.6rem; font-weight: 600; letter-spacing: 0.25em; font-variant-numeric: tabular-nums; }
.result { display: flex; flex-direction: column; gap: 8px; }
.joined { font-size: 1.15rem; font-weight: 600; }
.joined a { text-decoration: underline; }
.callers { list-style: none; padding: 0; margin: 0; }

/* Caller: who you're signed in as */
.who { min-height: 1.5em; }
.who strong { color: var(--ink); }
.who a { text-decoration: underline; }
.actions { display: flex; justify-content: center; }
.actions[hidden] { display: none; }
.verified-at { font-size: 0.86rem; color: var(--muted); }
