/* Settings page — cards, action buttons, and color swatches.
   Complements legal.css (page layout/typography) and style.css (theme vars). */

.settings-page {
  max-width: 40rem;
}

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

.account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.account-name {
  font-size: 1.05rem;
  font-weight: 600;
}

.account-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.15rem;
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover {
  background: var(--border);
}

.btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-contrast);
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent);
}

:root {
  --danger: #b3261e;
  --danger-bg: #fce8e6;
}

@media (prefers-color-scheme: dark) {
  :root {
    --danger: #f2b8b5;
    --danger-bg: #3c1a18;
  }
}

.btn-danger {
  background: var(--danger-bg);
  border-color: var(--danger);
  color: var(--danger);
}

.btn-danger:hover {
  background: var(--danger);
  color: var(--surface);
}

.settings-label {
  font-weight: 600;
  margin: 0 0 0.75rem;
}

.settings-note {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0.9rem 0 0;
}

.settings-note a {
  color: var(--accent);
}

/* Failures on this page are things the reader has to act on -- a session that
   expired mid-click, or a revocation Google didn't confirm. Muted grey, the same as
   the explanatory copy, is not the register for that. */
.settings-note.is-error {
  color: var(--danger);
  font-weight: 500;
}

.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.swatch {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
}

.swatch:hover {
  transform: scale(1.08);
}

.swatch.active {
  border-color: var(--text);
}

.swatch:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

dialog {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  max-width: 28rem;
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.4);
}

dialog h3 {
  margin: 0 0 0.5rem;
}

dialog p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 1.25rem;
}
