/* Compact, light styling so the embed shows as much as possible in a Notion dashboard. */
:root {
  --fc-border-color: #ededeb;
  --fc-today-bg-color: #f7f6f3;
  --fc-button-bg-color: #ffffff;
  --fc-button-border-color: #e0e0dc;
  --fc-button-text-color: #37352f;
  --fc-button-hover-bg-color: #f1f0ee;
  --fc-button-active-bg-color: #ebeae8;
  --fc-small-font-size: 0.72em;
}

html,
body {
  margin: 0;
  height: 100%;
  background: #ffffff;
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #37352f;
  font-size: 13px;
}

#calendar {
  height: 100%;
  padding: 4px 6px 6px;
  box-sizing: border-box;
}

/* --- compact toolbar --- */
.fc .fc-toolbar.fc-header-toolbar {
  margin-bottom: 0.25em;
  gap: 4px;
}
.fc .fc-toolbar-title {
  font-size: 0.92rem;
  font-weight: 600;
}
.fc .fc-button {
  text-transform: none;
  box-shadow: none !important;
  font-size: 0.72rem;
  padding: 0.12em 0.45em;
  line-height: 1.2;
}
.fc .fc-addEvent-button {
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0 0.5em;
}
.fc .fc-toolbar.fc-header-toolbar .fc-toolbar-chunk {
  display: flex;
  align-items: center;
}

/* --- compact month grid --- */
.fc .fc-daygrid-day-frame {
  min-height: 0;
  padding: 0;
}
.fc .fc-daygrid-day-top {
  font-size: 0.7rem;
}
.fc .fc-daygrid-day-number {
  padding: 1px 3px;
}
.fc .fc-col-header-cell-cushion {
  padding: 2px 3px;
  font-size: 0.7rem;
  font-weight: 600;
}
.fc .fc-daygrid-event {
  font-size: var(--fc-small-font-size);
  padding: 0 2px;
  margin-top: 1px;
  line-height: 1.25;
}
.fc .fc-daygrid-day-events {
  margin-bottom: 1px;
}
.fc .fc-daygrid-more-link {
  font-size: 0.68rem;
}

/* --- compact time/list views --- */
/* Slot height is driven by the zoom buttons via the --slot-h variable.
   !important so it wins over FullCalendar's runtime-injected stylesheet. A slot is a table
   cell, so its height can't go below the label text — shrink the label so zoom-out can
   actually compress the day. */
.fc .fc-timegrid-slot {
  height: var(--slot-h, 18px) !important;
  line-height: 1 !important;
}
.fc .fc-timegrid-slot-label-cushion {
  font-size: 0.5rem;
  line-height: 1;
  padding: 0 3px;
}
.fc .fc-list-event {
  font-size: 0.78rem;
}
.fc .fc-list-day-cushion {
  padding: 3px 8px;
}

/* --- status toast --- */
.status {
  position: fixed;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  background: #2eaadc;
  color: #fff;
  padding: 5px 11px;
  border-radius: 6px;
  font-size: 0.8rem;
  z-index: 50;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.status.error {
  background: #eb5757;
}

/* --- create modal --- */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 15, 15, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.modal[hidden] {
  display: none;
}
.modal-card {
  background: #fff;
  border-radius: 8px;
  padding: 14px;
  width: min(320px, 92vw);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}
.modal-row {
  margin-bottom: 8px;
}
.modal-input {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 8px;
  font-size: 0.85rem;
  border: 1px solid #e0e0dc;
  border-radius: 5px;
  background: #fff;
  color: #37352f;
}
.modal-times {
  display: flex;
  gap: 8px;
}
.modal-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.7rem;
  color: #787774;
}
.modal-field .modal-input {
  font-size: 0.8rem;
}
.modal-when {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.modal-check {
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.modal-range {
  font-size: 0.74rem;
  color: #787774;
  text-align: right;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}
.btn {
  font-size: 0.8rem;
  padding: 5px 12px;
  border: 1px solid #e0e0dc;
  border-radius: 5px;
  background: #fff;
  color: #37352f;
  cursor: pointer;
}
.btn-primary {
  background: #2eaadc;
  border-color: #2eaadc;
  color: #fff;
}
.btn-danger {
  color: #eb5757;
  border-color: #f0c8c8;
}
/* push Delete to the left, Cancel/Save to the right */
#m-delete {
  margin-right: auto;
}

/* dialog heading + calendar visibility list */
.modal-title-row {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 8px;
}
.cal-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 55vh;
  overflow: auto;
  margin-bottom: 10px;
}
.cal-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  padding: 3px 2px;
  cursor: pointer;
}
.cal-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex: none;
}
.cal-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-empty {
  font-size: 0.8rem;
  color: #787774;
  padding: 6px 2px;
}
