/* ============================================================
   auth-demo.css — /projects/auth-demo only.
   Loaded after base.css and project.css.
   ============================================================ */

.app { padding: var(--s6); }

/* ---- Login view ------------------------------------------ */

.login-view { text-align: center; padding: var(--s5) 0; }

/* Google's mark needs to sit next to the label */
.btn--google {
  display: inline-flex;
  align-items: center;
  gap: var(--s3);
  font-size: var(--text-sm);
  padding: var(--s4) var(--s6);
}

.btn--google svg { flex-shrink: 0; }

/* Keep Google's brand colors on hover instead of tinting them orange */
.btn--google:hover svg path { fill: currentColor; }

.login-note {
  font-size: 0.875rem;
  color: var(--ink-soft);
  max-width: 42ch;
  margin: var(--s5) auto 0;
}

/* ---- Dashboard ------------------------------------------- */

/* Hidden until sign-in. The script flips this to block. */
.dashboard { display: none; }

.user-profile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  flex-wrap: wrap;
  padding-bottom: var(--s4);
  margin-bottom: var(--s5);
  border-bottom: var(--border) solid var(--line);
}

.user-identity {
  display: flex;
  align-items: center;
  gap: var(--s3);
}

.user-identity img {
  width: 42px;
  height: 42px;
  border: var(--border) solid var(--line);
  object-fit: cover;
}

.user-name { font-weight: 700; font-size: 0.95rem; }

.signout {
  font-family: var(--mono);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  border-bottom: var(--border) solid var(--line-soft);
  padding-bottom: 2px;
}
.signout:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ---- Counter --------------------------------------------- */

.counter-wrapper {
  text-align: center;
  padding: var(--s6) var(--s4);
  border: var(--border) solid var(--line);
  background: var(--bg);
  margin-bottom: var(--s5);
  transition: transform 0.1s ease;
}

/* The script adds .pop on each click for a quick nudge. */
.counter-wrapper.pop { transform: scale(1.03); }

.counter-display {
  font-family: var(--mono);
  font-size: clamp(3rem, 12vw, 5rem);
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.counter-label {
  font-family: var(--mono);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
  margin-top: var(--s3);
}

/* ---- Controls -------------------------------------------- */

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  justify-content: center;
}

.controls .btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
}

.controls .btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  background: transparent;
  border-color: var(--line-soft);
  color: var(--ink-faint);
}

/* Spinner shown while a save is in flight. Hidden by default; the script
   flips it to inline-block. */
.spinner {
  display: none;
  width: 12px;
  height: 12px;
  border: 2px solid var(--line-soft);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Status ---------------------------------------------- */

/* Reserve the line's height so the layout doesn't jump when it appears. */
.status-msg {
  min-height: 1.5em;
  margin-top: var(--s5);
  text-align: center;
  font-family: var(--mono);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.status-msg.show { opacity: 1; }
