/* ============================================================
   ZGS / Goethe Zentrum Harare — Events Calendar restyle
   Built for FullCalendar (dayGridMonth view)
   Brand reference: goetheharare.org homepage mockup

   HOW TO USE
   1. Load fonts (Google Fonts link, or self-host):
      Playfair Display (700, 900, italic), Barlow Condensed (400-800), Barlow (400-600)
   2. Drop this stylesheet in AFTER FullCalendar's own CSS so it overrides defaults.
   3. Event colour-coding needs one line of JS config (see bottom of this file)
      to tag each event with a class based on its title (a1 / a2 / b1 / b2).
   ============================================================ */

:root {
  --zgs-black: #111210;
  --zgs-charcoal: #1c1e1a;
  --zgs-green: #8dc63f;
  --zgs-green-dk: #6fa832;
  --zgs-green-tint: #eef6df;
  --zgs-blue: #4a7fb5;
  --zgs-blue-tint: #e9f0f7;
  --zgs-terra: #9b4e3a;
  --zgs-terra-tint: #f5eae7;
  --zgs-grey: #8a8c87;
  --zgs-grey-lt: #d8d8d3;
  --zgs-border: #e6e6e1;
  --zgs-text: #26271f;
  --zgs-text-dim: #6b6c65;
}

/* ---------- frame ---------- */
.fc {
  font-family: 'Barlow', sans-serif;
  background: #ffffff;
  border: 1px solid var(--zgs-border);
  border-radius: 16px;
  padding: 32px 36px 20px;
}

/* ---------- toolbar ---------- */
.fc .fc-toolbar-title {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-style: italic;
  font-size: 2.1rem;
  color: var(--zgs-black);
}

.fc .fc-today-button {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: transparent;
  color: var(--zgs-charcoal);
  border: 1.5px solid var(--zgs-charcoal);
  border-radius: 20px;
  padding: 8px 18px;
  box-shadow: none;
  opacity: 1;
}
.fc .fc-today-button:hover {
  background: var(--zgs-green);
  border-color: var(--zgs-green);
  color: var(--zgs-black);
}

.fc .fc-prev-button,
.fc .fc-next-button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--zgs-charcoal);
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fc .fc-prev-button:hover,
.fc .fc-next-button:hover {
  background: var(--zgs-green-dk);
}

/* ---------- weekday header row ---------- */
.fc .fc-col-header-cell {
  border: none;
  border-bottom: 2px solid var(--zgs-green);
  padding-bottom: 10px;
}
.fc .fc-col-header-cell-cushion {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--zgs-text-dim);
  text-decoration: none;
}

/* ---------- day cells ---------- */
.fc .fc-daygrid-day {
  border-color: var(--zgs-border);
  transition: background 0.15s;
}
.fc .fc-daygrid-day:hover {
  background: #fbfbf8;
}
.fc .fc-day-other {
  background: #fafaf8;
}
.fc .fc-day-other .fc-daygrid-day-number {
  color: var(--zgs-grey-lt);
}
.fc .fc-daygrid-day-number {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--zgs-text);
  padding: 8px;
  text-decoration: none;
}

/* today */
.fc .fc-day-today {
  background: var(--zgs-green-tint) !important;
}
.fc .fc-day-today .fc-daygrid-day-number {
  background: var(--zgs-green);
  color: var(--zgs-black);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 4px;
  font-weight: 700;
}

/* ---------- events ---------- */
.fc .fc-daygrid-event {
  font-family: 'Barlow', sans-serif;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.3;
  padding: 3px 6px;
  margin: 0 4px 4px;
  border-radius: 5px;
  border: none;
  border-left: 3px solid transparent;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* colour-coded by exam level — see JS snippet below to apply these classes */
.fc .fc-event.a1 { background: var(--zgs-green-tint); border-left-color: var(--zgs-green); color: #3c5c17; }
.fc .fc-event.a2 { background: var(--zgs-green-tint); border-left-color: var(--zgs-green-dk); color: #2f4711; }
.fc .fc-event.b1 { background: var(--zgs-blue-tint); border-left-color: var(--zgs-blue); color: #234a72; }
.fc .fc-event.b2 { background: var(--zgs-terra-tint); border-left-color: var(--zgs-terra); color: #5c2f22; }

.fc .fc-daygrid-more-link {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: var(--zgs-grey);
}
.fc .fc-daygrid-more-link:hover {
  color: var(--zgs-green-dk);
}

/* ============================================================
   JS: tag each event with a level class so the colours above apply.
   Add this to the FullCalendar config, e.g. in eventDidMount:

   eventDidMount: function(info) {
     var title = info.event.title.toLowerCase();
     if (title.indexOf('a1') === 0) info.el.classList.add('a1');
     else if (title.indexOf('a2') === 0) info.el.classList.add('a2');
     else if (title.indexOf('b2') === 0) info.el.classList.add('b2');
     else if (title.indexOf('b1') === 0) info.el.classList.add('b1');
   }
   ============================================================ */
