/* Swole Patrol styles. Colours follow the phone's light or dark setting. */

:root {
  color-scheme: light dark;
  --bg: #f4f4f1;
  --text: #16181b;
  --muted: #5f646b;
  --field-bg: #ffffff;
  --border: #c9cbc6;
  --accent: #b86a00;      /* buttons; dark enough for white text */
  --accent-text: #ffffff;
  --error: #b3261e;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16181b;
    --text: #f1f1ee;
    --muted: #a3a7ad;
    --field-bg: #22252a;
    --border: #3b3f45;
    --accent: #f5a623;
    --accent-text: #16181b;
    --error: #ff8a80;
  }
}

*, *::before, *::after {
  box-sizing: border-box; /* widths include padding, so nothing overflows */
}

[hidden] {
  display: none !important;
}

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.4;
  -webkit-text-size-adjust: 100%;
}

main {
  width: 100%;
  max-width: 28rem;
  margin: 0 auto;
  padding: 2rem 1.25rem;
}

h1 {
  font-size: 1.75rem;
  margin: 0 0 1.5rem;
}

p {
  margin: 0 0 0.75rem;
  overflow-wrap: anywhere; /* long emails wrap instead of widening the page */
}

.small {
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}

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

form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-weight: 600;
}

/* 16px or larger, so iOS does not zoom in when a field is tapped. */
input,
button {
  font: inherit;
  font-size: 17px;
  width: 100%;
  min-height: 2.9rem;
  border-radius: 0.6rem;
}

input {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  background: var(--field-bg);
  color: var(--text);
}

input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

button {
  border: 0;
  padding: 0.7rem 1rem;
  font-weight: 700;
  background: var(--accent);
  color: var(--accent-text);
  cursor: pointer;
}

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

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