/* ECHO ROAD - CALENDAR PAGE (react-big-calendar agenda view) */

/* ============================================================
   1. HIDE THE TOOLBAR ROW PERMANENTLY
   Covers: Today / Back / Next buttons, the date-range label
   (e.g. 09/25/2026 – 09/22/2036) and the
   Month / Week / Day / Agenda view switcher.
   The rbc stylesheet is injected at runtime, so use !important
   with high specificity to guarantee these stay hidden.
   ============================================================ */
#calendar .rbc-toolbar,
#calendar .rbc-toolbar * {
  display: none !important;
}

/* Remove the toolbar's leftover spacing once it's hidden */
#calendar .rbc-toolbar {
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
}

/* The React Calendar carries an inline height:500px. Grow it to fit the
   agenda content instead, so the venues CTA below never overlaps the
   last calendar entry. (!important overrides the inline style.) */
#calendar .rbc-calendar {
  height: auto !important;
}

/* ============================================================
   2. AGENDA TABLE - THE PRETTY DATA
   ============================================================ */

/* Card-like frame around the whole agenda */
#calendar .rbc-agenda-view {
  background: var(--bg-primary, #111111);
  border: 2px solid var(--border-tan, #C5AB80);
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(58, 43, 34, 0.35);
  overflow: auto;
}

/* Reset rbc's default light styling on both tables (header + body) */
#calendar table.rbc-agenda-table {
  border: none;
  background: transparent;
  color: var(--text-primary, #EAE6DF);
}

/* ---- Table header row (Date / Time / Event) ----
   The gradient lives on the table itself (rule below) so all three
   cells read as ONE continuous bar edge-to-edge; cells stay transparent. */
#calendar .rbc-agenda-view table.rbc-agenda-table thead > tr > th,
#calendar .rbc-agenda-view table.rbc-agenda-table thead > tr > th.rbc-header {
  background: transparent;
  color: #111111;
  font-family: 'Nunito', 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-align: left;
  padding: 12px 16px;
  border: none;
  border-bottom: 2px solid var(--highlight-gold, #D4A359);
}

/* First table sits above the scrollable content: keep it sticky & solid.
   width:100% makes all three header cells together span the full table;
   the one gradient on the table gives a seamless header bar. */
#calendar .rbc-agenda-view > table.rbc-agenda-table {
  position: sticky;
  top: 0;
  z-index: 2;
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  background: linear-gradient(90deg, #d48c5b, #c07b3b);
}

/* Body table spans the full card width too (rbc's base stylesheet is
   not loaded on this page, so nothing else sets this). */
#calendar .rbc-agenda-content > table.rbc-agenda-table {
  width: 100%;
  border-spacing: 0;
}

/* ---- Body rows ---- */
#calendar .rbc-agenda-view table.rbc-agenda-table tbody > tr > td {
  padding: 14px 16px;
  vertical-align: top;
  border-top: 1px solid rgba(197, 171, 128, 0.35);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Remove rbc's default left/right cell dividers, add our own columns */
#calendar .rbc-agenda-view table.rbc-agenda-table tbody > tr > td + td {
  border-left: 1px solid rgba(197, 171, 128, 0.35);
  border-right: none;
}

/* Zebra striping + hover feedback */
#calendar .rbc-agenda-view table.rbc-agenda-table tbody > tr:nth-child(even) {
  background: rgba(197, 171, 128, 0.07);
}

#calendar .rbc-agenda-view table.rbc-agenda-table tbody > tr:hover {
  background: rgba(212, 163, 89, 0.12);
  transition: background 0.2s ease;
}

/* ---- Date column: prominent gold, weekday + date ---- */
#calendar .rbc-agenda-date-cell,
#calendar .rbc-agenda-view table.rbc-agenda-table .rbc-agenda-date-cell {
  color: var(--highlight-gold, #D4A359);
  font-family: 'Merriweather', serif;
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  width: 1%;
  background: rgba(212, 163, 89, 0.06);
}

/* ---- Time column: cream, tabular feel ---- */
#calendar .rbc-agenda-view table.rbc-agenda-table .rbc-agenda-time-cell {
  color: var(--cream-frame, #F4EBD9);
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: none;
  white-space: nowrap;
  width: 1%;
}

/* ---- Event column: venue/title text ---- */
#calendar .rbc-agenda-event-cell {
  width: 100%;
  color: var(--text-primary, #EAE6DF);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* ---- Empty state (no events in range) ---- */
#calendar .rbc-agenda-empty {
  display: block;
  padding: 32px 16px;
  text-align: center;
  color: var(--border-tan, #C5AB80);
  font-style: italic;
}

/* Kill rbc's light-blue "today" highlight - clashes with the dark theme */
#calendar .rbc-today {
  background-color: transparent;
}

/* Safety net: never show a link to the venues page inside the calendar
   (older cached bundles may still render "Where else do we play?").
   The venues page is intentionally not linked from the site menus. */
#calendar a[title="Performances"],
#calendar a[href="venues"] {
  display: none !important;
}

/* ============================================================
   3. RESPONSIVE
   ============================================================ */
@media screen and (max-width: 600px) {
  #calendar .rbc-agenda-view table.rbc-agenda-table thead > tr > th,
  #calendar .rbc-agenda-view table.rbc-agenda-table thead > tr > th.rbc-header {
    font-size: 0.7rem;
    letter-spacing: 1px;
    padding: 10px 8px;
  }

  #calendar .rbc-agenda-view table.rbc-agenda-table tbody > tr > td {
    padding: 10px 8px;
    font-size: 0.85rem;
  }

  #calendar .rbc-agenda-date-cell,
  #calendar .rbc-agenda-time-cell {
    font-size: 0.8rem;
  }
}

/* ============================================================
   4. VENUES CTA - "Where else do we play?" (bottom of page)
   ============================================================ */
.calendar-venues-cta {
  max-width: 640px;
  margin: 6px auto 30px;
  text-align: center;
}

.calendar-venues-cta a {
  display: block;
  padding: 30px 24px;
  background:
    linear-gradient(160deg, rgba(212, 163, 89, 0.10), rgba(212, 163, 89, 0) 55%),
    var(--bg-primary, #111111);
  border: 2px solid var(--border-tan, #C5AB80);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-primary, #EAE6DF);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.calendar-venues-cta a:hover {
  border-color: var(--highlight-gold, #D4A359);
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(212, 163, 89, 0.25);
}

.calendar-venues-cta a:focus {
  border-color: var(--highlight-gold, #D4A359);
  outline: 3px solid rgba(212, 163, 89, 0.45);
  outline-offset: 3px;
}

.calendar-venues-cta .venues-cta-icon {
  display: block;
  color: var(--highlight-gold, #D4A359);
  font-size: 1.9rem;
  margin-bottom: 10px;
  transition: transform 0.3s ease;
}

.calendar-venues-cta a:hover .venues-cta-icon {
  transform: translateY(-3px) scale(1.12);
}

.calendar-venues-cta .venues-cta-title {
  display: block;
  font-family: 'Merriweather', serif;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--highlight-gold, #D4A359);
  margin-bottom: 6px;
}

.calendar-venues-cta .venues-cta-sub {
  display: block;
  font-size: 0.95rem;
  color: var(--cream-frame, #F4EBD9);
}

@media screen and (max-width: 600px) {
  .calendar-venues-cta a {
    padding: 22px 16px;
  }

  .calendar-venues-cta .venues-cta-icon {
    font-size: 1.6rem;
  }

  .calendar-venues-cta .venues-cta-title {
    font-size: 1.1rem;
  }
}