/* app.linetappy.com: the same colours as linetappy.com and the app (brand blue #2B7BD6, signal red #E23A2E), light and dark. */
:root {
  --page: #f6f8fb;
  --surface: #ffffff;
  --ink: #15202b;
  --muted: #5b6776;
  --line: #dde3ea;
  --link: #2b7bd6;
  --accent: #e23a2e;
  --good: #1e9e5a;
  --tile: #eef3f8;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #0e1117;
    --surface: #161e28;
    --ink: #e7ecf2;
    --muted: #9aa6b4;
    --line: #26303c;
    --link: #7db4f0;
    --good: #4cc98a;
    --tile: #1c2633;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  overflow-wrap: anywhere;
  background: var(--page);
  color: var(--ink);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

a { color: var(--link); }
h1 { font-size: 26px; margin: 0 0 4px; line-height: 1.25; }
h2 { font-size: 20px; margin: 0 0 8px; }
h3 { font-size: 18px; margin: 0; }
p { margin: 8px 0; }

.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.center { text-align: center; }
.loading-line { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 48px 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.loading { text-align: center; color: #5b6776; padding: 80px 16px; font: 16px system-ui, sans-serif; }

header.site { border-bottom: 1px solid var(--line); background: var(--surface); }
header.site .wrap { display: flex; align-items: center; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; color: var(--ink); text-decoration: none; }
.brand img { width: 32px; height: 32px; }

main.wrap { padding-top: 24px; padding-bottom: 32px; }

footer.site { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; padding: 16px 0 32px; }
footer.site a { margin-right: 16px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
}
.card.narrow { max-width: 480px; margin-left: auto; margin-right: auto; }
.card.quiet { background: transparent; border-style: dashed; }

.row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }

label { display: block; margin: 12px 0; font-weight: 600; }
input[type=email], input[type=password], input:not([type]), select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  font: inherit;
  color: var(--ink);
  background: var(--page);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.row label select { display: inline-block; width: auto; margin: 0 6px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  font: 600 16px/1.2 inherit;
  font-family: inherit;
  color: #fff;
  background: var(--link);
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
}
form .button, .narrow > .button, .button.wide { width: 100%; margin-top: 8px; }
.button:disabled { opacity: 0.5; cursor: default; }
.button.secondary { background: var(--tile); color: var(--ink); }
.button.google { background: var(--surface); color: var(--ink); border: 1px solid var(--line); width: 100%; margin-top: 12px; }
.button.google img { width: 18px; height: 18px; }
.button.danger { background: var(--accent); }

.link { background: none; border: 0; padding: 4px 0; font: inherit; color: var(--link); cursor: pointer; text-decoration: underline; }
.link.danger { color: var(--accent); }
.links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 16px; }

.or { display: flex; align-items: center; gap: 12px; color: var(--muted); margin: 16px 0 4px; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }

.error { color: var(--accent); }
.notice { color: var(--good); }
.banner { background: var(--tile); border-radius: 12px; padding: 12px 16px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.badge { padding: 4px 12px; border-radius: 999px; background: var(--tile); color: var(--muted); font-weight: 600; font-size: 14px; }
.badge.good { background: color-mix(in srgb, var(--good) 18%, transparent); color: var(--good); }
.badge.bad { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.plan-line { font-size: 18px; }

.usage { display: flex; gap: 32px; margin: 12px 0 0; }
.usage dt { color: var(--muted); font-size: 14px; }
.usage dd { margin: 0; font-size: 20px; font-weight: 700; }

.toggle { display: inline-flex; background: var(--tile); border-radius: 999px; padding: 3px; }
.toggle button { border: 0; background: none; font: inherit; color: var(--ink); padding: 6px 14px; border-radius: 999px; cursor: pointer; }
.toggle button.on { background: var(--link); color: #fff; }
.toggle small { opacity: 0.85; }

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 12px 0; }
.plan { border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.plan .price { font-size: 22px; font-weight: 700; margin: 4px 0; }
.plan .button { margin-top: auto; }

.doc-links { display: grid; gap: 10px; margin: 16px 0; }
.doc-link { display: flex; justify-content: space-between; padding: 14px 16px; border-radius: 12px; background: var(--tile); text-decoration: none; font-weight: 600; }

.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin: 16px 0; }
.check input { width: 20px; height: 20px; margin-top: 2px; flex: none; }

.points { padding-left: 20px; }
.points li { margin: 10px 0; }
.points li.warning { border: 2px solid var(--accent); border-radius: 12px; padding: 10px 12px; list-style-position: inside; margin-left: -20px; }
.points li.warning strong { color: var(--accent); }

.number-list { display: grid; gap: 4px; margin: 12px 0; }
.check.number { margin: 6px 0; }
.check.number .badge { margin-left: 8px; font-size: 12px; padding: 2px 8px; }
.number-setup { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.number-setup h2 { margin-bottom: 4px; }
fieldset { border: 0; padding: 0; margin: 12px 0; }
fieldset:disabled { opacity: 0.6; }
legend { font-weight: 600; margin-bottom: 4px; }
.radio { display: flex; gap: 10px; align-items: center; font-weight: 400; margin: 6px 0; }
.radio input { width: 18px; height: 18px; }

.danger-zone { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; }

/* A small spinner inside a busy button. */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex: none;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2s; } }

.problem { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin: 12px 0;
  padding: 10px 14px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 12%, transparent); }
.problem p { margin: 0; color: var(--accent); }

#blazor-error-ui {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 16px;
  background: #fdecea;
  color: #15202b;
  box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
  z-index: 1000;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 16px; top: 10px; }
