/* GenCon Map — minimal, mobile-first. No framework. */

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  color: #1a1a1a;
  background: #f4f4f2;
}

/* ---- Header --------------------------------------------------------------- */
header {
  background: #2c3e50;
  color: #fff;
  padding: 1rem;
  text-align: center;
}

header h1 {
  margin: 0;
  font-size: 1.6rem;
}

header .tagline {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  opacity: 0.85;
}

/* ---- Layout: stacked on narrow, side-by-side on wide ---------------------- */
main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

main h2 {
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
  border-bottom: 2px solid #2c3e50;
  padding-bottom: 0.25rem;
}

#map {
  width: 100%;
  border-radius: 4px;
}

/* ---- Schedule ------------------------------------------------------------- */
.empty-state {
  color: #777;
  font-style: italic;
  padding: 1rem;
  background: #fff;
  border: 1px dashed #ccc;
  border-radius: 4px;
}

.day-heading {
  font-size: 1rem;
  margin: 1rem 0 0.5rem;
  color: #2c3e50;
}

.event-card {
  background: #fff;
  border: 1px solid #ddd;
  border-left: 4px solid #2c3e50;
  border-radius: 4px;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
}

.event-card h4 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

.event-meta {
  margin: 0;
  font-size: 0.85rem;
  color: #555;
}

.event-desc {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
}

/* ---- Now / Next status banner --------------------------------------------- */
.now-next-card {
  background: #eaf1f6;
  border: 1px solid #c4d4df;
  border-radius: 4px;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #2c3e50;
}

/* [hidden] alone loses to the rule above on some renderers — be explicit. */
.now-next-card[hidden] {
  display: none;
}

/* Event-card highlights — these follow .event-card so they win the cascade. */
.event-card--current {
  border-left-color: #e74c3c;
  background: #fff5f4;
}

.event-card--next {
  border-left-color: #e8b04b;
}

/* ---- Time-override test panel --------------------------------------------- */
.test-toggle {
  position: fixed;
  bottom: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid #ccc;
  background: #fff;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  z-index: 2000;
}

.test-toggle--active {
  background: #2c3e50;
}

.test-panel {
  position: fixed;
  bottom: 70px;
  right: 16px;
  width: 280px;
  max-width: calc(100vw - 32px);
  max-height: 70vh;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  padding: 0.75rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* [hidden] alone loses to display:flex above — be explicit. */
.test-panel[hidden] {
  display: none;
}

.test-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.test-panel__title {
  font-weight: 600;
  font-size: 0.9rem;
  color: #2c3e50;
}

.test-panel__close {
  border: none;
  background: none;
  font-size: 0.9rem;
  cursor: pointer;
  color: #777;
}

.test-panel__status {
  margin: 0;
  font-size: 0.8rem;
  color: #555;
  background: #f4f4f2;
  padding: 0.4rem 0.5rem;
  border-radius: 4px;
}

.test-panel__presets {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.test-panel__preset {
  text-align: left;
  padding: 0.4rem 0.5rem;
  font-size: 0.8rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
}

.test-panel__preset:hover {
  background: #f4f4f2;
}

.test-panel__custom {
  display: flex;
  gap: 0.35rem;
}

.test-panel__input {
  flex: 1;
  min-width: 0;
  font-size: 0.8rem;
  padding: 0.3rem;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.test-panel__apply {
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
  border: 1px solid #2c3e50;
  background: #2c3e50;
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
}

.test-panel__live {
  padding: 0.45rem;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid #c4d4df;
  background: #eaf1f6;
  color: #2c3e50;
  border-radius: 4px;
  cursor: pointer;
}

/* ---- Footer --------------------------------------------------------------- */
footer {
  text-align: center;
  padding: 1rem;
  font-size: 0.85rem;
  color: #777;
}

footer a {
  color: #2c3e50;
}

/* ---- Wide viewports: schedule and map side-by-side ------------------------ */
@media (min-width: 768px) {
  main {
    flex-direction: row;
    align-items: flex-start;
  }

  #schedule-panel,
  #map-panel {
    flex: 1;
  }

  #map-panel {
    position: sticky;
    top: 1rem;
  }

  #map {
    height: 600px !important;
  }
}
