/* =====================================================================
 * WwlCalendar — Shared calendar styles
 * Works with FullCalendar v6 + wwl-calendar.js
 * Applied to all calendar instances site-wide.
 * ===================================================================== */

/* ── Container ───────────────────────────────────────────────────────── */
.wwl-cal-wrap {
  background: #fff;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  position: relative;
}

/* ── Toolbar ─────────────────────────────────────────────────────────── */
.fc .fc-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px !important;
}

.fc .fc-toolbar-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #111827;
  letter-spacing: -.01em;
}

/* ── Toolbar button groups — spacing ─────────────────────────────────── */
.fc .fc-toolbar-chunk {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Nav buttons (prev/next/today) */
.fc .fc-button {
  border-radius: 8px !important;
  font-size: .82rem !important;
  font-weight: 600 !important;
  padding: 6px 14px !important;
  border: 1.5px solid #e5e7eb !important;
  background: #fff !important;
  color: #374151 !important;
  box-shadow: none !important;
  transition: all .15s;
  cursor: pointer;
}
.fc .fc-button:hover {
  background: #f3f4f6 !important;
  border-color: #d1d5db !important;
}
.fc .fc-button:focus { outline: none !important; }

/* View toggle buttons */
.fc .fc-button-group {
  display: flex;
  gap: 6px !important;  /* space between month/week/agenda/year */
  background: none !important;
  border: none !important;
}
.fc .fc-button-group .fc-button {
  border-radius: 8px !important; /* each button individually rounded */
}
.fc .fc-button-group .fc-button-active,
.fc .fc-button-group .fc-button:not(.fc-button-active):hover {
  background: #4F46E5 !important;
  color: #fff !important;
  border-color: #4F46E5 !important;
}
.fc .fc-button-group .fc-button-active {
  background: #4F46E5 !important;
  color: #fff !important;
  border-color: #4F46E5 !important;
}

/* Today button */
.fc .fc-today-button {
  background: #fff !important;
  color: #4F46E5 !important;
  border-color: #4F46E5 !important;
  font-weight: 700 !important;
}
.fc .fc-today-button:hover {
  background: #eef2ff !important;
}
.fc .fc-today-button:disabled {
  opacity: .4;
}

/* ── Month grid ──────────────────────────────────────────────────────── */
.fc .fc-daygrid-day {
  min-height: 110px;
}
.fc .fc-daygrid-day-frame {
  min-height: 110px;
}
.fc .fc-daygrid-day.fc-day-today {
  background: #eef2ff !important;
}
.fc .fc-daygrid-day-number {
  font-size: .82rem;
  font-weight: 600;
  color: #6b7280;
  padding: 4px 6px;
}
.fc .fc-day-today .fc-daygrid-day-number {
  background: #4F46E5;
  color: #fff;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.fc .fc-col-header-cell-cushion {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #9ca3af;
  text-decoration: none !important;
}

/* ── Events ──────────────────────────────────────────────────────────── */
.fc .fc-event {
  border: none !important;
  border-radius: 6px !important;
  font-size: .76rem !important;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 6px !important;
  transition: opacity .1s;
}
.fc .fc-event:hover { opacity: .85; }
.fc .fc-daygrid-event { margin-bottom: 2px !important; }

/* ── Week/time grid ──────────────────────────────────────────────────── */
.fc .fc-timegrid-slot { height: 32px; }
.fc .fc-timegrid-slot-label {
  font-size: .72rem;
  color: #9ca3af;
  font-weight: 500;
}
.fc .fc-timegrid-now-indicator-line {
  border-color: #DC2626 !important;
  border-width: 2px !important;
}
.fc .fc-timegrid-now-indicator-arrow {
  border-top-color: #DC2626 !important;
}
.fc .fc-timegrid-col.fc-day-today {
  background: rgba(79,70,229,.04) !important;
}

/* ── List / Agenda view ──────────────────────────────────────────────── */
.fc .fc-list-table {
  border-collapse: collapse;
}
.fc .fc-list-day-cushion {
  background: #f9fafb !important;
  padding: 8px 16px !important;
  font-weight: 700;
  font-size: .82rem;
  color: #374151;
  border-radius: 6px;
}
.fc .fc-list-event {
  border-bottom: 1px solid #f3f4f6;
  transition: background .1s;
}
.fc .fc-list-event:hover td { background: #f5f3ff !important; }
.fc .fc-list-event-dot {
  border-width: 8px !important;
  border-radius: 50%;
}
.fc .fc-list-event-title a {
  font-size: .88rem;
  font-weight: 600;
  color: #111827;
  text-decoration: none;
}
.fc .fc-list-event-title a:hover { color: #4F46E5; }
.fc .fc-list-event-time {
  font-size: .78rem;
  color: #6b7280;
  white-space: nowrap;
}
.fc .fc-list-empty {
  padding: 60px 20px;
  text-align: center;
  color: #9ca3af;
  font-size: .9rem;
}

/* Status badge in list view */
.wwl-cal-status-badge {
  display: inline-block;
  margin-left: 8px;
  font-size: .68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  vertical-align: middle;
}
.wwl-cal-status--open {
  background: #dcfce7;
  color: #15803d;
}
.wwl-cal-status--waitlist {
  background: #fef9c3;
  color: #92400e;
}

/* ── Year view — compact 4x3, dot events, hover tooltips ─────────── */
.fc .fc-multimonth-title {
  font-weight: 800;
  font-size: .78rem;
  padding: 4px 0 2px;
  color: #111827;
}
.fc .fc-multimonth-header {
  font-size: .55rem;
  font-weight: 700;
  color: #9ca3af;
}
/* Very compact day cells */
.fc .fc-multimonth .fc-daygrid-day {
  min-height: 16px !important;
  max-height: 16px !important;
  overflow: hidden;
  padding: 0 !important;
}
.fc .fc-multimonth .fc-daygrid-day-frame {
  min-height: 16px !important;
  padding: 0 !important;
}
.fc .fc-multimonth .fc-daygrid-day-top {
  flex-direction: row;
}
.fc .fc-multimonth .fc-daygrid-day-number {
  font-size: .58rem;
  padding: 1px 2px;
  line-height: 1;
  color: #9ca3af;
}
.fc .fc-multimonth .fc-day-today .fc-daygrid-day-number {
  background: #4F46E5;
  color: #fff;
  border-radius: 50%;
  width: 13px;
  height: 13px;
  font-size: .55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 1px;
}
/* Events as 3px color bars — no text */
.fc .fc-multimonth .fc-daygrid-event-harness {
  height: 3px !important;
  margin: 1px 1px 0 !important;
}
.fc .fc-multimonth .fc-daygrid-event {
  height: 3px !important;
  min-height: 3px !important;
  border-radius: 2px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden;
  cursor: pointer;
}
.fc .fc-multimonth .fc-event-title,
.fc .fc-multimonth .fc-event-time {
  display: none !important;
}
.fc .fc-multimonth .fc-daygrid-more-link {
  font-size: 0 !important; /* hide "+N more" text */
}
.fc .fc-multimonth .fc-daygrid-day-events {
  min-height: 0 !important;
}

/* ── View switcher filter bar ────────────────────────────────────────── */
.wwl-cal-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.wwl-cal-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1.5px solid #e5e7eb;
  background: #fff;
  font-size: .78rem;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  transition: all .15s;
}
.wwl-cal-filter-btn .wwl-cal-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.wwl-cal-filter-btn.is-active {
  border-color: transparent;
  color: #fff;
}
.wwl-cal-filter-btn:not(.is-active):hover {
  border-color: #6b7280;
  color: #374151;
}

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .wwl-cal-wrap { padding: 12px; }
  .fc .fc-toolbar { gap: 8px; }
  .fc .fc-toolbar-title { font-size: 1rem; }
  .fc .fc-button { padding: 5px 10px !important; font-size: .75rem !important; }
  .fc .fc-button-group { gap: 4px !important; }
  .fc .fc-daygrid-day { min-height: 60px; }
  .fc .fc-daygrid-day-frame { min-height: 60px; }
  .fc .fc-multimonth { --fc-multimonth-max-columns: 1; }
}

/* ── Event type color classes (for tiles/custom views) ───────────────── */
.wwl-evt-hackathon            { background: #4F46E5; }
.wwl-evt-bootcamp             { background: #2563EB; }
.wwl-evt-ceremony             { background: #D97706; }
.wwl-evt-team_building        { background: #059669; }
.wwl-evt-workshop             { background: #7C3AED; }
.wwl-evt-networking           { background: #0891B2; }
.wwl-evt-fundraiser           { background: #DC2626; }
.wwl-evt-robotics_competition { background: #EA580C; }
.wwl-evt-first_frc            { background: #DC2626; }
.wwl-evt-first_ftc            { background: #7C3AED; }
.wwl-evt-first_fll            { background: #0284C7; }
.wwl-evt-first_jrfll          { background: #16A34A; }
