.calendar-overlay-legend{display:flex;align-items:center;flex-wrap:wrap;gap:4px 12px;margin:3px 0 5px;font-size:10px;color:#38584d}.calendar-overlay-legend span:before{content:"";display:inline-block;width:10px;height:10px;border-radius:2px;margin-right:4px;vertical-align:-1px}.calendar-overlay-legend .planned-key:before{background:#e5f0e8;border:1px solid #9cb9a8}.calendar-overlay-legend .served-key:before{background:#78b4a2;border:1px solid #397963}.calendar-overlay-legend .paused-key:before{background:repeating-linear-gradient(135deg,#b0b7bd 0 2px,#e4e6e8 2px 4px);border:1px solid #77838c}.calendar-overlay-legend small{font-size:9px}
/* Overlay spans own the timeline. Legacy article chrome must not add a gray frame. */
.calendar .booking.calendar-service-record,.calendar .booking.calendar-service-record.done,.calendar .booking.calendar-service-record:hover,.calendar .booking.calendar-service-record.located-booking{background:transparent;border:0;box-shadow:none;isolation:isolate}.calendar .booking.calendar-service-record .booking-open:focus-visible{outline:2px solid #245e50;outline-offset:-2px}.calendar .booking.calendar-service-record .booking-open.located-booking:focus-visible{outline-color:#df971e}.calendar-service-overlay{position:absolute;inset:0;pointer-events:none;overflow:hidden;z-index:-1;border-radius:5px}.calendar-service-overlay>span{position:absolute;left:0;right:0;box-sizing:border-box;pointer-events:none}.calendar-overlay-planned{background:var(--calendar-planned-bg,#e5f0e8);box-shadow:inset 0 0 0 1px #9cb9a8;z-index:0}.calendar-service-overlay>.calendar-overlay-served{left:2px;right:2px;background:#78b4a299;border-left:3px solid #397963;z-index:1}.calendar-service-overlay>.calendar-overlay-paused{left:2px;right:2px;background:repeating-linear-gradient(135deg,#b0b7bdbb 0 3px,#e4e6e8bb 3px 6px);border-left:3px solid #77838c;z-index:2}.calendar .booking.calendar-service-record .booking-open,.calendar .booking.calendar-service-record .booking-actions{position:relative;z-index:1}.calendar .booking.calendar-service-record.done{color:#345147}.calendar .booking.calendar-service-record.financial-partial-refund{--calendar-planned-bg:#fff0cb}.calendar .booking.calendar-service-record.financial-refunded{--calendar-planned-bg:#eee8fa}.calendar .booking.calendar-service-record.financial-void{--calendar-planned-bg:#f5e5e9}.calendar .booking.calendar-service-record.awaiting-payment:not(.done):not([class*="financial-"]){background:transparent;border:0;box-shadow:none;--calendar-planned-bg:#fff0df}.calendar-overlay-description{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;clip:rect(0,0,0,0);overflow:hidden;white-space:nowrap;pointer-events:none}

/* The recorded End line stays at its true time, independent of planned bounds. */
.calendar-duration-variance{color:#9a1024;font-weight:800}
.calendar-actual-end-marker{position:absolute;left:3px;right:3px;height:0;z-index:3;pointer-events:none;color:#244c3a;font-size:9px;line-height:10px}.calendar-actual-end-line{position:absolute;left:0;right:0;top:0;border-top:2px solid #285c45;transform:translateY(-100%)}.calendar-actual-end-label{position:absolute;left:auto;right:0;bottom:2px;display:flex;flex-direction:column;align-items:flex-end;padding:1px 3px;background:transparent;border-radius:0;max-width:100%;overflow:hidden}.calendar-actual-end-label>b,.calendar-actual-end-label>span{display:block;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.calendar-actual-end-label>b{font-variant-numeric:tabular-nums}.calendar-actual-end-marker.end-label-below .calendar-actual-end-label{bottom:auto;top:2px}.calendar .booking.calendar-service-record:has(.calendar-actual-end-marker) .booking-actions{z-index:4}@media(max-width:800px){.calendar-actual-end-marker{font-size:9px;line-height:10px}}

.calendar .booking.calendar-service-record:has(.calendar-actual-end-marker.end-label-below){overflow:visible}.calendar .booking.calendar-service-record:has(.calendar-actual-end-marker) .service-final-state,.calendar .booking.calendar-service-record:has(.calendar-actual-end-marker) .financial-tag{display:none}.calendar .booking.calendar-service-record:has(.calendar-actual-end-marker) .booking-open>[data-time-start]{font-size:0}.calendar .booking.calendar-service-record:has(.calendar-actual-end-marker) .booking-open>[data-time-start]::before{content:attr(data-time-start);font-size:10px}

.calendar .booking.calendar-service-record[data-actual-end-recorded=true] .service-final-state{display:none}.calendar .booking.calendar-service-record[data-actual-end-recorded=true] .booking-open>[data-time-start]{font-size:0}.calendar .booking.calendar-service-record[data-actual-end-recorded=true] .booking-open>[data-time-start]::before{content:attr(data-time-start);font-size:10px}

/* Remaining End/cleanup controls sit after the true endpoint, never on its label. */
.calendar .booking.calendar-service-record[data-actual-end-actions=true]{overflow:visible}.calendar .booking.calendar-service-record[data-actual-end-actions=true] .booking-actions{position:absolute;top:var(--actual-end-actions-top);left:3px;right:3px;z-index:4;align-items:flex-start;background:#f5faf2e8;border-radius:3px;padding:0}.calendar .booking.calendar-service-record[data-actual-end-actions=true] .booking-actions:empty{display:none}

/* Paid extensions remain in the same card. Exact saved endpoints separate its plan. */
.calendar-service-overlay>.calendar-overlay-extension{background:#d9e9f7;box-shadow:inset 0 0 0 1px #90adc5;z-index:0}
.calendar-service-overlay>.calendar-extension-boundary{height:0;border-top:2px dashed #244c68;z-index:3;filter:drop-shadow(0 1px 0 #fff)}
.calendar-overlay-legend .extension-key:before{height:0;border-top:2px dashed #244c68;border-radius:0;vertical-align:3px}
