/*
 * Gluski Park Donor Heatmap
 */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Open Sans', sans-serif;
  background: #fff;
  color: #333;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ────────────────────────────────────────────────── */
.site-header {
  background: #1a1a1a;
  border-bottom: 3px solid #4a6428;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 108px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  text-decoration: none;
  display: flex;
  align-items: center;
}

.header-logo {
  height: 66px;
  width: auto;
  display: block;
}

.header-campaign {
  display: flex;
  gap: 32px;
  align-items: center;
}

.campaign-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.campaign-number {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.2rem;
  line-height: 1;
  letter-spacing: 0.02em;
}

.campaign-number--outline {
  color: transparent;
  -webkit-text-stroke: 2px #8ab44a;
}

.campaign-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.7);
  margin-top: 2px;
  font-weight: 600;
}

.site-nav a {
  color: #ccc;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 6px 14px;
  border: 1px solid #3a3a3a;
  border-radius: 3px;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.site-nav a:hover {
  color: #fff;
  border-color: #4a6428;
  background: #4a6428;
}

/* ── Stats bar ─────────────────────────────────────────────── */
.stats-bar {
  background: #3d4a28;
  display: flex;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}

.stat {
  padding: 32px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 160px;
}

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  letter-spacing: -0.01em;
}

.stat-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.7);
  margin-top: 8px;
  font-weight: 600;
  text-align: center;
}

/* ── Main content ──────────────────────────────────────────── */
main {
  flex: 1;
}

.heatmap-section {
  padding: 32px 0 48px;
  background: #fff;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Thermometer ───────────────────────────────────────────── */
.thermometer-wrap {
  background: #2a3318;
  padding: 14px 24px 10px;
  flex-shrink: 0;
}

.thermometer-track {
  position: relative;
  height: 18px;
  background: rgba(255,255,255,0.15);
  border-radius: 9px;
  overflow: visible;
}

.thermometer-fill {
  height: 100%;
  background: linear-gradient(90deg, #4a7a28 0%, #8ab44a 100%);
  border-radius: 9px;
  transition: width 0.6s ease;
}

.thermometer-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

.thermometer-amount {
  background: #fff;
  color: #2a3318;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 3px;
  white-space: nowrap;
  margin-top: 24px;
}

.thermometer-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.6);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.thermometer-pct {
  color: #8ab44a;
}

/* ── Chart ─────────────────────────────────────────────────── */
.chart-wrap {
  background: #2a3318;
  padding: 24px 28px;
  flex-shrink: 0;
  height: 280px;
}

/* ── Map ───────────────────────────────────────────────────── */
#map {
  width: 100%;
  overflow: hidden;
  border-top: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
}

/* ── Empty state ───────────────────────────────────────────── */
.empty-notice {
  margin-top: 20px;
  padding: 16px 20px;
  background: #f5f5f5;
  border-left: 4px solid #4a6428;
  border-radius: 3px;
  color: #555;
  font-size: 0.9rem;
}

/* ── Footer ────────────────────────────────────────────────── */
.site-footer {
  background: #1a1a1a;
  border-top: 3px solid #4a6428;
  padding: 20px 24px;
  margin-top: auto;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.site-footer p {
  color: #999;
  font-size: 0.8rem;
}

.site-footer a {
  color: #8ab44a;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* ── Admin ─────────────────────────────────────────────────── */
.admin-wrap {
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
  padding: 40px 24px;
}

.admin-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-top: 4px solid #3d4a28;
  border-radius: 6px;
  padding: 36px 40px;
  width: 100%;
  max-width: 460px;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.admin-card h1 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 24px;
}

.admin-header h1 { margin-bottom: 0; }

.admin-signout {
  font-size: 0.8rem;
  color: #888;
  text-decoration: none;
}
.admin-signout:hover { color: #333; }

.admin-section h2 {
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 6px;
}

.admin-hint {
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 16px;
}

.admin-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.admin-field label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #444;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-field input {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
  width: 100%;
}

.admin-field input:focus {
  outline: none;
  border-color: #3d4a28;
}

.admin-totals {
  display: flex;
  gap: 20px;
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 16px;
}

.admin-card input[type="submit"] {
  background: #3d4a28;
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.admin-card input[type="submit"]:hover { background: #4a6428; }

.admin-notice {
  background: #f0f7e8;
  border-left: 3px solid #3d4a28;
  padding: 10px 14px;
  font-size: 0.85rem;
  color: #3d4a28;
  border-radius: 3px;
  margin-bottom: 20px;
}

.admin-alert {
  background: #fff0f0;
  border-left: 3px solid #cc0000;
  padding: 10px 14px;
  font-size: 0.85rem;
  color: #cc0000;
  border-radius: 3px;
  margin-bottom: 20px;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 600px) {
  .stat {
    padding: 20px 24px;
    min-width: unset;
  }

  .stat-number {
    font-size: 2.2rem;
  }
}
