/* ── Map Vote page ──────────────────────────────────────────────────────── */
/* .vote-back-link lives in style.css since it's shared with index.html's topbar link. */

#vote-signin {
  display: flex;
  justify-content: center;
  padding: 48px 20px;
}
.vote-signin-card {
  background: var(--bg);
  border: 0.5px solid var(--border2);
  border-radius: var(--radius);
  padding: 28px 32px;
  width: min(360px, 100%);
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  box-sizing: border-box;
}

#vote-content {
  padding: 20px 24px 32px;
}

.vote-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.vote-window-label {
  font-size: 11px;
  color: var(--text2);
}

.vote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.map-card {
  position: relative;
  background: var(--bg2);
  border: 0.5px solid var(--border2);
  border-radius: var(--radius);
  padding: 16px;
  padding-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}

.map-card-vote-bar-track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: var(--bg3);
}
.map-card-vote-bar-fill {
  height: 100%;
  background: #3ddc5c;
  box-shadow: 0 0 6px rgba(61, 220, 92, 0.6);
}
/* Recently played (per the admin's "exclude last N played maps" setting) —
   still shows relative vote strength, but greyed out to signal it's
   currently benched from the leaderboard rather than just unpopular. */
.map-card-vote-bar-fill.recent {
  background: var(--text2);
  box-shadow: none;
}

.map-card-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.map-card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.map-card-tag {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text2);
  background: var(--bg3);
  border-radius: 4px;
  padding: 2px 6px;
}

.map-card-btn {
  padding: 7px 14px;
  font-size: 13px;
  font-family: var(--font);
  font-weight: 500;
  background: var(--accent-sys);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  align-self: flex-start;
}
.map-card-btn:hover { opacity: 0.88; }

/* Already voted within the last 30 days — dim everything except the vote
   bar itself, so vote strength stays visible while a map is in cooldown. */
.map-card.dimmed .map-card-name,
.map-card.dimmed .map-card-tags,
.map-card.dimmed .map-card-note {
  opacity: 0.55;
}
.map-card.dimmed .map-card-btn {
  background: var(--bg3);
  color: var(--text2);
  cursor: default;
}
.map-card-note {
  font-size: 11px;
  color: var(--text2);
}

/* Blocked by admin — still visible, not votable */
.map-card.blocked-map {
  opacity: 0.6;
}
.map-card.blocked-map .map-card-btn {
  display: none;
}
.map-card-blocked-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 32px 12px 12px;
  text-align: center;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.map-card-blocked-note {
  font-size: 10px;
  font-weight: 400;
  font-style: italic;
  text-transform: none;
  letter-spacing: normal;
  color: rgba(255,255,255,0.75);
}

/* ── Admin console ─────────────────────────────────────────────────────── */

#admin-signin, #admin-forbidden {
  display: flex;
  justify-content: center;
  padding: 48px 20px;
}

#admin-content {
  padding: 20px 24px 32px;
}

.admin-section { margin-bottom: 8px; }

.admin-scoring-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 16px;
}

.admin-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.admin-field-group label {
  font-size: 11px;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-btn-group {
  display: flex;
  gap: 6px;
}

.admin-chip {
  padding: 6px 12px;
  font-size: 12px;
  font-family: var(--font);
  cursor: pointer;
  border-radius: 6px;
  border: 0.5px solid var(--border2);
  background: var(--bg2);
  color: var(--text);
}
.admin-chip:hover { background: var(--bg3); }
.admin-chip.active {
  background: var(--accent-sys);
  border-color: var(--accent-sys);
  color: #fff;
}

.admin-input, .admin-input-small {
  padding: 7px 10px;
  font-size: 13px;
  font-family: var(--font);
  background: var(--bg2);
  color: var(--text);
  border: 0.5px solid var(--border2);
  border-radius: 6px;
  outline: none;
}
.admin-input:focus, .admin-input-small:focus { border-color: var(--accent-sys); }
.admin-input-small { width: 110px; }

.admin-add-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.admin-checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text2);
}

.admin-map-status-blocked { color: var(--red); }
.admin-block-note {
  font-size: 11px;
  font-style: italic;
  font-weight: 400;
  color: var(--text2);
  margin-top: 2px;
}
.admin-map-status-active  { color: var(--text2); }

.admin-row-btn {
  padding: 5px 12px;
  font-size: 12px;
  font-family: var(--font);
  font-weight: 500;
  cursor: pointer;
  border-radius: 6px;
  border: 0.5px solid var(--border2);
  background: var(--bg3);
  color: var(--text);
}
.admin-row-btn:hover { background: var(--bg); }

/* Game History — notes icon: muted when a play has no notes yet, red-toned
   and filled once notes exist, so admins can spot annotated plays at a glance. */
.notes-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text2);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.notes-icon-btn:hover { background: var(--bg3); }
.notes-icon-btn.has-notes { color: var(--red); }
