/*
 * FullCalendar theme overrides — Greenhouse Ensemble
 * Matches the site's minimal, lowercase aesthetic.
 */

/* ── Container ────────────────────────────────────────────────────────────── */

#gh-calendar {
  margin-bottom: 2rem;
  font-family: -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
}

/* ── Force ALL backgrounds transparent so page bg (#DCDCDC) shows through ── */

#gh-calendar .fc,
#gh-calendar .fc-view-harness,
#gh-calendar .fc-scrollgrid-liquid,
#gh-calendar .fc-scrollgrid-section,
#gh-calendar .fc-scrollgrid-section > *,
#gh-calendar .fc-daygrid,
#gh-calendar .fc-daygrid-body,
#gh-calendar .fc-daygrid-day,
#gh-calendar .fc-col-header,
#gh-calendar .fc-col-header-cell,
#gh-calendar thead,
#gh-calendar tbody,
#gh-calendar tr,
#gh-calendar td,
#gh-calendar th {
  background: transparent !important;
  background-color: transparent !important;
}

/* ── Gridlines — override Astra's global table border reset ───────────────── */

#gh-calendar table {
  border-collapse: collapse !important;
  border-spacing: 0 !important;
  background: transparent !important;
}

#gh-calendar td,
#gh-calendar th {
  border: 1px solid var(--gh-border) !important;
}

#gh-calendar .fc-scrollgrid {
  border: 1px solid var(--gh-border) !important;
}

/* ── Today highlight ──────────────────────────────────────────────────────── */

#gh-calendar .fc-daygrid-day.fc-day-today {
  background: rgba(132, 178, 105, 0.12) !important;
}

/* ── Toolbar / header ─────────────────────────────────────────────────────── */

.fc .fc-toolbar-title {
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: lowercase;
  color: var(--gh-text);
}

.fc .fc-button {
  background: transparent;
  border: 1px solid var(--gh-border);
  color: var(--gh-text-light);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: lowercase;
  padding: 0.4rem 0.8rem;
  box-shadow: none;
  transition: border-color 0.2s, color 0.2s;
}

.fc .fc-button:hover {
  background: transparent;
  border-color: var(--gh-text);
  color: var(--gh-text);
}

.fc .fc-button:focus {
  box-shadow: none;
}

.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc-button-primary:not(:disabled):active {
  background: var(--gh-text);
  border-color: var(--gh-text);
  color: var(--gh-bg);
}

.fc .fc-today-button {
  background: #84B269 !important;
  border-color: #84B269 !important;
  color: #fff !important;
}

.fc .fc-today-button:hover {
  background: #6f9a57 !important;
  border-color: #6f9a57 !important;
}

.fc .fc-today-button:disabled {
  opacity: 0.5;
}

/* ── Grid typography ──────────────────────────────────────────────────────── */

.fc .fc-daygrid-day-number {
  font-size: 0.9rem;
  color: var(--gh-text-light);
  padding: 0.5rem 0.6rem;
}

.fc .fc-col-header-cell-cushion {
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gh-text-light);
  text-decoration: none;
  padding: 0.5rem 0;
}

.fc .fc-daygrid-day.fc-day-other .fc-daygrid-day-number {
  opacity: 0.35;
}

/* ── Events ───────────────────────────────────────────────────────────────── */

.fc .fc-event {
  border: none;
  border-radius: 2px;
  padding: 2px 6px;
  font-size: 0.85rem;
  cursor: pointer;
  line-height: 1.4;
}

.fc .fc-daygrid-event-dot {
  border-color: currentColor;
}

.fc .fc-event:hover {
  opacity: 0.85;
}

/* List view inside FullCalendar */
.fc .fc-list-event-title a {
  color: var(--gh-text);
  text-decoration: none;
}

.fc .fc-list-event-title a:hover {
  text-decoration: underline;
}

.fc .fc-list-day-cushion {
  background: rgba(0, 0, 0, 0.02);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gh-text-light);
}

/* ── Color legend ─────────────────────────────────────────────────────────── */

.gh-calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  justify-content: center;
  padding: 1.5rem 0 0;
}

.gh-legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gh-text-light);
}

.gh-legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

/* ── Filtered list view (?category=X&view=list) ──────────────────────────── */

.gh-calendar-list-view {
  max-width: 1200px;
  margin: 0 auto;
}

.gh-calendar-list-view .gh-back {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  color: var(--gh-text-light);
  text-decoration: none;
  margin-bottom: 1rem;
  transition: color 0.2s;
}

.gh-calendar-list-view .gh-back:hover {
  color: var(--gh-text);
}

.gh-calendar-list-heading {
  font-size: 1.3rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: lowercase;
  color: var(--gh-text);
  margin: 0 0 1.5rem;
}

.gh-calendar-list-loading,
.gh-calendar-list-empty {
  color: var(--gh-text-light);
  font-size: 0.9rem;
  text-align: center;
  padding: 2rem 0;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .fc .fc-toolbar {
    flex-direction: column;
    gap: 0.5rem;
  }

  .fc .fc-toolbar-title {
    font-size: 1.1rem;
  }

  .fc .fc-button {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
  }

  .fc .fc-list-event-title a {
    font-size: 1.05rem;
  }

  .fc .fc-list-event-time {
    font-size: 0.95rem;
  }

  .fc .fc-list-day-cushion {
    font-size: 0.9rem;
  }
}
