/* ZAUZMI calendar card visual source of truth (2026-10-14).
   app.js alone positions event top/height/left/width and overlap lanes.
   This sheet handles only content, compact durations and contrast.
   Must load AFTER all existing calendar and responsive CSS. */
#calendar{--calendar-card-content-zoom:var(--calendar-user-zoom,1)}
@media(max-width:620px), (orientation:landscape) and (max-height:600px) and (pointer:coarse){
  #calendar #calendarGrid.calendar-time-timeline{
    --calendar-card-content-zoom:var(--calendar-mobile-height-scale,var(--calendar-user-zoom,1));
  }
}
html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline
.calendar-time-events-surface > .calendar-timeline-event.event[data-appointment-id]{
  display:flex!important;flex-direction:column!important;flex-wrap:nowrap!important;
  justify-content:flex-start!important;align-items:stretch!important;
  box-sizing:border-box!important;
  min-height:0!important;
  font-family:Inter,system-ui,sans-serif!important;
  letter-spacing:normal!important;text-shadow:none!important;
  gap:calc(2px * var(--calendar-card-content-zoom,1))!important;
  padding:calc(4px * var(--calendar-card-content-zoom,1)) calc(7px * var(--calendar-card-content-zoom,1)) calc(var(--calendar-card-bottom-padding,25px) * var(--calendar-card-content-zoom,1))!important;
  overflow:hidden!important;
  border-left:1px solid rgba(42,75,101,.14)!important;
  border-radius:calc(8px * var(--calendar-card-content-zoom,1))!important;
}
html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
> .calendar-timeline-event.event[data-appointment-id]::before{
  content:none!important;display:none!important;
}
/* Normal text: no absolute positions competing with the footer/status. */
html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
> .calendar-timeline-event.event[data-appointment-id] .event-time,
html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
> .calendar-timeline-event.event[data-appointment-id] .event-client,
html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
> .calendar-timeline-event.event[data-appointment-id] .event-worker{
  position:static!important;display:block!important;flex:0 0 auto!important;
  box-sizing:border-box!important;min-width:0!important;min-height:0!important;
  height:auto!important;max-height:none!important;
  margin:0!important;padding:0!important;
  overflow:hidden!important;white-space:nowrap!important;text-overflow:ellipsis!important;
  color:var(--calendar-card-foreground,#203950)!important;
}
html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
> .calendar-timeline-event.event[data-appointment-id] .event-time{
  max-width:calc(100% - clamp(54px,45%,70px))!important;
  font-size:calc(11px * var(--calendar-card-content-zoom,1))!important;
  line-height:1.25!important;font-weight:500!important;
}
html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
> .calendar-timeline-event.event[data-appointment-id] .event-time,
html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
> .calendar-timeline-event.event[data-appointment-id] .event-micro-time{
  font-variant-numeric:tabular-nums lining-nums!important;
  letter-spacing:.015em!important;
}
html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
> .calendar-timeline-event.event[data-appointment-id] .event-client{
  width:100%!important;max-width:100%!important;
  padding-left:var(--calendar-delivery-client-inset,0)!important;
  font-size:calc(13px * var(--calendar-card-content-zoom,1))!important;
  line-height:1.25!important;font-weight:600!important;
}
html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
> .calendar-timeline-event.event[data-appointment-id]:has(.calendar-attendance-actions) .event-worker{display:none!important}
html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
> .calendar-timeline-event.event[data-appointment-id] .event-service{
  position:static!important;display:block!important;flex:0 0 auto!important;
  align-self:stretch!important;
  box-sizing:border-box!important;
  width:100%!important;min-width:0!important;max-width:100%!important;
  height:auto!important;min-height:0!important;max-height:calc(18px * var(--calendar-card-content-zoom,1))!important;
  margin:0!important;
  padding:0 var(--calendar-delivery-service-inset,0) 0 0!important;
  font-size:calc(11px * var(--calendar-card-content-zoom,1))!important;
  font-weight:400!important;line-height:1.25!important;
  color:var(--calendar-card-foreground,#203950)!important;
  background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important;
  overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;
}
html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
> .calendar-timeline-event.event[data-appointment-id] .event-service-name{
  display:block!important;min-width:0!important;max-width:100%!important;
  font-size:inherit!important;font-weight:inherit!important;line-height:inherit!important;
  color:inherit!important;background:transparent!important;border:0!important;padding:0!important;
  overflow:hidden!important;white-space:nowrap!important;text-overflow:ellipsis!important;
}
html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
> .calendar-timeline-event.event[data-appointment-id] .event-service-dot{display:none!important}
html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
> .calendar-timeline-event.event[data-appointment-id] .calendar-status-vehicle-row{display:contents!important}
/* Identical status badge on 30m, 45m, and hour-long cards.
   The same readable font-size is applied inline by app.js. */
html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
> .calendar-timeline-event.event[data-appointment-id] .event-status-tag{
  position:absolute!important;display:inline-flex!important;box-sizing:border-box!important;
  top:calc(3px * var(--calendar-card-content-zoom,1))!important;
  right:calc(4px * var(--calendar-card-content-zoom,1))!important;
  left:auto!important;bottom:auto!important;
  align-items:center!important;justify-content:center!important;
  width:max-content!important;min-width:0!important;max-width:46%!important;
  height:auto!important;min-height:calc(15px * var(--calendar-card-content-zoom,1))!important;
  max-height:calc(20px * var(--calendar-card-content-zoom,1))!important;
  margin:0!important;padding:calc(2px * var(--calendar-card-content-zoom,1)) calc(6px * var(--calendar-card-content-zoom,1))!important;
  border:1px solid rgba(80,116,153,.2)!important;
  border-radius:calc(6px * var(--calendar-card-content-zoom,1))!important;
  font-weight:500!important;line-height:1.1!important;
  overflow:hidden!important;white-space:nowrap!important;text-overflow:ellipsis!important;
  z-index:4!important;
}
html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
> .calendar-timeline-event.event[data-appointment-id] .event-status-tag.ok{
  --calendar-status-background:#18864b;--calendar-status-border:#a5e4bc;--calendar-status-ink:#fff;
}
/* Recorded attendance uses the same green visual status across calendar layouts. */
html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
> .calendar-timeline-event.event-done[data-appointment-id]{
  --status-color:#18864b;
  border-left-color:#18864b!important;
}
html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
> .calendar-timeline-event.event-done[data-appointment-id] .event-status-tag.done{
  --calendar-status-background:#18864b;
  --calendar-status-border:#a5e4bc;
  --calendar-status-ink:#fff;
}
#calendar .calendar-month-event.month-event-done{
  border-color:#b8ddc7!important;
  border-left-color:#18864b!important;
  background:#eef9f2!important;
}
/* >=60m: only this CSS defines the footer attendance row. */
html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
> .calendar-timeline-event.event[data-appointment-id]:not(.calendar-short-event) .calendar-attendance-actions{
  display:flex!important;position:absolute!important;
  box-sizing:border-box!important;
  top:auto!important;bottom:calc(4px * var(--calendar-card-content-zoom,1))!important;
  left:calc(6px * var(--calendar-card-content-zoom,1))!important;right:auto!important;
  flex:0 0 auto!important;flex-direction:row!important;flex-wrap:nowrap!important;
  align-items:center!important;justify-content:flex-start!important;
  width:max-content!important;min-width:0!important;max-width:calc(100% - 12px)!important;
  height:calc(20px * var(--calendar-card-content-zoom,1))!important;
  min-height:0!important;max-height:calc(20px * var(--calendar-card-content-zoom,1))!important;
  margin:0!important;padding:0!important;
  gap:calc(4px * var(--calendar-card-content-zoom,1))!important;
  border:0!important;overflow:hidden!important;z-index:3!important;
}
html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
> .calendar-timeline-event.event[data-appointment-id]:not(.calendar-short-event) .calendar-attendance-actions button[data-calendar-attendance]{
  position:static!important;display:inline-flex!important;box-sizing:border-box!important;
  top:auto!important;left:auto!important;right:auto!important;bottom:auto!important;
  flex:0 1 auto!important;align-items:center!important;justify-content:center!important;
  width:auto!important;min-width:0!important;max-width:calc(50% - 2px)!important;
  height:calc(19px * var(--calendar-card-content-zoom,1))!important;
  min-height:calc(19px * var(--calendar-card-content-zoom,1))!important;
  max-height:calc(19px * var(--calendar-card-content-zoom,1))!important;
  margin:0!important;padding:0 calc(6px * var(--calendar-card-content-zoom,1))!important;
  font-size:calc(9px * var(--calendar-card-content-zoom,1))!important;
  line-height:1!important;white-space:nowrap!important;
  border-radius:calc(6px * var(--calendar-card-content-zoom,1))!important;
}
html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
> .calendar-timeline-event.event[data-appointment-id]:not(.calendar-short-event):has(.calendar-vehicle-ready-btn) .calendar-attendance-actions{
  right:calc(80px * var(--calendar-card-content-zoom,1))!important;
  max-width:none!important;width:auto!important;
}
html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
> .calendar-timeline-event.event[data-appointment-id]:has(.calendar-vehicle-ready-btn) .calendar-vehicle-ready-btn{
  position:absolute!important;
  bottom:calc(5px * var(--calendar-card-content-zoom,1))!important;
  right:calc(5px * var(--calendar-card-content-zoom,1))!important;
  height:calc(21px * var(--calendar-card-content-zoom,1))!important;
  min-width:calc(64px * var(--calendar-card-content-zoom,1))!important;
  max-width:calc(74px * var(--calendar-card-content-zoom,1))!important;
  font-size:calc(8px * var(--calendar-card-content-zoom,1))!important;
}
/* No action footer: balance the text vertically, without changing geometry.
   Vehicle-ready and confirmation controls retain their reserved space. */
html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
> .calendar-timeline-event.event[data-appointment-id]:not(:has(.calendar-attendance-actions,.calendar-vehicle-ready-btn,.calendar-confirm-btn)){
  justify-content:center!important;
  padding:calc(5px * var(--calendar-card-content-zoom,1)) calc(7px * var(--calendar-card-content-zoom,1))!important;
}
/* <60m: actions stay in appointment detail, preserving three readable rows. */
html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
> .calendar-timeline-event.calendar-short-event.event[data-appointment-id]{
  padding:calc(4px * var(--calendar-card-content-zoom,1)) calc(6px * var(--calendar-card-content-zoom,1))!important;
  gap:0!important;
}
html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
> .calendar-timeline-event.calendar-short-event.event[data-appointment-id] .calendar-attendance-actions,
html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
> .calendar-timeline-event.calendar-short-event.event[data-appointment-id] .calendar-attendance-actions button,
html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
> .calendar-timeline-event.calendar-short-event.event[data-appointment-id] .event-worker,
html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
> .calendar-timeline-event.calendar-short-event.event[data-appointment-id] .event-extra-tags{
  display:none!important;
}
html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
> .calendar-timeline-event.calendar-tiny-event:not(.calendar-micro-event).event[data-appointment-id] .event-client{
  font-size:calc(12px * var(--calendar-card-content-zoom,1))!important;
  height:auto!important;max-height:none!important;line-height:1.05!important;
}
html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
> .calendar-timeline-event.calendar-tiny-event:not(.calendar-micro-event).event[data-appointment-id] .event-service{
  font-size:calc(10px * var(--calendar-card-content-zoom,1))!important;
  height:auto!important;min-height:0!important;max-height:none!important;
  padding:0!important;line-height:1.1!important;
}
/* <30m: prioritize time and client over secondary service metadata.
   Full service details remain available when opening the appointment. */
html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
> .calendar-timeline-event.event[data-appointment-id] .event-micro-summary{display:none!important}
html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
> .calendar-timeline-event.calendar-micro-event.event[data-appointment-id]{
  padding:calc(1px * var(--calendar-card-content-zoom,1)) calc(5px * var(--calendar-card-content-zoom,1))!important;
  gap:0!important;
}
html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
> .calendar-timeline-event.calendar-micro-event.event[data-appointment-id] .event-time,
html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
> .calendar-timeline-event.calendar-micro-event.event[data-appointment-id] .event-client,
html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
> .calendar-timeline-event.calendar-micro-event.event[data-appointment-id] .event-service,
html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
> .calendar-timeline-event.calendar-micro-event.event[data-appointment-id] .event-status-tag,
html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
> .calendar-timeline-event.calendar-micro-event.event[data-appointment-id] .calendar-confirm-btn{
  display:none!important;
}
html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
> .calendar-timeline-event.calendar-micro-event.event[data-appointment-id] .event-micro-summary{
  display:grid!important;grid-template-columns:auto minmax(0,1fr)!important;
  grid-template-rows:auto!important;column-gap:6px!important;row-gap:0!important;
  width:100%!important;min-width:0!important;max-width:100%!important;
  align-items:center!important;
  font-size:calc(11px * var(--calendar-card-content-zoom,1))!important;
  line-height:1.2!important;color:var(--calendar-card-foreground,#24445f)!important;
}
html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
> .calendar-timeline-event.calendar-micro-event.event[data-appointment-id] .event-micro-time{
  font-size:calc(10px * var(--calendar-card-content-zoom,1))!important;
  grid-column:1!important;grid-row:1!important;white-space:nowrap!important;font-weight:500!important;
}
html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
> .calendar-timeline-event.calendar-micro-event.event[data-appointment-id] .event-micro-client{
  grid-column:2!important;grid-row:1!important;min-width:0!important;
  overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;font-weight:600!important;
}
html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
> .calendar-timeline-event.calendar-micro-event.event[data-appointment-id] .event-micro-service{
  display:none!important;
}
/* Mobile: client/service on the left; status and time share the right column.
   Keep the JS-owned event geometry and the desktop text hierarchy unchanged. */
@media(max-width:620px), (orientation:landscape) and (max-height:600px) and (pointer:coarse){
  html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
  > .calendar-timeline-event.calendar-short-event:not(.calendar-micro-event).event[data-appointment-id]{
    padding:calc(5px * var(--calendar-card-content-zoom,1)) calc(6px * var(--calendar-card-content-zoom,1))!important;
  }
  html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
  > .calendar-timeline-event.event[data-appointment-id]:not(.calendar-micro-event) .event-time{
    position:absolute!important;
    top:calc(24px * var(--calendar-card-content-zoom,1))!important;
    right:calc(4px * var(--calendar-card-content-zoom,1))!important;
    left:auto!important;bottom:auto!important;
    width:max-content!important;max-width:calc(80px * var(--calendar-card-content-zoom,1))!important;
    text-align:right!important;
    font-size:calc(10px * var(--calendar-card-content-zoom,1))!important;
    line-height:1.2!important;
  }
  html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
  > .calendar-timeline-event.event[data-appointment-id]:not(.calendar-micro-event) .event-client,
  html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
  > .calendar-timeline-event.event[data-appointment-id]:not(.calendar-micro-event) .event-service,
  html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
  > .calendar-timeline-event.event[data-appointment-id]:not(.calendar-micro-event) .event-worker{
    max-width:calc(100% - 84px * var(--calendar-card-content-zoom,1))!important;
  }
  html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
  > .calendar-timeline-event.event[data-appointment-id] .event-client{
    font-weight:700!important;
  }
  html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
  > .calendar-timeline-event.event[data-appointment-id] .event-status-tag{
    max-width:calc(80px * var(--calendar-card-content-zoom,1))!important;
  }
  /* A <30m event has only one readable row: client first, time on the right. */
  html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
  > .calendar-timeline-event.calendar-micro-event.event[data-appointment-id] .event-micro-summary{
    grid-template-columns:minmax(0,1fr) auto!important;
  }
  html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
  > .calendar-timeline-event.calendar-micro-event.event[data-appointment-id] .event-micro-client{
    grid-column:1!important;font-weight:700!important;
  }
  html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
  > .calendar-timeline-event.calendar-micro-event.event[data-appointment-id] .event-micro-time{
    grid-column:2!important;text-align:right!important;
  }
}
/* Contrast is canonical here, not in the booking modal stylesheet. */
html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
> .calendar-timeline-event.calendar-card-dark.event[data-appointment-id]{
  background:var(--card-color,#246eb8)!important;
}
html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
> .calendar-timeline-event.calendar-card-dark.event[data-appointment-id] .event-time,
html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
> .calendar-timeline-event.calendar-card-dark.event[data-appointment-id] .event-client,
html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
> .calendar-timeline-event.calendar-card-dark.event[data-appointment-id] .event-worker,
html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
> .calendar-timeline-event.calendar-card-dark.event[data-appointment-id] .event-micro-summary,
html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
> .calendar-timeline-event.calendar-card-dark.event[data-appointment-id] .event-micro-summary span{
  color:#fff!important;
}
html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
> .calendar-timeline-event.calendar-card-dark.event[data-appointment-id] .event-service{
  color:#fff!important;
}
html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
> .calendar-timeline-event.calendar-card-dark.event[data-appointment-id] .event-service-name{color:#fff!important}
html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
> .calendar-timeline-event.calendar-card-dark.event[data-appointment-id] .event-status-tag{
  color:var(--calendar-status-ink,#fff)!important;-webkit-text-fill-color:var(--calendar-status-ink,#fff)!important;
  background:var(--calendar-status-background,rgba(5,35,78,.52))!important;border-color:var(--calendar-status-border,rgba(255,255,255,.5))!important;
}
html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
> .calendar-timeline-event.calendar-card-light.event[data-appointment-id] .event-status-tag{
  color:var(--calendar-status-ink,#234867)!important;-webkit-text-fill-color:var(--calendar-status-ink,#234867)!important;
  background:var(--calendar-status-background,#f7fbff)!important;border-color:var(--calendar-status-border,#afc7dc)!important;
}
html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
> .calendar-timeline-event.calendar-card-dark.event[data-appointment-id] .calendar-attendance-actions button[data-calendar-attendance="present"]{
  background:#f0fff6!important;border:1px solid #84c3a1!important;
  color:#175f3b!important;-webkit-text-fill-color:#175f3b!important;
}
html body #calendar.page #calendarGrid.calendar-grid.calendar-time-timeline .calendar-time-events-surface
> .calendar-timeline-event.calendar-card-dark.event[data-appointment-id] .calendar-attendance-actions button[data-calendar-attendance="noshow"]{
  background:#fff3f3!important;border:1px solid #db9fa4!important;
  color:#982d3b!important;-webkit-text-fill-color:#982d3b!important;
}

/* The time and occupancy belong to the top and bottom of the same class card. */
.calendar-group-class-card{--calendar-card-bottom-padding:4px}
.group-calendar-body{
  position:relative;display:grid;grid-template-rows:auto minmax(0,1fr) auto;
  flex:1 1 0;width:100%;min-width:0;min-height:0;
  color:var(--calendar-card-foreground,#203950);
}
.calendar-timeline-event > .group-calendar-body{container:group-card / size}
.group-calendar-heading{display:flex;align-items:start;justify-content:space-between;gap:4px;min-width:0}
.group-calendar-time,.group-calendar-count strong{font-variant-numeric:tabular-nums lining-nums;font-weight:750}
.group-calendar-time{font-size:clamp(10px,calc(11px * var(--calendar-card-content-zoom,1)),15px);line-height:1.2}
.group-calendar-tag,.group-calendar-count{border-radius:5px;white-space:nowrap}
.group-calendar-tag{
  padding:2px 5px;border:1px solid currentColor;
  font-size:10px;font-weight:650;line-height:1.05;
}
.group-calendar-details{min-width:0;overflow:hidden;padding-top:2px}
.group-calendar-name,.group-calendar-trainer{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.group-calendar-name{font-size:clamp(11px,calc(12px * var(--calendar-card-content-zoom,1)),16px);font-weight:700;line-height:1.1}
.group-calendar-trainer{font-size:11px;line-height:1.2}
.calendar-short-event .group-calendar-trainer{display:none}
.group-calendar-count{
  justify-self:start;max-width:100%;padding:0 3px;
  background:rgba(128,128,128,.18);background:color-mix(in srgb,currentColor 13%,transparent);
  font-size:clamp(9px,calc(10px * var(--calendar-card-content-zoom,1)),14px);line-height:1.1;
}
.group-calendar-count strong{font-size:clamp(10px,calc(11px * var(--calendar-card-content-zoom,1)),15px)}
@container group-card (max-width:96px){
  .group-calendar-tag,.group-calendar-count-label{display:none}
}
@container group-card (max-height:59px){
  .group-calendar-trainer{display:none}
}
@container group-card (max-width:175px){
  .group-calendar-tag{display:none}
}
@container group-card (max-width:175px) and (min-height:49px){
  .group-calendar-details{padding-top:0}
  .group-calendar-name{
    display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;
    white-space:normal;overflow-wrap:anywhere;
  }
  .group-calendar-trainer{display:none}
}
@container group-card (max-height:43px){
  .group-calendar-tag{display:none}
  .group-calendar-details{padding-top:0}
}
@container group-card (max-height:37px){
  .group-calendar-details{display:none}
  .group-calendar-count{grid-row:3}
}
@container group-card (max-height:25px){
  .group-calendar-count{padding:0;background:transparent}
  .group-calendar-count-label{display:none}
}
@container group-card (max-height:19px){
  .group-calendar-count{position:absolute;inset:0 0 auto auto;grid-row:auto}
}

/* Delivery problems stay visible without replacing the staff's card color. */
#calendarGrid .appointment-delivery-bell{
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  width:24px;height:24px;flex:0 0 24px;box-sizing:border-box;
  color:#b91c32!important;-webkit-text-fill-color:#b91c32!important;
  background:#fff4f5;border:1px solid #da7684;border-radius:50%;
  pointer-events:none;z-index:6;line-height:0;padding:0;margin:0;
}
#calendarGrid .appointment-delivery-bell>svg{display:block;flex:none;margin:0;padding:0;position:static;transform:none}
#calendarGrid .event>.appointment-delivery-bell{position:absolute;bottom:3px;right:5px;width:18px;height:18px}
#calendarGrid .event>.appointment-delivery-bell svg{width:12px;height:12px}
#calendarGrid .event:has(>.appointment-delivery-bell)>.event-micro-summary{padding-right:22px!important;box-sizing:border-box}
#calendarGrid .event:has(>.appointment-delivery-bell){--calendar-delivery-service-inset:22px}
#calendarGrid .calendar-month-event:has(>.appointment-delivery-bell){position:relative;padding-right:28px!important}
#calendarGrid .calendar-month-event>.appointment-delivery-bell{position:absolute;right:4px;top:4px;width:20px;height:20px}
#calendarGrid .calendar-month-event>.appointment-delivery-bell svg{width:14px;height:14px}
#calendarGrid .calendar-micro-event>.appointment-delivery-bell{bottom:2px}
#calendarGrid .calendar-micro-event>.appointment-delivery-bell svg{width:12px;height:12px}
@media(max-width:760px){
  /* Parallel mobile cards may cover a neighbour's right edge. Keep its
     warning at the visible leading edge, alongside the client's name. */
  #calendarGrid .event>.appointment-delivery-bell{left:4px;right:auto;top:3px;bottom:auto;width:18px;height:18px}
  #calendarGrid .event>.appointment-delivery-bell svg{width:12px;height:12px}
  #calendarGrid .event:has(>.appointment-delivery-bell){--calendar-delivery-client-inset:22px;--calendar-delivery-service-inset:0}
  #calendarGrid .event:has(>.appointment-delivery-bell)>.event-micro-summary{padding-left:22px!important;padding-right:0!important;box-sizing:border-box}
}
@media(max-width:620px){
  #calendarGrid .calendar-month-event:has(>.appointment-delivery-bell){padding-right:19px!important}
  #calendarGrid .calendar-month-event>.appointment-delivery-bell{width:14px;height:14px;right:2px;top:1px}
  #calendarGrid .calendar-month-event>.appointment-delivery-bell svg{width:10px;height:10px}
}

/* Keep the pencil inside the visible start of the clipped time label. */
#calendar [data-appointment-id][data-has-note="true"] :is(.event-time,.event-micro-time,.calendar-month-event-time)::before{
  --calendar-note-pencil:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16.5 3.5a2.1 2.1 0 0 1 3 3L8 18l-4 1 1-4Z'/%3E%3C/svg%3E");
  content:"";
  display:inline-block;
  width:1em;
  height:1em;
  margin-inline-end:.3em;
  vertical-align:-.1em;
  background-color:currentColor;
  -webkit-mask:var(--calendar-note-pencil) center / contain no-repeat;
  mask:var(--calendar-note-pencil) center / contain no-repeat;
}
