.rez-fc-box,
.rez-fc-summary,
.rez-fc-legend,
.js-rez-calendar {
  --rez-calendar-max: 760px;
  --rez-day-max: 1180px;
  --rez-calendar-gap: 22px;
  --rez-radius: 8px;
  --rez-font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  --rez-event-gap: 5px;
  --rez-event-small-color: #334155;
  --rez-day-number-bg: #eef2f7;
  --rez-day-number-border: #d7e0ea;
  --rez-day-number-text: #334155;
  --rez-surface: #ffffff;
  --rez-text: #0f172a;
  --rez-muted: #64748b;
  --rez-line: #d7e0ea;
  --rez-soft: #f7f9fc;
  --rez-free: #15803d;
  --rez-free-bg: #eaf8ef;
  --rez-free-bg-strong: #bbf7d0;
  --rez-low: #65a30d;
  --rez-low-bg: #f1f8df;
  --rez-medium: #d97706;
  --rez-medium-bg: #fff4dd;
  --rez-high: #ea580c;
  --rez-high-bg: #fff0e7;
  --rez-full: #dc2626;
  --rez-full-bg: #feecec;
  --rez-full-bg-strong: #fecaca;
  --rez-mine: #2563eb;
  --rez-mine-bg: #edf4ff;
  --rez-mine-bg-strong: #bfdbfe;
  --rez-disabled: #94a3b8;
  --rez-disabled-bg: #f1f5f9;
  --rez-disabled-bg-strong: #e2e8f0;
  --rez-accent: #0f766e;
  --rez-accent-soft: #e5f8fb;
  box-sizing: border-box;
}

.rez-fc-box *,
.rez-fc-box *::before,
.rez-fc-box *::after,
.js-rez-calendar *,
.js-rez-calendar *::before,
.js-rez-calendar *::after {
  box-sizing: border-box;
}

.js-rez-calendar {
  --fc-border-color: #d7e0ea;
  --fc-page-bg-color: #ffffff;
  --fc-neutral-bg-color: #f7f9fc;
  --fc-today-bg-color: rgba(14, 116, 144, 0.1);
  --fc-now-indicator-color: #0e7490;
  --fc-event-text-color: #0f172a;
  max-width: 100%;
  color: var(--rez-text);
  font-family: var(--rez-font-family);
}

.rez-fc-box {
  width: 100%;
  max-width: var(--rez-calendar-max);
  margin: 0 auto var(--rez-calendar-gap);
  padding: 18px;
  clear: both;
  color: var(--rez-text);
  background: var(--rez-surface);
  border: 1px solid var(--rez-line);
  border-radius: var(--rez-radius);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
  font-family: var(--rez-font-family);
  isolation: isolate;
}

.rez-fc-box h3 {
  margin: 0 0 14px;
  color: #0f172a;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}

.rez-fc-mini,
.rez-fc-day {
  font-size: 14px;
}

.rez-fc-day {
  container-type: inline-size;
  width: 100%;
  min-width: 0;
  max-width: var(--rez-day-max);
  margin-top: 18px;
  margin-right: auto;
  margin-left: auto;
  overflow-x: hidden;
}

.rez-fc-text {
  margin-bottom: 16px;
  color: #334155;
  font-size: 15px;
  line-height: 1.6;
}

.rez-fc-link {
  margin: 14px 0 0;
}

.rez-fc-link a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 12px;
  color: var(--rez-accent);
  background: #eefcf8;
  border: 1px solid #bfe9dd;
  border-radius: var(--rez-radius);
  font-weight: 700;
  text-decoration: none;
}

.rez-fc-link a:hover,
.rez-fc-link a:focus {
  color: #0f172a;
  border-color: var(--rez-accent);
}

.js-rez-calendar .fc {
  color: var(--rez-text);
}

.js-rez-calendar .fc table,
.js-rez-calendar .fc th,
.js-rez-calendar .fc td {
  margin: 0;
  padding: 0;
  vertical-align: top;
  background-clip: padding-box;
}

.js-rez-calendar .fc table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
}

