/* Site-owned styles, loaded after /ui/counter-ui.css (see shell.ts § stylesheets) — this file
   only adds rules, it never needs to fight counter-ui.css's cascade. */

.attendance-widget {
  text-align: center;
}

.attendance-count-label {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.attendance-display {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0.75rem;
  margin: 0 auto;
}

/* Large tap targets on purpose — this is used one-handed, on a phone, in low light, at a fast
   pace. Anything smaller than ~3rem is easy to miss and easy to double-tap by accident, which is
   the exact failure mode the correction controls exist to fix. */
.attendance-count {
  width: 6.5rem;
  font: inherit;
  font-size: 2.75rem;
  font-weight: 700;
  text-align: center;
  padding: 0.25rem 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--fg);
  -moz-appearance: textfield;
}

.attendance-count::-webkit-outer-spin-button,
.attendance-count::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

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

.att-adjust {
  min-width: 4.5rem;
  font-size: 1.15rem;
  font-weight: 700;
  border-radius: var(--radius);
}

.att-adjust.primary {
  min-width: 7rem;
}

/* Capacity warning colors — literal values, not shared --danger/--warning tokens, since only
   this site's capacity feature uses an amber "approaching" state (counter-ui.css only defines
   danger/success). Applied to both the count field and the status line so the warning is visible
   whether you're looking at the number or the text next to it. */
.attendance-count.att-warn {
  border-color: #b45309;
  background: #fef3e2;
  color: #7c3a05;
}

.attendance-count.att-over {
  border-color: var(--danger);
  background: var(--danger-bg);
  color: var(--danger);
}

.att-capacity-status {
  min-height: 1.2em;
  margin: 0.75rem 0 0;
  font-weight: 600;
}

.att-capacity-status.att-warn {
  color: #b45309;
}

.att-capacity-status.att-over {
  color: var(--danger);
}

@media (prefers-color-scheme: dark) {
  .attendance-count.att-warn {
    border-color: #d99a3d;
    background: #3a2a10;
    color: #f5c37a;
  }

  .att-capacity-status.att-warn {
    color: #f5c37a;
  }
}

.att-capacity-field {
  max-width: 12rem;
  margin: 1.25rem auto 0;
  text-align: left;
}

.attendance-saved-note,
.attendance-wakelock-note {
  margin: 0.9rem 0 0;
  font-size: 0.8rem;
}

.att-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.att-reset,
.att-copy-summary {
  font-size: 0.85rem;
}

.att-summary-status {
  margin: 0.6rem 0 0;
  font-size: 0.85rem;
}

.att-summary-text {
  display: block;
  width: 100%;
  max-width: 28rem;
  margin: 0.75rem auto 0;
  min-height: 6rem;
  font: inherit;
  font-size: 0.85rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--fg);
}

@media (max-width: 420px) {
  .attendance-display {
    flex-wrap: wrap;
  }
}
