/* ============================================================
   Endurance page — Windows 98 / MS Word 97 / Publisher aesthetic
   Comic Sans, thick borders, WordArt, raised buttons, sticky notes
   ============================================================ */

.enduro {
  font-family: 'Comic Sans MS', 'Comic Sans', cursive;
  background: #FFFFFF;
  max-width: 860px;
  margin: 0 auto;
  padding: 0.5rem 1rem 3rem;
  color: #000000;
}

/* ─── Staff banner ───────────────────────────────────────── */
.enduro__staff-banner {
  background: repeating-linear-gradient(
    -45deg, #FFD700 0 18px, #000 18px 20px
  );
  color: #000;
  text-align: center;
  font-weight: 900;
  font-size: 0.85rem;
  padding: 0.5rem;
  margin-bottom: 0.75rem;
  border: 3px solid #000;
  letter-spacing: 0.12em;
}

/* ─── Flash messages ─────────────────────────────────────── */
.enduro__messages { margin-bottom: 0.75rem; }
.enduro__message {
  padding: 0.6rem 1rem;
  border: 2px solid;
  margin-bottom: 0.4rem;
  font-weight: bold;
  font-size: 0.95rem;
}
.enduro__message--success { background: #CCFFCC; border-color: #006600; color: #003300; }
.enduro__message--error   { background: #FFCCCC; border-color: #CC0000; color: #660000; }
.enduro__message--info    { background: #FFFFCC; border-color: #CC9900; color: #333300; }

/* ─── Poster frame ───────────────────────────────────────── */
.enduro__hero {
  border: 5px solid #000080;
  background: #000080;
  padding: 4px;
  box-shadow: 5px 5px 0 #000;
  margin-bottom: 0;
  /* override dark-theme leftovers */
  min-height: unset;
  display: block;
  align-items: unset;
}

.enduro__hero-poster {
  display: block;
  width: 100%;
  height: auto;
  position: static;
  object-fit: unset;
}

/* no-ops from old design */
.enduro__hero::after,
.enduro__hero-scanlines,
.enduro__hero-overlay,
.enduro__hero-label,
.enduro__hero-summary { display: none !important; }

/* ─── Event header (below poster) ────────────────────────── */
.enduro__event-header {
  text-align: center;
  padding: 1rem 1rem 0.75rem;
  border: 5px solid #000080;
  border-top: none;
  background: #FFFFFF;
  margin-bottom: 1.25rem;
  box-shadow: 5px 5px 0 #000;
}

.enduro__hero-title {
  font-family: 'Comic Sans MS', cursive;
  font-size: clamp(1.3rem, 3.5vw, 2.1rem);
  font-weight: 900;
  text-transform: uppercase;
  margin: 0 0 0.6rem;
  color: #000080;
  text-shadow:
     2px  2px 0 #FFD700,
     3px  3px 0 #FF6600,
    -1px -1px 0 #FFFFFF;
  letter-spacing: 0.03em;
}

.enduro__hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.enduro__chip {
  font-family: 'Comic Sans MS', cursive;
  font-size: 0.88rem;
  font-weight: bold;
  padding: 0.2rem 0.7rem;
  border: 2px solid;
}
.enduro__chip--car   { background: #FFD700; color: #000;    border-color: #996600; }
.enduro__chip--track { background: #CCFFCC; color: #004400; border-color: #006600; }
.enduro__chip--date  { background: #DDEEFF; color: #000080; border-color: #0000AA; }

/* ─── Windows 98 dialog box ──────────────────────────────── */
.enduro__win98 {
  border: 2px outset #C0C0C0;
  background: #C0C0C0;
  margin-bottom: 1.25rem;
  box-shadow: 3px 3px 0 #000;
}
.enduro__win98-titlebar {
  background: linear-gradient(to right, #000080 0%, #1084D0 100%);
  color: #FFFFFF;
  font-family: 'Comic Sans MS', cursive;
  font-weight: bold;
  font-size: 0.9rem;
  padding: 0.25rem 0.6rem;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.enduro__win98-body {
  padding: 0.75rem;
}

/* ─── CTA panel (inside dialog) ──────────────────────────── */
.enduro__cta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  position: static;
  overflow: visible;
}
.enduro__cta::before { display: none; }

.enduro__cta-status {
  background: #FFFFFF;
  border: 2px inset #999;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.enduro__cta-count {
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
  flex-wrap: wrap;
}
.enduro__cta-count-num {
  font-size: 2.4rem;
  font-weight: 900;
  color: #CC0000;
  line-height: 1;
}
.enduro__cta-count-sep,
.enduro__cta-count-tot {
  font-size: 1.6rem;
  font-weight: 900;
  color: #000;
}
.enduro__cta-count-label {
  font-size: 0.82rem;
  font-weight: bold;
  color: #444;
  width: 100%;
}

.enduro__grid-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  max-width: 260px;
}
.enduro__flag {
  display: inline-block;
  width: 12px;
  height: 12px;
  background: #FFFFFF;
  border: 1px solid #999;
}
.enduro__flag--filled {
  background: #CC0000;
  border-color: #880000;
}

.enduro__cta-action {
  background: #C0C0C0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.5rem;
  align-items: center;
  text-align: center;
  padding: 0.5rem;
}

/* ─── Buttons ────────────────────────────────────────────── */
.enduro__btn {
  display: inline-block;
  font-family: 'Comic Sans MS', cursive;
  font-size: 0.92rem;
  font-weight: bold;
  padding: 0.4rem 1.1rem;
  border: 2px outset #C0C0C0;
  background: #C0C0C0;
  color: #000;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  min-width: 110px;
  transition: none;
  box-shadow: none;
  border-radius: 0;
}
.enduro__btn:hover { background: #D4D0C8; color: #000; transform: none; box-shadow: none; }
.enduro__btn:active { border-style: inset; }

.enduro__btn--primary {
  background: #000080;
  color: #FFFF00;
  border: 2px outset #6666AA;
  font-size: 1rem;
  padding: 0.55rem 1.4rem;
  letter-spacing: 0.02em;
}
.enduro__btn--primary:hover { background: #0000AA; color: #FFFF00; }

.enduro__btn--ghost {
  background: #C0C0C0;
  color: #000;
  border: 2px outset #C0C0C0;
}

.enduro__btn--disabled {
  background: #C0C0C0;
  color: #666;
  border: 2px inset #999;
  cursor: not-allowed;
  font-style: italic;
}
.enduro__btn--disabled:hover {
  background: #C0C0C0;
  color: #666;
  transform: none;
  box-shadow: none;
}

.enduro__btn--staff {
  background: #C0C0C0;
  color: #000080;
  border: 2px outset #C0C0C0;
  font-size: 0.85rem;
  padding: 0.3rem 0.8rem;
}
.enduro__btn--staff:hover { background: #D4D0C8; color: #000080; box-shadow: none; }

.enduro__cta-help {
  font-size: 0.78rem;
  color: #333;
  font-style: italic;
  margin: 0;
  text-align: center;
}
.enduro__cta-help code {
  font-family: 'Courier New', monospace;
  background: #FFFFCC;
  border: 1px solid #999;
  padding: 1px 4px;
}

/* Registered card */
.enduro__registered-card {
  border: 3px solid #006600;
  background: #CCFFCC;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}
.enduro__registered-headline {
  font-size: 1.2rem;
  font-weight: 900;
  color: #004400;
}
.enduro__registered-details {
  font-size: 0.9rem;
  color: #333;
}

/* Staff strip at bottom of dialog */
.enduro__cta-staff {
  grid-column: 1 / -1;
  border-top: 2px solid #999;
  padding-top: 0.6rem;
  text-align: center;
  margin-top: 0.25rem;
}

/* ─── Section divider ────────────────────────────────────── */
.enduro__divider {
  border: none;
  border-top: 3px double #000080;
  border-bottom: 1px solid #CC0000;
  margin: 1rem 0;
}

/* ─── Deadlines ──────────────────────────────────────────── */
.enduro__deadlines {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.enduro__deadline {
  background: #FFFFC0;
  border: 3px solid #CC9900;
  padding: 0.75rem 1rem;
  box-shadow: 3px 3px 0 #996600;
}
.enduro__deadline-label {
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  color: #666;
  letter-spacing: 0.12em;
  margin-bottom: 0.25rem;
}
.enduro__deadline-value {
  font-weight: 900;
  color: #CC0000;
  font-size: 0.95rem;
}

/* ─── Info HTML (Word document style) ───────────────────── */
.enduro__info {
  background: #FFFFFF;
  border: 3px solid #000080;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 4px 4px 0 #000080;
  line-height: 1.65;
}

.enduro__info h1,
.enduro__info h2,
.enduro__info h3 {
  font-family: 'Comic Sans MS', cursive;
  font-weight: 900;
  margin-top: 1.3em;
  margin-bottom: 0.4em;
}
.enduro__info h2 {
  font-size: 1.1rem;
  color: #CC0000;
  border-bottom: 2px double #CC0000;
  padding-bottom: 0.2em;
}
.enduro__info h3 {
  font-size: 1rem;
  color: #000080;
  text-decoration: underline;
}

.enduro__info a { color: #0000CC; font-weight: bold; }
.enduro__info a:hover { color: #CC0000; }

.enduro__info table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.75rem 0;
  font-size: 0.92rem;
}
.enduro__info table th,
.enduro__info table td {
  border: 2px solid #000080;
  padding: 0.35rem 0.6rem;
  text-align: left;
}
.enduro__info table th {
  background: #000080;
  color: #FFFFFF;
  font-weight: bold;
}
.enduro__info table tr:nth-child(even) td {
  background: #DDEEFF;
}

.enduro__info ul {
  padding-left: 1.5rem;
}
.enduro__info ul li {
  margin-bottom: 0.3rem;
  list-style-type: "✔ ";
}

.enduro__info code {
  font-family: 'Courier New', monospace;
  background: #FFFFCC;
  border: 1px solid #999;
  padding: 1px 4px;
}

/* ─── Section heading used above info block ─────────────── */
.enduro__section-heading {
  background: #000080;
  color: #FFFF00;
  font-family: 'Comic Sans MS', cursive;
  font-weight: 900;
  font-size: 1rem;
  padding: 0.35rem 0.75rem;
  margin-bottom: 0;
  letter-spacing: 0.06em;
  box-shadow: 3px 3px 0 #000;
}

/* ─── Bottom link buttons ────────────────────────────────── */
.enduro__links {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}
.enduro__linkbtn {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  border: 2px outset #C0C0C0;
  background: #C0C0C0;
  color: #000;
  text-decoration: none;
  font-family: 'Comic Sans MS', cursive;
  font-weight: bold;
  font-size: 0.88rem;
  transition: none;
}
.enduro__linkbtn:hover {
  background: #D4D0C8;
  color: #000;
  border-color: #C0C0C0;
}

/* ─── Empty state ────────────────────────────────────────── */
.enduro--empty {
  text-align: center;
  padding: 3rem 1rem;
  background: #FFFFFF;
  border: 3px solid #000080;
  box-shadow: 4px 4px 0 #000080;
}
.enduro--empty .enduro__hero-title {
  color: #000080;
}

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 580px) {
  .enduro__cta { grid-template-columns: 1fr; }
  .enduro__cta-staff { grid-column: 1; }
}