.js-rez-calendar .fc-toolbar.fc-header-toolbar {
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.js-rez-calendar .fc-toolbar-title {
  color: #0f172a;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: none;
}

.js-rez-calendar .fc-button {
  appearance: none;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: var(--rez-radius);
  box-shadow: none;
  font-family: var(--rez-font-family);
  font-weight: 700;
  line-height: 1.2;
  text-transform: none;
}

.js-rez-calendar .fc-button-primary {
  color: #0f172a;
  background: #ffffff;
  border-color: #cbd5e1;
}

.js-rez-calendar .fc-button-primary:hover,
.js-rez-calendar .fc-button-primary:focus {
  color: #ffffff;
  background: var(--rez-accent);
  border-color: var(--rez-accent);
}

.js-rez-calendar .fc-button-primary:disabled {
  color: var(--rez-disabled);
  background: var(--rez-soft);
  border-color: var(--rez-line);
  opacity: 1;
}

.js-rez-calendar .fc-scrollgrid,
.js-rez-calendar .fc-theme-standard td,
.js-rez-calendar .fc-theme-standard th {
  border-color: var(--rez-line);
}

.js-rez-calendar .fc-col-header-cell-cushion,
.js-rez-calendar .fc-daygrid-day-number {
  color: #334155;
  text-decoration: none;
}

.js-rez-calendar .fc-col-header-cell-cushion {
  padding: 10px 6px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.js-rez-calendar .fc-day-today .fc-daygrid-day-number,
.js-rez-calendar .fc-day-today .fc-col-header-cell-cushion {
  color: var(--rez-accent);
}

.rez-fc-mini {
  container-type: inline-size;
  overflow: hidden;
  padding: 12px;
  background: var(--rez-surface);
  border: 1px solid var(--rez-line);
  border-radius: var(--rez-radius);
}

.rez-fc-mini .fc-toolbar.fc-header-toolbar {
  padding-bottom: 10px;
  border-bottom: 1px solid #edf2f7;
}

.rez-fc-mini .fc-toolbar-title {
  font-size: 17px;
}

.rez-fc-mini .fc-button {
  width: 34px;
  min-width: 34px;
  padding: 0;
}

.rez-fc-mini .fc-daygrid-day {
  background: #ffffff;
  cursor: pointer;
  transition: background-color 140ms ease, box-shadow 140ms ease;
}

.rez-fc-mini .fc-daygrid-day:hover {
  box-shadow: inset 0 0 0 2px var(--rez-accent);
}

.rez-fc-mini .fc-daygrid-day-frame {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 58px;
  overflow: hidden;
  padding: 3px;
}

.rez-fc-mini .fc-daygrid-day-top {
  position: static;
  z-index: 1;
  flex: 0 0 auto;
  flex-direction: row;
  justify-content: flex-start;
  width: 100%;
  min-width: 0;
}

.rez-fc-mini .fc-daygrid-day-number {
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  min-width: 0;
  max-width: 100%;
  height: 25px;
  overflow: hidden;
  padding: 0 2px;
  color: var(--rez-day-number-text);
  background: var(--rez-day-number-bg);
  border: 1px solid var(--rez-day-number-border);
  border-radius: var(--rez-radius);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

/* Keep the date label inside its cell even when the RS theme styles calendar links. */
.rez-fc-box .js-rez-calendar.rez-fc-mini .fc-daygrid-day-frame {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.rez-fc-box .js-rez-calendar.rez-fc-mini .fc-daygrid-day-top {
  position: static;
  flex-direction: row;
  justify-content: flex-start;
  width: 100%;
  min-width: 0;
}

.rez-fc-box .js-rez-calendar.rez-fc-mini .fc-daygrid-day-number {
  position: static;
  inset: auto;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  float: none;
}

.rez-fc-mini .fc-day-today .fc-daygrid-day-number {
  background: var(--rez-accent-soft);
  border-color: color-mix(in srgb, var(--rez-accent) 30%, var(--rez-day-number-border));
}

.rez-fc-mini .fc-daygrid-day-events,
.rez-fc-mini .fc-daygrid-event-harness {
  display: none;
}

.rez-fc-mini .fc-scrollgrid,
.rez-fc-mini .fc-scrollgrid table {
  border-radius: var(--rez-radius);
}

.rez-fc-mini .fc-daygrid-day.rez-fc-status-none {
  background: var(--rez-soft);
}

.rez-fc-mini .fc-daygrid-day.rez-fc-status-none .fc-daygrid-day-number {
  color: var(--rez-disabled);
}

.rez-fc-mini .fc-daygrid-day.rez-fc-status-free,
.rez-fc-summary.rez-fc-status-free,
.rez-fc-legend-item.rez-fc-status-free {
  --rez-status: var(--rez-free);
  --rez-status-bg: var(--rez-free-bg);
  --rez-status-text: #14532d;
}

.rez-fc-mini .fc-daygrid-day.rez-fc-status-low,
.rez-fc-summary.rez-fc-status-low {
  --rez-status: var(--rez-low);
  --rez-status-bg: var(--rez-low-bg);
  --rez-status-text: #365314;
}

.rez-fc-mini .fc-daygrid-day.rez-fc-status-medium,
.rez-fc-summary.rez-fc-status-medium,
.rez-fc-legend-item.rez-fc-status-medium {
  --rez-status: var(--rez-medium);
  --rez-status-bg: var(--rez-medium-bg);
  --rez-status-text: #7c2d12;
}

.rez-fc-mini .fc-daygrid-day.rez-fc-status-high,
.rez-fc-summary.rez-fc-status-high,
.rez-fc-legend-item.rez-fc-status-high {
  --rez-status: var(--rez-high);
  --rez-status-bg: var(--rez-high-bg);
  --rez-status-text: #7c2d12;
}

.rez-fc-mini .fc-daygrid-day.rez-fc-status-full,
.rez-fc-summary.rez-fc-status-full,
.rez-fc-legend-item.rez-fc-status-full {
  --rez-status: var(--rez-full);
  --rez-status-bg: var(--rez-full-bg);
  --rez-status-text: #7f1d1d;
}

.rez-fc-mini .fc-daygrid-day.rez-fc-status-free,
.rez-fc-mini .fc-daygrid-day.rez-fc-status-low,
.rez-fc-mini .fc-daygrid-day.rez-fc-status-medium,
.rez-fc-mini .fc-daygrid-day.rez-fc-status-high,
.rez-fc-mini .fc-daygrid-day.rez-fc-status-full {
  background: var(--rez-status-bg);
}

.rez-fc-day-status {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  width: 100%;
  min-height: 21px;
  min-width: 0;
  margin-top: auto;
  overflow: hidden;
  color: var(--rez-status-text);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid color-mix(in srgb, var(--rez-status) 28%, transparent);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.rez-fc-day-status-bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--rez-fill);
  min-width: 4px;
  background: var(--rez-status);
  opacity: 0.18;
}

.rez-fc-day-status-label {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 4px 5px;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rez-fc-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin: 0 0 14px;
  padding: 14px;
  color: #0f172a;
  background: var(--rez-status-bg, #f8fafc);
  border: 1px solid color-mix(in srgb, var(--rez-status, #94a3b8) 28%, #dbe4ee);
  border-radius: 8px;
}

.rez-fc-summary-main {
  display: flex;
  flex: 1 1 260px;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.rez-fc-summary-dot,
.rez-fc-legend-dot {
  flex: 0 0 auto;
  width: 11px;
  height: 11px;
  background: var(--rez-status, #94a3b8);
  border-radius: 50%;
}

.rez-fc-summary-label {
  display: block;
  color: var(--rez-status-text, #334155);
  font-size: 17px;
  line-height: 1.2;
}

.rez-fc-summary-detail {
  display: block;
  margin-top: 3px;
  color: #475569;
  font-size: 13px;
  line-height: 1.35;
}

.rez-fc-summary-meter {
  flex: 1 1 160px;
  min-width: 120px;
  height: 9px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 999px;
}

.rez-fc-summary-meter span {
  display: block;
  width: var(--rez-fill, 0%);
  height: 100%;
  background: var(--rez-status, #94a3b8);
  border-radius: inherit;
}

.rez-fc-summary-counts,
.rez-fc-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.rez-fc-summary-counts {
  flex: 0 1 auto;
  min-width: 0;
}

.rez-fc-summary-counts span,
.rez-fc-legend-item {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-height: 28px;
  padding: 5px 8px;
  color: #334155;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
}

.rez-fc-summary-counts strong {
  color: #0f172a;
}

.rez-fc-legend {
  margin: 10px 0 0;
}

.rez-fc-day .fc-view-harness {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
}

.rez-fc-day .fc-scrollgrid {
  width: 100% !important;
  min-width: 0;
  max-width: 100%;
  table-layout: fixed;
  border: 0;
}

.rez-fc-day .fc-scroller,
.rez-fc-day .fc-scrollgrid-section,
.rez-fc-day .fc-scrollgrid-section table {
  min-width: 0;
  max-width: 100%;
}

.rez-fc-day .fc-timegrid-axis-cushion,
.rez-fc-day .fc-timegrid-slot-label-cushion {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.rez-fc-day .fc-timegrid-slot {
  height: 36px;
}

.rez-fc-day .fc-timegrid-slot-lane {
  background: #ffffff;
}

.rez-fc-day .fc-timegrid-event-harness {
  margin-right: var(--rez-event-gap);
}

.rez-fc-day .fc-timegrid-col.rez-fc-status-free,
.rez-fc-day .fc-col-header-cell.rez-fc-status-free {
  background: rgba(21, 128, 61, 0.04);
}

.rez-fc-day .fc-timegrid-col.rez-fc-status-low,
.rez-fc-day .fc-col-header-cell.rez-fc-status-low {
  background: rgba(101, 163, 13, 0.05);
}

.rez-fc-day .fc-timegrid-col.rez-fc-status-medium,
.rez-fc-day .fc-col-header-cell.rez-fc-status-medium {
  background: rgba(217, 119, 6, 0.05);
}

.rez-fc-day .fc-timegrid-col.rez-fc-status-high,
.rez-fc-day .fc-col-header-cell.rez-fc-status-high {
  background: rgba(234, 88, 12, 0.05);
}

.rez-fc-day .fc-timegrid-col.rez-fc-status-full,
.rez-fc-day .fc-col-header-cell.rez-fc-status-full {
  background: rgba(220, 38, 38, 0.05);
}

.rez-fc-day .fc-event {
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
}

.rez-fc-event-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  height: 100%;
  min-height: 0;
  padding: 7px 9px;
  line-height: 1.2;
}

.rez-fc-event-card-compact {
  display: flex;
  flex-flow: row nowrap;
  gap: 3px;
  align-items: center;
  padding: 3px 5px;
}

.rez-fc-event-card strong,
.rez-fc-event-card span,
.rez-fc-event-card small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1;
}

.rez-fc-event-card strong {
  font-size: 13px;
  font-weight: 800;
}

.rez-fc-event-card span {
  font-size: 12px;
  font-weight: 700;
  opacity: 0.86;
}

.rez-fc-event-card small {
  color: var(--rez-event-small-color);
  font-size: 11px;
  opacity: 1;
}

.rez-fc-event-card-compact strong {
  order: 2;
  flex: 0 0 auto;
}

.rez-fc-event-card-compact small {
  order: 3;
  display: block;
  flex: 1 1 auto;
  min-width: 3ch;
  font-weight: 800;
  margin: 2px 0 0 0;
}

.rez-fc-event-card-compact span {
  order: 1;
  flex: 0 0 auto;
  min-width: 4.5ch;
  margin-left: auto;
  font-size: 11px;
}

.rez-fc-event-free {
  cursor: pointer;
  color: #14532d !important;
  background: linear-gradient(135deg, var(--rez-free-bg), var(--rez-free-bg-strong)) !important;
  border-left: 5px solid var(--rez-free) !important;
}

.rez-fc-event-busy {
  color: #7f1d1d !important;
  background: linear-gradient(135deg, var(--rez-full-bg), var(--rez-full-bg-strong)) !important;
  border-left: 5px solid var(--rez-full) !important;
}

.rez-fc-event-mine {
  cursor: pointer;
  color: #1e3a8a !important;
  background: linear-gradient(135deg, var(--rez-mine-bg), var(--rez-mine-bg-strong)) !important;
  border-left: 5px solid var(--rez-mine) !important;
}

.rez-fc-event-disabled {
  color: #475569 !important;
  background: linear-gradient(135deg, var(--rez-disabled-bg), var(--rez-disabled-bg-strong)) !important;
  border-left: 5px solid var(--rez-disabled) !important;
}

.rez-fc-event-free:hover,
.rez-fc-event-mine:hover {
  filter: brightness(0.98);
  transform: translateY(-1px);
}

.rez-fc-my {
  width: 100%;
}

@supports not (color: color-mix(in srgb, #000 50%, #fff)) {
  .rez-fc-day-status,
  .rez-fc-summary {
    border-color: #dbe4ee;
  }
}

@container (max-width: 420px) {
  .rez-fc-mini .fc-daygrid-day-frame {
    min-height: 50px;
  }

  .rez-fc-mini .fc-daygrid-day-number {
    width: 22px;
    height: 22px;
    font-size: 12px;
  }

  .rez-fc-mini .rez-fc-day-status {
    min-height: 16px;
    font-size: 9px;
  }

  .rez-fc-mini .rez-fc-day-status-label {
    padding: 2px 1px;
  }
}

@container (max-width: 560px) {
  .rez-fc-day .fc-toolbar.fc-header-toolbar {
    flex-wrap: wrap;
    gap: 7px;
  }

  .rez-fc-day .fc-toolbar-chunk {
    min-width: 0;
  }

  .rez-fc-day .fc-toolbar-chunk:nth-child(2) {
    flex: 1 1 145px;
    text-align: right;
  }

  .rez-fc-day .fc-toolbar-title {
    overflow: hidden;
    font-size: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .rez-fc-day .fc-button {
    min-height: 32px;
    padding: 6px 8px;
  }

  .rez-fc-day .fc-timegrid-axis-cushion,
  .rez-fc-day .fc-timegrid-slot-label-cushion {
    padding-right: 2px;
    padding-left: 2px;
    font-size: 10px;
  }

  .rez-fc-day .fc-col-header-cell-cushion {
    padding: 7px 2px;
    font-size: 11px;
  }

  .rez-fc-day .fc-timegrid-event-harness {
    margin-right: 2px;
  }

  .rez-fc-day .fc-timegrid-slot {
    height: 36px;
  }

  .rez-fc-day .fc-event {
    border-radius: 6px;
  }

  .rez-fc-day .rez-fc-event-card {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: stretch;
    padding: 4px 5px;
  }

  .rez-fc-day .rez-fc-event-card strong {
    display: none;
  }

  .rez-fc-day .rez-fc-event-card small {
    order: 1;
    display: block;
    flex: 0 1 auto;
    min-width: 0;
    color: var(--rez-event-small-color);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.05;
  }

  .rez-fc-day .rez-fc-event-card span {
    order: 2;
    flex: 0 1 auto;
    min-width: 0;
    margin-left: 0;
    font-size: 10px;
    line-height: 1.05;
  }

  .rez-fc-day .rez-fc-event-card-compact {
    justify-content: center;
    gap: 1px;
    padding: 2px 4px;
  }

  .rez-fc-day .rez-fc-event-card-compact span {
    font-size: 9px;
  }
}

@media (max-width: 820px) {
  .rez-fc-box {
    max-width: 100%;
    padding: 14px;
  }

  .js-rez-calendar .fc-toolbar.fc-header-toolbar {
    flex-wrap: wrap;
  }

  .js-rez-calendar .fc-toolbar-title {
    font-size: 18px;
  }

  .rez-fc-mini .fc-daygrid-day-frame {
    min-height: 50px;
    padding: 3px;
  }

  .rez-fc-mini .fc-toolbar.fc-header-toolbar {
    flex-wrap: nowrap;
    gap: 6px;
  }

  .rez-fc-mini .fc-toolbar-title {
    overflow: hidden;
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .rez-fc-mini .fc-daygrid-day-number {
    width: 22px;
    min-width: 0;
    height: 22px;
    padding: 0 4px;
    font-size: 12px;
  }

  .rez-fc-day-status {
    min-height: 16px;
    font-size: 9px;
  }

  .rez-fc-day-status-label {
    padding: 3px 2px;
  }

  .rez-fc-summary-main,
  .rez-fc-summary-meter,
  .rez-fc-summary-counts {
    flex-basis: 100%;
  }
}

@media (max-width: 560px) {
  .rez-fc-box {
    padding: 10px;
  }

  .rez-fc-mini {
    padding: 8px;
  }

  .rez-fc-mini .fc-col-header-cell-cushion {
    padding: 8px 2px;
    font-size: 11px;
  }

  .rez-fc-mini .fc-daygrid-day-frame {
    min-height: 44px;
    padding: 2px;
  }

  .rez-fc-mini .fc-daygrid-day-number {
    width: 19px;
    min-width: 0;
    height: 19px;
    padding: 0 3px;
    font-size: 11px;
  }

  .rez-fc-day .fc-timegrid-slot {
    height: 30px;
  }

  .rez-fc-event-card {
    padding: 4px 6px;
  }

  .rez-fc-event-card strong {
    font-size: 12px;
  }

  .rez-fc-event-card span {
    font-size: 11px;
  }

}
