/* The account's pages: bushati.app's look (apps/site/public/style.css), plus forms. */
:root {
  --bg: #fbfaf7;
  --text: #1d1d1b;
  --muted: #5f5d57;
  --line: #e4e1d9;
  --card: #ffffff;
  --accent: #1f6f5c;
  --on-accent: #ffffff;
  --danger: #b3261e;
  --on-danger: #ffffff;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141413;
    --text: #ecebe6;
    --muted: #a3a19a;
    --line: #2e2d2a;
    --card: #1c1c1a;
    --accent: #6cc4a9;
    --on-accent: #10201b;
    --danger: #f2b8b5;
    --on-danger: #3a0b08;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}

main,
header,
footer {
  max-width: 30rem;
  margin: 0 auto;
  padding: 0 1rem;
}

header {
  padding-top: 1.5rem;
}

header a {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.01em;
}

main {
  padding-bottom: 3rem;
}

footer {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  padding-bottom: 2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

footer a {
  color: var(--muted);
}

h1 {
  font-size: 1.8rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 2.5rem 0 0.5rem;
}

h2 {
  font-size: 1.1rem;
  margin: 2rem 0 0.5rem;
}

p,
ul {
  margin: 0 0 1rem;
}

a {
  color: var(--accent);
}

.lede {
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.muted {
  color: var(--muted);
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin: 1rem 0;
}

.card > :last-child {
  margin-bottom: 0;
}

[hidden] {
  display: none !important;
}

/* Sign in with Google and Apple: their own buttons, one under the other. */
.providers {
  display: grid;
  gap: 0.75rem;
  justify-items: stretch;
  margin: 1rem 0;
}

.providers > div {
  min-height: 44px;
}

/* Google draws its button in a frame of its own, in light colours. Next to the page's dark colours
   the browser would fill that frame with white around the button; light colours here keep it
   see-through. */
.google-button {
  color-scheme: light;
}

.or {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
  margin: 1.25rem 0;
}

.or::before,
.or::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--line);
}

form {
  display: grid;
  gap: 0.9rem;
  margin: 0 0 1rem;
}

label {
  display: grid;
  gap: 0.3rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.hint {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.9rem;
}

input[type="text"],
input[type="email"],
input[type="password"] {
  font: inherit;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  min-height: 44px;
  width: 100%;
}

input:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-weight: 400;
}

.check .hint {
  display: block;
}

.check input {
  width: 1.2rem;
  height: 1.2rem;
  margin-top: 0.2rem;
  accent-color: var(--accent);
  flex: none;
}

button {
  font: inherit;
  font-weight: 600;
  min-height: 44px;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  border: 1px solid transparent;
  background: var(--accent);
  color: var(--on-accent);
  cursor: pointer;
}

button.secondary {
  background: transparent;
  color: var(--accent);
  border-color: var(--line);
}

button.danger {
  background: var(--danger);
  color: var(--on-danger);
}

button.link {
  background: none;
  border: none;
  padding: 0;
  min-height: 0;
  color: var(--accent);
  font-weight: 400;
  text-decoration: underline;
}

button:disabled {
  opacity: 0.6;
  cursor: default;
}

.error {
  color: var(--danger);
  font-weight: 600;
}

.error:empty,
.status:empty {
  display: none;
}

.rows {
  list-style: none;
  padding: 0;
  margin: 0;
}

.rows li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0;
  border-top: 1px solid var(--line);
}

.rows li:first-child {
  border-top: none;
}

.rows .detail {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}

#ready,
#password-confirm {
  margin: 0.5rem 0 1.25rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

/* Continue with Apple, drawn to Apple's guidelines: black, or white on dark backgrounds. */
button.apple {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  max-width: 400px;
  background: #000000;
  color: #ffffff;
  border-radius: 6px;
  font-weight: 500;
}

button.apple svg {
  width: 1rem;
  height: 1.2rem;
  fill: currentColor;
}

@media (prefers-color-scheme: dark) {
  button.apple {
    background: #ffffff;
    color: #000000;
  }
}
