/* FullCalendar, appointment rendering, and calendar effects. */
.manual-block-event { display: flex; width: 100%; min-height: 100%; box-sizing: border-box; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 2px; padding: 8px 10px; color: #475569; line-height: 1.2; }

.manual-block-event strong { display: flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 700; line-height: 1.2; }

.manual-block-note-icon { display: inline-flex; flex: 0 0 auto; opacity: 1; line-height: 0; }
.manual-block-note-icon svg { display: block; }

.manual-block-event span { color: #64748b; font-size: .7rem; line-height: 1.2; }

.manual-block-event--mirror, .manual-block-event--mirror span { color: #fff; }

.manual-block-event--mirror { position: relative; overflow: hidden; border-radius: 8px; background: #64748b; }

.manual-block-event--mirror::before { position: absolute; inset: -24px; z-index: 0; background: url('../assets/manual-block-stripes.svg') repeat; content: ''; opacity: .65; animation: manual-block-stripes 360ms linear infinite; }

.manual-block-event--mirror > * { position: relative; z-index: 1; }

@keyframes manual-block-stripes { from { transform: translateX(0); } to { transform: translateX(24px); } }

.fc-event.manual-block-selection-mirror { padding: 0; background: transparent !important; border: 1px dashed #64748b !important; box-shadow: none; opacity: .78; pointer-events: none; }

.fc-event.manual-block-selection-mirror .fc-event-main { height: 100%; padding: 0; }

@media (prefers-reduced-motion: reduce) {
  .manual-block-event--mirror::before { animation: none; }
}

.fc-event.manual-block-calendar-event { background: linear-gradient(135deg, #525d6b 0%, #4b5563 100%) !important; border: 1px solid #374151 !important; }

.fc-daygrid-event.manual-block-calendar-event { border: 0 !important; }

.fc-event.manual-block-calendar-event .fc-event-main { height: 100%; padding: 0; }

.fc-event.manual-block-calendar-event .manual-block-event, .fc-event.manual-block-calendar-event .manual-block-event span { color: #fff; }

.fc-list-event.manual-block-calendar-event { background: #94a3b8; }

.fc-list-event.manual-block-calendar-event .fc-list-event-time, .fc-list-event.manual-block-calendar-event .fc-list-event-title { color: #f8fafc !important; }

.fc-list-event.manual-block-calendar-event:hover { background: #e2e8f0; }

.fc-list-event.manual-block-calendar-event:hover .fc-list-event-time, .fc-list-event.manual-block-calendar-event:hover .fc-list-event-title { color: #1f2937 !important; }

.manual-list-event { min-width: 0; min-height: 42px; color: #475569; }

.manual-list-event .appointment-event__customer { color: #334155; }

.manual-list-event .appointment-event__service { color: #64748b; }

.manual-list-event .appointment-event__status { color: #94a3b8; }

.fc-list-event.manual-block-calendar-event .manual-list-event .appointment-event__customer,
.fc-list-event.manual-block-calendar-event .manual-list-event .appointment-event__service,
.fc-list-event.manual-block-calendar-event .manual-list-event .appointment-event__status { color: #f8fafc !important; }

.fc-list-event.manual-block-calendar-event:hover .manual-list-event .appointment-event__customer,
.fc-list-event.manual-block-calendar-event:hover .manual-list-event .appointment-event__service,
.fc-list-event.manual-block-calendar-event:hover .manual-list-event .appointment-event__status { color: #1f2937 !important; }

#calendar, #calendar:focus, #calendar:focus-visible { outline: none; }

.new-booking-button { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border: 0; border-radius: 9px; background: #4f46e5; color: white; font-size: 0.8rem; font-weight: 600; cursor: pointer; box-shadow: 0 2px 5px rgba(79,70,229,0.2); transition: background 150ms ease, transform 150ms ease, box-shadow 150ms ease; }

.new-booking-button:hover { background: #4338ca; transform: translateY(-1px); box-shadow: 0 4px 10px rgba(79,70,229,0.25); }

.new-booking-button:focus-visible { outline: 3px solid rgba(79,70,229,0.28); outline-offset: 2px; }

.fc {
  --fc-border-color: #e5e7eb;
  --fc-today-bg-color: #e9edff;
  --fc-neutral-bg-color: #fafafa;
  font-family: var(--font-ui);
}

.fc:where(:not(.calendar-view--day)) .fc-day-today { background-color: #e9edff !important; }

.fc:where(:not(.calendar-view--day)) .fc-timegrid-col.fc-day-today,
.fc:where(:not(.calendar-view--day)) .fc-timegrid-col-bg .fc-day-today { background-color: #e9edff !important; }

.fc:where(:not(.calendar-view--day)) .fc-timegrid-col.fc-day-today .fc-timegrid-slot-lane,
.fc:where(:not(.calendar-view--day)) .fc-timegrid-col-bg .fc-day-today .fc-timegrid-slot-lane { background-color: #e9edff !important; }

.fc:where(:not(.calendar-view--day)) .fc-timegrid-col.fc-day-today { box-shadow: inset 2px 0 #818cf8, inset -2px 0 #818cf8; }

.fc:where(:not(.calendar-view--day)) .fc-col-header-cell.fc-day-today { background-color: #c7d2fe; color: #312e81; }

.fc .fc-daygrid-day.fc-day-today { box-shadow: inset 0 0 0 2px rgba(129,140,248,.55); }

.fc .fc-daygrid-day.fc-day-today .fc-daygrid-day-number { color: #4338ca; font-weight: 700; }

.fc .fc-list-day.fc-list-day-today > th { background-color: #c7d2fe; color: #312e81; }

.fc .calendar-day--nonworking { background-color: #f1f3f5 !important; }

.fc .fc-col-header-cell.calendar-day--nonworking { color: #94a3b8; }

.fc .fc-daygrid-day.calendar-day--nonworking .fc-daygrid-day-number { color: #94a3b8; }

.fc .fc-timegrid-now-indicator-line { border-color: #dc2626; border-width: 3px 0 0; box-shadow: 0 0 3px rgba(220,38,38,.4); }

.fc .fc-timegrid-now-indicator-arrow { margin-top: -4px; border-top-color: transparent; border-bottom-color: transparent; border-left-color: #dc2626; filter: drop-shadow(0 0 1.5px rgba(220,38,38,.4)); }

.fc .fc-toolbar-title { font-weight: 600; color: var(--brand); }

.fc.calendar-view--day { --fc-today-bg-color: transparent; }

.fc.calendar-view--day .fc-toolbar-title { white-space: nowrap; }

.fc .calendar-today-label { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: #f1eef8; color: #75648f; font-size: 12px; font-weight: 600; line-height: 1.3; vertical-align: middle; white-space: nowrap; }

.lunch-break-label { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: #334155; font-size: .85rem; font-weight: 600; text-align: center; }

.fc .fc-bg-event.lunch-break-background { opacity: 1; background: rgba(148, 163, 184, .22) !important; }

.lunch-break-label span { position: relative; padding: 4px 10px; border-radius: 6px; background: #f1f5f9; color: #1e293b; }

.fc .fc-bg-event { cursor: default; }

.fc .fc-workingWeekToggle-button { border-radius: 999px; }

.fc-theme-standard .fc-scrollgrid,
.fc-theme-standard td,
.fc-theme-standard th { border-color: #e5e7eb; }

.fc-timegrid-event {
  border-radius: 8px;
  border: none !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
  padding: 2px 4px;
  background-image: linear-gradient(135deg, rgba(0,0,0,0.16) 0%, rgba(255,255,255,0) 42%, rgba(255,255,255,0.24) 100%);
  background-blend-mode: soft-light;
  background-size: 115% 115%;
  background-position: 0% 0%;
  transform-origin: center;
  transition: transform 180ms ease, box-shadow 180ms ease, background-position 260ms ease, filter 180ms ease;
}

.fc-timegrid-event:not(.manual-block-selection-mirror):not(.fc-event-mirror):hover {
  z-index: 3;
  transform: scale(1.04);
  filter: brightness(1.08) saturate(1.14);
  box-shadow: 0 7px 18px rgba(15,23,42,.2), 0 0 15px rgba(99,102,241,.28);
  background-position: 100% 100%;
}

.fc-timegrid-event:not(.manual-block-selection-mirror):not(.fc-event-mirror):hover::after {
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: 2px;
  border-radius: inherit;
  background: conic-gradient(from var(--event-border-angle), transparent 0 58%, rgba(199,210,254,.25) 68%, #fff 78%, #818cf8 86%, transparent 100%);
  content: '';
  pointer-events: none;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  animation: event-border-orbit 1150ms linear infinite;
}

@keyframes event-border-orbit { to { --event-border-angle: 360deg; } }

.fc-timegrid-event-harness:has(.fc-timegrid-event:hover) {
  z-index: 20 !important;
}

.fc-event-title { font-weight: 600; }

.fc-event-time { font-weight: 400; opacity: 0.85; }

.fc-timegrid-event .fc-event-main { padding: 0; }

.appointment-event {
  min-width: 0;
  padding: 8px 10px;
  line-height: 1.2;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.appointment-event__customer,
.appointment-event__service,
.appointment-event__addons {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.appointment-event__customer { font-size: 0.85rem; font-weight: 700; }

/* Match block titles: keep one line and hide a duration that cannot fit. */
.appointment-event__customer--with-duration {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 0 6px;
  height: 1.2em;
  flex-shrink: 0;
}

.appointment-event__duration {
  flex: 0 0 auto;
  font-size: .82em;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}


.appointment-event__service { margin-top: 1px; font-size: 0.75rem; opacity: 0.9; }

.appointment-event__addons { margin-top: 2px; font-size: .7rem; opacity: .82; }

.fc .fc-button {
  background-color: white;
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  color: var(--ui-accent-ink);
  text-transform: capitalize;
  box-shadow: none;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.fc .fc-resourceTimeGridDay-button,
.fc .fc-timeGridWeek-button,
.fc .fc-dayGridMonth-button,
.fc .fc-listWeek-button { display: inline-flex; align-items: center; gap: 6px; }

.fc-view-button__icon { width: 14px; height: 14px; flex: 0 0 auto; }

.fc .fc-button:hover:not(:disabled) {
  background-color: var(--ui-accent-soft);
  border-color: #a5b4fc;
  color: var(--ui-accent-ink);
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.14);
}

.fc .fc-today-button { border-color: transparent; background: transparent; color: #64748b; box-shadow: none; text-transform: none; }

.fc .fc-refresh-button.fc-button { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 36px; padding: 0; border: 0 !important; background: transparent !important; box-shadow: none !important; }

.fc-refresh-icon { display: block; width: 20px; height: 20px; flex: 0 0 auto; }

.fc .fc-refresh-button::after { content: attr(aria-label); display: none; position: absolute; bottom: calc(100% + 6px); left: 50%; z-index: 1000; transform: translateX(-50%); padding: 5px 8px; border-radius: 6px; background: #111827; color: #fff; font-size: 11px; font-weight: 500; line-height: 1.2; text-transform: none; white-space: nowrap; pointer-events: none; }

.fc .fc-refresh-button:hover::after,
.fc .fc-refresh-button:focus-visible::after { display: block; }

.fc .fc-today-button.is-calendar-hidden { display: none !important; }

.fc .fc-today-button:hover:not(:disabled) { border-color: #c7d2fe; background: #f5f3ff; color: #4338ca; box-shadow: none; }

.fc .fc-button:focus-visible {
  outline: 3px solid rgba(79, 70, 229, 0.3);
  outline-offset: 2px;
}

.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc-button-primary:not(:disabled):active {
  background-color: var(--ui-accent-soft);
  border-color: #c7d2fe;
  color: var(--ui-accent-ink);
  box-shadow: none !important;
  font-weight: 600;
}

.fc .fc-button-primary:not(:disabled).fc-button-active:hover,
.fc .fc-button-primary:not(:disabled):active:hover {
  background-color: #e0e7ff;
  border-color: #a5b4fc;
  color: var(--ui-accent-ink);
  box-shadow: none !important;
}

.fc .fc-button:disabled { cursor: default; opacity: 0.55; }

.fc .fc-toolbar {
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}

.fc .fc-toolbar-chunk { display: flex; justify-content: center; }

.fc .fc-toolbar-title { font-size: 1rem; text-align: center; }

.fc .fc-button {
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  min-height: 40px;
}

.fc .fc-timegrid-slot-label-cushion { font-size: 0.7rem; }

.fc-event-title, .fc-event-time { font-size: 0.72rem; line-height: 1.1; }

@media (min-width: 640px) {
  .fc .fc-toolbar { flex-direction: row; justify-content: space-between; }
  .fc .fc-toolbar-title { font-size: 1.15rem; }
  .fc-event-title, .fc-event-time { font-size: 0.8rem; }
}

@media (min-width: 1024px) {
  .fc .fc-toolbar-title { font-size: 1.3rem; }
  .fc .fc-button { font-size: 0.875rem; }
  .fc-event-title, .fc-event-time { font-size: 0.85rem; }
}

.fc .fc-toolbar .fc-workingWeekToggle-button {
  min-height: 28px;
  align-self: center;
  padding: 3px 8px;
  border-color: #e2e8f0;
  background: transparent;
  color: #64748b;
  font-size: 0;
  font-weight: 600;
  box-shadow: none;
}

.fc .fc-toolbar .fc-workingWeekToggle-button::after {
  content: attr(data-label);
  font-size: .68rem;
}

.fc .fc-toolbar .fc-workingWeekToggle-button:hover:not(:disabled) {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #334155;
  box-shadow: none;
}

.fc .fc-toolbar .fc-workingWeekToggle-button[aria-pressed="true"] {
  border-color: #cbd5e1;
  background: #f1f5f9;
  color: #475569;
}

.person-tab {
  border: 0;
  background: transparent;
  font: inherit;
  flex: 1;
  text-align: center;
  padding: 10px 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #6b7280;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  user-select: none;
}

.person-tab.active { color: #1f2937; border-bottom-color: #1f2937; }

.agenda-status {
  min-height: 18px;
  margin: 0 4px 8px;
  color: #6b7280;
  font-size: 0.75rem;
  line-height: 18px;
}

.agenda-status--warning { color: #92400e; }

.calendar-error { color: #dc2626; font-size: .875rem; }

.fc .fc-col-header-cell-cushion { padding: 10px 6px; font-size: 0.85rem; font-weight: 600; }

.fc .fc-resource .fc-col-header-cell-cushion::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--operator-color, #6b7280);
}

.fc .fc-timegrid-slot { height: 14px; }

.fc .fc-timegrid-slot-minor { border-top-style: dotted; }

.fc:where(:not(.calendar-view--day)) .fc-timegrid-slot-lane.calendar-slot--today { background: #f7f7ff !important; }

.fc .fc-toolbar.fc-header-toolbar { margin-bottom: 12px; }

.fc .fc-event { cursor: pointer; }

.fc .fc-daygrid-event { background: transparent !important; border: 0; border-bottom: 1px solid #e5e7eb; color: #1f2937; border-radius: 0; }

.month-event { display: flex; align-items: center; gap: 6px; min-width: 0; margin: 1px 3px; padding: 4px 5px 5px; font-size: 0.78rem; line-height: 1.25; transition: background-color 150ms ease, transform 150ms ease; }

.fc .fc-daygrid-event:hover .month-event { background: #f8fafc; transform: translateX(2px); }

.fc .fc-daygrid-day-frame { min-height: 0; }

.fc .fc-daygrid-more-link { margin: 3px 5px; color: #4f46e5; font-size: 0.72rem; font-weight: 600; }

.fc .fc-daygrid-more-link:hover { color: #4338ca; text-decoration: none; }

.fc-dayGridMonth-view .fc-daygrid-body,
.fc-dayGridMonth-view .fc-daygrid-body > table { height: 100% !important; }

.fc-dayGridMonth-view .fc-daygrid-body > table > tbody > tr { height: 16.6667% !important; }

.fc-dayGridMonth-view .fc-daygrid-day-events { max-height: calc(100% - 24px); overflow: hidden; }

.month-event__dot { flex: 0 0 auto; width: 7px; height: 7px; border-radius: 999px; }

.month-event__customer { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }

.fc .fc-event-draggable { cursor: grab; }

.fc .fc-event:focus-visible { outline: 2px solid #111827; outline-offset: 2px; }

@media (min-width: 1024px) {
  .fc .fc-toolbar-title { font-size: 1.15rem; }
  .fc .fc-button { min-height: 36px; padding: 6px 12px; font-size: 0.8rem; }
  .appointment-event { line-height: 1.2; padding: 8px 10px; }
  .appointment-event__customer { font-size: 0.85rem; }
  .appointment-event__service { font-size: 0.75rem; }
}

@media (max-width: 639px) {
  .fc .fc-timegrid-slot { height: 22px; }
  .new-booking-button { min-height: 34px; padding: 0 9px; font-size: 0.7rem; }
}

.booking-highlight {
  z-index: 30 !important;
  transform-origin: center;
  animation: booking-highlight 2200ms cubic-bezier(.2,.8,.2,1);
}

.booking-confetti { position: fixed; inset: 0; z-index: 100; width: 100vw; height: 100vh; pointer-events: none; }

.fc-timegrid-event-harness:has(.booking-highlight) { z-index: 30 !important; }

.fc-resourceTimeGridDay-view .appointment-event { padding: 8px 10px; }

.fc-resourceTimeGridDay-view .appointment-event__customer { font-size: 0.85rem; }

.fc-resourceTimeGridDay-view .appointment-event__service { font-size: 0.75rem; }

.appointment-event__status { margin-top: auto; padding-top: 8px; font-size: 0.72rem; font-weight: 500; opacity: 0.78; }

.appointment-event--compact .appointment-event__status { display: none; }

.appointment-event--tiny { justify-content: center; padding: 3px 8px; }

.appointment-event--tiny .appointment-event__customer,
.manual-block-event--tiny > strong { font-size: .72rem; }

.appointment-event--tiny .appointment-event__service,
.appointment-event--tiny .appointment-event__status { display: none !important; }

.fc-resourceTimeGridDay-view .appointment-event--compact { padding: 5px 10px; }

.fc-resourceTimeGridDay-view .appointment-event--compact .appointment-event__customer,
.fc-resourceTimeGridDay-view .manual-block-event--compact > strong { font-size: 0.82rem; }

.fc-resourceTimeGridDay-view .appointment-event--compact .appointment-event__service { font-size: 0.75rem; }

.fc-resourceTimeGridDay-view .appointment-event--tiny .appointment-event__service { display: none !important; }

.fc-resourceTimeGridDay-view .appointment-event--compact .appointment-event__status { display: none; }

.fc-resourceTimeGridDay-view .appointment-event--roomy .appointment-event__status { display: block; }

@keyframes booking-highlight {
  0% {
    opacity: 0;
    transform: scale(.88);
    filter: brightness(1.35) saturate(1.2);
    box-shadow: 0 0 0 0 rgba(245,158,11,0), 0 0 0 rgba(245,158,11,0);
  }
  12% {
    opacity: 1;
    transform: scale(1.045);
    filter: brightness(1.18) saturate(1.15);
    box-shadow: 0 0 0 7px rgba(245,158,11,.9), 0 0 28px 12px rgba(245,158,11,.48);
  }
  34% {
    transform: scale(1);
    filter: brightness(1);
    box-shadow: 0 0 0 3px rgba(245,158,11,.62), 0 0 14px 5px rgba(245,158,11,.25);
  }
  52% {
    transform: scale(1.025);
    box-shadow: 0 0 0 7px rgba(245,158,11,.72), 0 0 24px 9px rgba(245,158,11,.36);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(245,158,11,0), 0 0 0 rgba(245,158,11,0);
  }
}

.booking-cancelled {
  z-index: 30;
  pointer-events: none;
  overflow: hidden;
  transform-origin: center;
  animation: booking-cancelled 700ms cubic-bezier(.4,0,.8,.2) forwards;
}

@keyframes booking-cancelled {
  0% {
    opacity: 1;
    transform: translateX(0) scale(1);
    filter: brightness(1);
    box-shadow: 0 0 0 0 rgba(239,68,68,0);
  }
  14% {
    transform: translateX(-3px) scale(1.025);
    filter: brightness(1.12) saturate(1.3);
    box-shadow: 0 0 0 6px rgba(239,68,68,.82), 0 0 24px 9px rgba(239,68,68,.4);
  }
  24% { transform: translateX(3px) scale(1.025); }
  34% {
    opacity: 1;
    transform: translateX(-2px) scale(1.015);
    filter: grayscale(.35) brightness(.92);
    box-shadow: 0 0 0 3px rgba(239,68,68,.55), 0 0 12px 4px rgba(239,68,68,.2);
  }
  100% {
    opacity: 0;
    transform: translateY(8px) scale(.78);
    filter: grayscale(1) brightness(.65);
    box-shadow: 0 0 0 0 rgba(239,68,68,0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .booking-highlight { animation: none; }
  .booking-cancelled { display: none; }
  .fc-timegrid-event:hover::after { animation: none; }
}

.manual-block-event--deletable {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  align-content: space-between;
  column-gap: 4px;
  padding: 5px 6px 8px;
  overflow: hidden;
}
.manual-block-event--deletable > strong,
.manual-block-event--deletable > span { min-width: 0; overflow: hidden; white-space: nowrap; }
.manual-block-event--deletable > span { grid-column: 1; align-self: end; text-overflow: ellipsis; }
.manual-block-event--deletable > strong { align-self: start; }
.manual-block-quick-delete {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  min-height: 24px;
  padding: 3px;
  border: 0;
  border-radius: 4px;
  background: #b91c1c;
  color: #fff;
  font-size: 10px;
  line-height: 1.2;
  cursor: pointer;
}
@media (hover: hover) and (pointer: fine) {
  .manual-block-quick-delete { display: inline-flex; opacity: 0; pointer-events: none; }
  .fc-event:hover .manual-block-quick-delete,
  .fc-event:focus-within .manual-block-quick-delete,
  .manual-block-quick-delete.is-armed,
  .manual-block-quick-delete.is-pending { opacity: 1; pointer-events: auto; }
}
.manual-block-quick-delete:focus-visible { outline: 2px solid #fff; outline-offset: -3px; }
.manual-block-quick-delete.is-armed { background: #b91c1c; color: #fff; }
.manual-block-quick-delete:disabled { cursor: wait; }

.manual-block-delete-tooltip {
  position: fixed;
  z-index: 1000;
  padding: 5px 8px;
  border: 1px solid #475569;
  border-radius: 6px;
  background: #111827;
  color: #fff;
  font-size: .68rem;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
  transform: translate(-100%, -100%);
}

/* A duration that cannot fit wraps below the clipped single-line title. */
.manual-block-event .manual-block-title {
  flex-wrap: wrap;
  align-content: flex-start;
  height: 1.2em;
  overflow: hidden;
  row-gap: 0;
}
.manual-block-event .manual-block-title-duration {
  flex: 0 0 auto;
  font-size: .82em;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}

/* Native background placement clips connectors to dates and resource columns. */
.fc .processing-connector-wrapper,
.fc .processing-connector,
.fc .processing-connector * { pointer-events: none !important; }
.fc .processing-connector { background: transparent !important; opacity: 1; overflow: hidden; }
.processing-rail { height: 100%; border-left: 2px dashed var(--processing-rail-color, currentColor); color: var(--theme-muted, #64748b); opacity: .5; padding-left: 10px; display: flex; align-items: center; font-size: 12px; }
.processing-rail span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc .processing-connector.phase-parent-active .processing-rail { opacity: .9; border-left-width: 2px; }
.fc .appointment-work-phase { overflow: hidden; min-height: 0 !important; }
.fc .appointment-work-phase .appointment-event { position: relative; overflow: hidden; height: 100%; padding-right: 42px; }
.fc .fc-timegrid-event.appointment-work-phase.phase-parent-active {
  box-shadow: none;
  animation: work-phase-pulse 1.5s ease-in-out infinite;
}
@keyframes work-phase-pulse {
  0%, 100% { filter: brightness(.8) saturate(1.15); }
  50% { filter: brightness(1.45) saturate(1.2); }
}
@media (prefers-reduced-motion: reduce) {
  .fc .fc-timegrid-event.appointment-work-phase.phase-parent-active {
    animation: none;
    filter: brightness(1.25);
  }
}
.work-phase-badge { position: absolute; right: 4px; top: 5px; font-size: 13px; line-height: 14px; border: 1px solid currentColor; border-radius: 4px; padding: 0 3px; opacity: .8; }
/* Disable FullCalendar's minimum hit height: work must stop at the processing gap. */
.fc .fc-timegrid-event-harness:has(.appointment-work-phase) { overflow: hidden; }
.fc .fc-timegrid-event-harness .appointment-work-phase { max-height: 100%; }

.fc .appointment-work-phase,
.fc .processing-connector { container-type: size; }
.fc .appointment-work-phase .appointment-event--tiny { justify-content: flex-start; padding: 0 42px 0 3px; }
.fc .appointment-work-phase .appointment-event--tiny .appointment-event__customer { font-size: 10px; line-height: 12px; height: 12px; }
@container (max-height: 10px) {
  .appointment-work-phase .appointment-event--tiny .appointment-event__customer { font-size: 6px !important; line-height: 6px !important; height: 6px !important; }
}
@container (max-height: 39px) { .processing-rail span { display: none; } }
@container (max-width: 90px) { .processing-rail span { display: none; } }

.fc .fc-timegrid-event.appointment-work-phase { padding: 0; border-radius: 4px; background-image: none; }
.fc .fc-timegrid-event.appointment-work-phase:hover { transform: none; box-shadow: none; }
.fc .fc-timegrid-event.appointment-work-phase:hover::after { display: none; }
.fc .fc-timegrid-event:not(.appointment-work-phase) { min-height: 15px; }
