/* Shared date annotations. Loaded last so desktop and touch calendars agree. */
#view .appointment-mini-grid>.calendar-weekday,
#view .month-picker-grid>.calendar-weekday{font-size:11px;font-weight:600;line-height:18px;color:#57636f;padding-bottom:6px;white-space:nowrap}
#view .appointment-mini-grid>.calendar-weekday.is-weekend,
#view .month-picker-grid>.calendar-weekday.is-weekend,
#view .calendar>.calheading.is-weekend{color:#b65c00}
#view .appointment-mini-grid button,
#view .month-picker-grid button{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;min-height:47px;padding:3px 0;min-width:0;border-radius:5px;line-height:16px;color:#34414d}
#view .appointment-mini-grid button:hover,
#view .month-picker-grid button:hover{background:#eff8fa}
#view .calendar-date-top{position:relative;display:flex;align-items:center;justify-content:center;gap:1px;width:100%;height:18px;line-height:18px}
#view .calendar-day-number{font-size:13px;font-weight:550;font-variant-numeric:tabular-nums;line-height:18px}
#view .calendar-day-badge{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:10px;height:12px;padding:0 1px;border-radius:2px;font-size:9px;line-height:12px;font-weight:500;font-style:normal;background:#ad5700;color:#fff;vertical-align:top}
#view .calendar-date-top>.calendar-day-badge{position:static;flex:none}
#view .calendar-date-top:has(.calendar-day-badge) .calendar-day-number{font-size:12px}
#view .calendar-day-note{display:block;width:100%;overflow:hidden;text-overflow:clip;white-space:nowrap;font-size:10px;line-height:13px;min-height:13px;color:#788592;margin:0}
#view .calendar-count{display:block;min-height:10px;margin:0;font-size:9px;line-height:10px;color:#647986;font-variant-numeric:tabular-nums}
#view .calendar-count.is-empty{visibility:hidden}
#view .appointment-mini-grid button.is-weekend,
#view .appointment-mini-grid button.is-holiday,
#view .month-picker-grid button.is-weekend,
#view .month-picker-grid button.is-holiday{color:#b65c00}
#view .is-holiday .calendar-day-note{color:#b65c00}
#view .is-adjusted-workday .calendar-day-badge,
#view .calendar-day-badge.is-adjusted-workday{background:#687885;color:white}
#view .appointment-mini-grid button.outside{color:#b9c1c9}
#view .appointment-mini-grid button.outside .calendar-day-note{color:#b4bec6}
#view .appointment-mini-grid button.outside .calendar-day-badge{opacity:.6}
#view .appointment-mini-grid button.today,
#view .month-picker-grid button.today{box-shadow:inset 0 0 0 1px #00a6c4}
#view .appointment-mini-grid button.selected,
#view .month-picker-grid button.selected{background:#007f98;color:#fff}
#view .appointment-mini-grid button.selected .calendar-day-note,
#view .appointment-mini-grid button.selected .calendar-count,
#view .month-picker-grid button.selected .calendar-day-note,
#view .month-picker-grid button.selected .calendar-count{color:#fff}
#view .appointment-mini-grid button.selected .calendar-day-badge,
#view .month-picker-grid button.selected .calendar-day-badge{opacity:1;background:#fff;color:#9c5100}
#view .appointment-mini-grid button.selected.is-adjusted-workday .calendar-day-badge,
#view .month-picker-grid button.selected.is-adjusted-workday .calendar-day-badge{color:#526471}
#view .calendar-day-legend{display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap;margin-top:9px;font-size:10px;line-height:15px;color:#74818b}
#view .calendar-day-legend>span{display:inline-flex;align-items:center;gap:3px;white-space:nowrap}
#view .calendar-day-legend .calendar-weekend-key{color:#b65c00}
#view .calendar-schedule-unknown{text-align:center;font-size:10px;line-height:16px;color:#7a8791;margin:4px 0 0}
/* The week strip stays short; rest/work badges share the date's line. */
#view .calendar-strip-date{position:relative;display:flex;align-items:center;justify-content:center}
#view .calendar-strip-date>.calendar-day-badge{position:absolute;top:0;right:-8px}
#view .week-strip button.is-holiday .calendar-weekday,
#view .week-strip button.is-weekend .calendar-weekday{color:#b65c00!important}
#view .week-strip button.is-holiday strong,
#view .week-strip button.is-weekend strong{color:#b65c00}
#view .week-strip button.is-adjusted-workday .calendar-weekday{color:#667680!important}
#view .week-strip .selected .calendar-weekday{font-weight:650}
#view .week-strip button.selected .calendar-day-badge{outline:1px solid white}
#view .week-strip .calendar-count{line-height:11px}
/* Month grid and weekly column headings carry the same cues. */
#view .calendar .calday.is-holiday .cal-date,
#view .calendar .calday.is-weekend .cal-date,
#view .schedule-column-title.is-holiday>button,
#view .schedule-column-title.is-weekend>button{color:#b65c00}
#view .calendar-month-note{display:block;font-size:11px;line-height:17px;color:#7a8790}
#view .calday.is-holiday .calendar-month-note{color:#b65c00}
#view .schedule-column-title .calendar-day-badge{margin-left:3px;vertical-align:middle}
#view .calendar .cal-date .calendar-day-badge{vertical-align:middle}
/* Desktop month cells use the date and lunar/holiday line; counts remain in
   their accessible labels. Touch calendars keep the existing three-line size. */
@media screen and (min-width:721px){
 #view .appointment-mini-grid button{min-height:38px;padding:2px 0;border-radius:0}
 #view .appointment-mini-grid .calendar-day-number,
 #view .appointment-mini-grid .calendar-date-top:has(.calendar-day-badge) .calendar-day-number{font-size:14px;font-weight:400}
 #view .appointment-mini-grid .calendar-day-note{font-size:11px}
 /* Keep every date in the DOM; hide only an entirely outside sixth week. */
 #view .appointment-mini-grid:has(>button:nth-of-type(36).outside):has(>button:nth-of-type(37).outside):has(>button:nth-of-type(38).outside):has(>button:nth-of-type(39).outside):has(>button:nth-of-type(40).outside):has(>button:nth-of-type(41).outside):has(>button:nth-of-type(42).outside)>button:nth-of-type(n+36){display:none}
 #view .appointment-mini-grid .calendar-count{display:none}
 #view .appointment-mini-grid button.selected{background:#00a6c4;color:#fff}
}
@media screen and (max-width:720px){
 #view .month-picker-grid button{min-height:51px!important;touch-action:manipulation}
 #view .month-picker-grid .calendar-day-number{font-size:15px}
 #view .month-picker-grid .calendar-date-top{width:36px}
 #view .month-picker-grid .calendar-day-note{font-size:11px;line-height:14px;min-height:14px}
 #view .month-picker-grid .calendar-count{font-size:10px;line-height:12px;min-height:12px}
 #view .month-picker-grid>.calendar-weekday{font-size:12px;padding-bottom:5px}
 #view .calendar-day-legend{margin:5px 0 8px;font-size:11px;gap:12px}
 #view .mobile-schedule-reference .week-strip .calendar-weekday{font-size:11px}
 #view .mobile-schedule-reference .week-strip .calendar-strip-date{height:32px}
}
/* A busy day must grow its week row instead of painting into the following date. */
#view .appointment-workspace .calendar{flex:none;height:auto;align-content:start}
#view .appointment-workspace #ap-results{scrollbar-width:none}
#view .appointment-workspace #ap-results::-webkit-scrollbar{display:none}
