/* ── CALENDAR PAGE-SPECIFIC CSS ──────────────────────────── */

/* ── MAIN LAYOUT ─────────────────────────────────────────── */
#appBody {
  display: flex;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

/* ── SIDEBAR ─────────────────────────────────────────────── */
#sidebar {
  width: 260px;
  min-width: 260px;
  background: #fff;
  border-right: 1px solid #e5e5e5;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 24px 20px;
  gap: 24px;
}

.sidebar-section-title {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #aaa;
  margin-bottom: 10px;
}

/* Add event button */
#addEventBtn {
  width: 100%;
  padding: 11px 0;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}
#addEventBtn:hover { background: var(--primary-dark); }

/* Legend */
.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 13px;
  color: #444;
}
.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Upcoming events */
.upcoming-event {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
}
.upcoming-event:last-child { border-bottom: none; }
.upcoming-date {
  flex-shrink: 0;
  width: 36px;
  text-align: center;
}
.upcoming-date-month {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  color: #aaa;
  letter-spacing: .08em;
}
.upcoming-date-day {
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  color: #1a1a1a;
}
.upcoming-info { flex: 1; }
.upcoming-title { font-size: 13px; font-weight: 600; color: #1a1a1a; }
.upcoming-sub { font-size: 11px; color: #888; margin-top: 2px; }
.upcoming-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}

/* ── CALENDAR AREA ───────────────────────────────────────── */
#calendarWrap {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  min-height: 0;
}

#calendar {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e5e5e5;
  padding: 20px;
  height: 100%;
}

/* FullCalendar overrides */
.fc .fc-toolbar-title {
  font-size: 18px;
  font-weight: 800;
  color: #1a1a1a;
}
.fc .fc-button {
  background: #fff;
  border: 1.5px solid #e0e0e0;
  color: #444;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  box-shadow: none;
  text-transform: capitalize;
}
.fc .fc-button:hover { background: #f5f5f5; border-color: #ccc; color: #1a1a1a; }
.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc-button-primary:not(:disabled):active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.fc .fc-today-button {
  background: #f5f5f5;
  border-color: #e0e0e0;
  color: #444;
}
.fc .fc-col-header-cell-cushion {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #999;
  text-decoration: none;
}
.fc .fc-daygrid-day-number {
  font-size: 12px;
  font-weight: 600;
  color: #555;
  text-decoration: none;
}
.fc .fc-daygrid-day.fc-day-today { background: var(--neutral); }
.fc .fc-daygrid-day.fc-day-today .fc-daygrid-day-number { color: var(--tertiary); font-weight: 800; }
.fc-event { border-radius: 4px; border: none; font-size: 11px; font-weight: 600; cursor: pointer; }
.fc-event:hover { opacity: 0.85; }
.fc .fc-daygrid-event { padding: 2px 5px; }

/* ── EVENT MODAL ─────────────────────────────────────────── */
#eventModalOverlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 3000;
  align-items: center;
  justify-content: center;
}
#eventModalOverlay.open { display: flex; }
#eventModal {
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  width: 420px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.2);
  position: relative;
}
#eventModal h2 { font-size: 18px; font-weight: 800; margin-bottom: 20px; }

.modal-close-btn {
  position: absolute;
  top: 16px; right: 16px;
  background: none; border: none;
  font-size: 22px; color: #999;
  cursor: pointer; line-height: 1;
}

.modal-actions { display: flex; gap: 10px; margin-top: 20px; }

.btn-danger {
  padding: 11px 20px;
  background: #fff;
  color: #e03e3e;
  font-size: 13px;
  font-weight: 600;
  border: 1.5px solid #f5c0c0;
  border-radius: 8px;
  cursor: pointer;
}
.btn-danger:hover { background: #fff5f5; }

/* Color swatches */
.color-swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.color-swatch {
  width: 28px; height: 28px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid transparent;
  transition: transform 0.1s;
}
.color-swatch:hover { transform: scale(1.1); }
.color-swatch.selected { border-color: #1a1a1a; }
