/* V2 calendar display. Data, authentication and save handlers remain in the host. */
.app-shell{grid-template-rows:auto auto minmax(0,1fr)!important}
.app-shell>.sidebar{grid-row:2 / span 2}
.app-shell>.calendar-area{grid-row:3;height:var(--v2-calendar-height,calc(100dvh - 132px))!important;min-height:0}
#viewSegment{display:none}
.calendar-presentation-bar{grid-row:2;grid-column:2;display:flex;align-items:center;flex-wrap:wrap;gap:8px 20px;min-width:0;padding:8px 12px;border-bottom:1px solid var(--line,#e7e5ea);background:var(--panel,#fff);color:var(--ink,#273449);z-index:96}
.billing-embed .calendar-presentation-bar{grid-column:1}
.calendar-presentation-switch,.calendar-period-switch{display:flex;align-items:center;gap:4px;max-width:100%}
.calendar-period-switch{flex-wrap:wrap}
.calendar-presentation-bar button{flex:none;min-height:44px;min-width:44px;padding:8px 14px;border:1px solid #a8b2bf;border-radius:8px;background:#fff;color:#344054;font-size:16px;font-weight:500;line-height:1.5;white-space:normal;overflow-wrap:anywhere}
.calendar-presentation-bar button[aria-pressed="true"]{border-color:var(--brand-strong,#9d174d);background:var(--brand-soft,#fff0f5);color:var(--brand-strong,#9d174d);box-shadow:inset 0 0 0 1px var(--brand-strong,#9d174d)}
.calendar-presentation-bar button:disabled{color:#667085;background:#f1f3f5;border-color:#d0d5dd;cursor:default}
.calendar-presentation-bar button:focus-visible,.mcard-host button:focus-visible,.mcard-dialog button:focus-visible{outline:3px solid #0f766e;outline-offset:2px}
.calendar-presentation-help{margin-left:auto;padding:8px!important;font-weight:600!important}
.calendar-area.card-presentation-active{overflow:hidden!important}
.calendar-area.card-presentation-active>.calendar-wrap,.calendar-area.card-presentation-active>.single-rail-host,.calendar-area.card-presentation-active>.fixed-time-axis,.calendar-area.card-presentation-active>.pager-fixed-header,.calendar-area.card-presentation-active>.empty-state{visibility:hidden!important;pointer-events:none!important}
.mcard-host{position:fixed;z-index:95;display:flex;flex-direction:column;background:#fff;color:#273449;overflow:hidden;font:400 16px/1.5 -apple-system,BlinkMacSystemFont,"Hiragino Sans","Yu Gothic",sans-serif;--mcard-axis:64px;--mcard-hour:108px;--mcard-height:2592px}
.mcard-scroll{flex:1;min-height:0;width:100%;overflow:auto;overscroll-behavior:contain;touch-action:pan-x pan-y;scrollbar-width:auto;scrollbar-color:#8592a3 #edf1f5;scrollbar-gutter:stable;overflow-anchor:none}
.mcard-alert{flex:none;padding:10px 12px;border-bottom:1px solid #d5a45f;background:#fff7ed;color:#9a3412;font-size:16px;line-height:1.5}
.mcard-month-scroll{scrollbar-gutter:auto}
.mcard-surface{width:max(100%,var(--mcard-width));min-height:100%;background:#fff}
.mcard-head,.mcard-all-day,.mcard-body{display:grid;grid-template-columns:var(--mcard-columns);min-width:var(--mcard-width)}
.mcard-head{position:sticky;top:0;z-index:12;background:#fff;border-bottom:1px solid #cbd5e1}
.mcard-date-head{display:flex;align-items:center;justify-content:flex-start;padding:10px 8px;min-height:66px;border-right:1px solid #d6dde5;background:#f7f9fb;font-weight:600}
.mcard-date-label{position:sticky;left:calc(var(--mcard-axis) + 8px);display:flex;align-items:center;gap:8px;width:max-content;white-space:nowrap}
.mcard-date-head small{font-size:14px;font-weight:400;color:#536273}
.mcard-date-head.today{background:var(--brand-soft,#fff0f5);color:var(--brand-strong,#9d174d)}
.mcard-corner,.mcard-all-label,.mcard-axis{position:sticky;left:0;z-index:14;background:#fff;border-right:1px solid #bcc7d4;color:#536273;font-size:14px}
.mcard-corner,.mcard-all-label{display:grid;place-items:center;min-height:44px}
.mcard-all-day{position:sticky;top:66px;z-index:11;background:#fff;border-bottom:1px solid #cbd5e1}
.mcard-all-cell{display:flex;flex-direction:column;gap:4px;padding:6px;border-right:1px solid #d6dde5;min-height:44px}
.mcard-all-cell .mcard-event{position:relative!important;inset:auto!important;width:100%!important;height:auto!important;min-height:44px;padding:6px 8px}
.mcard-all-cell .mcard-service,.mcard-all-cell .mcard-destination{display:none}
.mcard-axis,.mcard-day{position:relative;height:var(--mcard-height)}
.mcard-axis{position:sticky;left:0;z-index:9}
.mcard-axis-label{position:absolute;right:8px;top:calc(var(--mcard-minute) * var(--mcard-hour) / 60);transform:translateY(-50%);background:#fff;font-variant-numeric:tabular-nums}
.mcard-axis-label:first-child{transform:none}
.mcard-day{border-right:1px solid #cbd5e1;background:repeating-linear-gradient(to bottom,transparent 0,transparent calc(var(--mcard-hour) / 2 - 1px),#edf1f5 calc(var(--mcard-hour) / 2 - 1px),#edf1f5 calc(var(--mcard-hour) / 2),transparent calc(var(--mcard-hour) / 2),transparent calc(var(--mcard-hour) - 1px),#d6dde5 calc(var(--mcard-hour) - 1px),#d6dde5 var(--mcard-hour))}
.mcard-event{position:absolute;display:block;text-align:left;box-sizing:border-box;margin:0;padding:8px 10px;min-width:0;max-width:100%;border:1px solid var(--event-color,#64748b);border-left:4px solid var(--event-color,#64748b);border-radius:8px;background:color-mix(in srgb,var(--event-color,#64748b) 10%,white);color:#273449;font-family:inherit;font-size:16px;font-weight:400;line-height:1.5;white-space:normal;overflow-wrap:anywhere;cursor:pointer}
.mcard-event span{display:block}
.mcard-event .mcard-time{font-size:16px;font-weight:500;font-variant-numeric:tabular-nums}
.mcard-event .mcard-title{font-size:16px;font-weight:500}
.mcard-event .mcard-helper,.mcard-event .mcard-service,.mcard-event .mcard-destination,.mcard-event .mcard-status{font-size:14px;font-weight:400;line-height:1.5}
.mcard-event.cancelled{border-style:dashed;background:#fff}
.mcard-event.context{background:#f8fafc;color:#536273;border-color:#94a3b8;cursor:default}
.mcard-event.previous .mcard-status{color:#9a3412}
.mcard-empty{padding:36px 20px;text-align:center;color:#536273;font-size:16px}
.mcard-empty strong{display:block;margin-bottom:8px;color:#273449;font-size:20px;font-weight:600}
.mcard-month-grid{display:grid;grid-template-columns:repeat(7,minmax(44px,1fr));grid-template-rows:44px repeat(var(--mcard-weeks,5),minmax(0,1fr));width:100%;height:100%;min-height:calc(44px + var(--mcard-weeks,5) * 76px)}
.mcard-month-weekday{position:sticky;top:0;z-index:2;text-align:center;padding:10px;background:#f7f9fb;border-bottom:1px solid #cbd5e1;font-weight:500}
.mcard-month-day{padding:4px;min-height:0;border-right:1px solid #d6dde5;border-bottom:1px solid #d6dde5;min-width:0}
.mcard-month-day.outside{background:#f7f9fb}
.mcard-month-day.today{background:var(--brand-soft,#fff0f5)}
.mcard-month-day.selected{box-shadow:inset 0 0 0 2px var(--brand-strong,#9d174d)}
.mcard-month-date{display:flex;align-items:center;justify-content:space-between;gap:4px;min-height:44px;margin-bottom:4px;font-size:16px;font-weight:500}
.mcard-month-date small{font-size:14px;font-weight:400;color:#536273}
.mcard-month-day .mcard-event{position:relative;width:100%;height:auto;margin-bottom:6px;min-height:44px;padding:6px 8px}
.mcard-month-day .mcard-event .mcard-title,.mcard-month-day .mcard-event .mcard-helper,.mcard-month-day .mcard-event .mcard-time{font-size:14px}
.mcard-month-day .mcard-service,.mcard-month-day .mcard-destination{display:none}
.mcard-month-day .mcard-month-preview .mcard-helper{display:none}
.mcard-month-day .mcard-month-preview .mcard-title{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
.mcard-month-date .mcard-more{width:auto;min-width:44px;flex:none;padding:8px 6px;text-align:center}
.mcard-more{display:block;width:100%;min-height:44px;padding:8px;border:1px solid #a8b2bf;border-radius:8px;background:#fff;color:#344054;font-size:16px;font-weight:500;text-align:left}
.mcard-dialog{box-sizing:border-box;width:min(680px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:20px;border:1px solid #cbd5e1;border-radius:12px;background:#fff;color:#273449;font:400 16px/1.5 -apple-system,BlinkMacSystemFont,"Hiragino Sans","Yu Gothic",sans-serif;overflow:auto}
.mcard-dialog::backdrop{background:#23192370}
.mcard-dialog-head{display:flex;align-items:center;gap:12px;margin-bottom:16px}
.mcard-dialog h2{flex:1;margin:0;font-size:20px;font-weight:600;line-height:1.5}
.mcard-dialog button[data-close]{min-width:68px;min-height:44px;padding:8px 12px;border:1px solid #a8b2bf;border-radius:8px;background:#fff;color:#344054;font-family:inherit;font-size:16px;font-weight:500;line-height:1.5}
.mcard-dialog .mcard-event{position:relative;width:100%;height:auto;min-height:44px;margin:8px 0}
.mcard-help-example{display:flex;gap:8px;align-items:center;flex-wrap:wrap;padding:12px;border-radius:8px;background:var(--brand-soft,#fff0f5);color:var(--brand-strong,#9d174d);margin:12px 0}
.mcard-help-example span{padding:8px;border:1px solid currentColor;border-radius:8px}
@media(max-width:1100px){.calendar-presentation-bar{width:100%;gap:6px 8px;padding:6px 8px}.calendar-presentation-bar button{padding:8px 10px}.app-shell>.calendar-area{height:var(--v2-calendar-height,calc(100dvh - 176px))!important}}
@media(max-width:900px){.mcard-month-day{padding:2px 0}.mcard-month-date{flex-direction:column;justify-content:flex-start;gap:0}.mcard-month-date small{line-height:44px}}
@media(max-width:600px){.calendar-presentation-bar{padding:6px 8px;display:grid;grid-template-columns:1fr auto;gap:6px}.calendar-presentation-switch{grid-column:1;grid-row:1}.calendar-presentation-help{grid-column:2;grid-row:1}.calendar-period-switch{grid-column:1/-1;grid-row:2}.calendar-period-switch button{flex:1}.calendar-presentation-switch button{flex:1}.calendar-presentation-bar button{padding:6px 10px}.mcard-host{--mcard-axis:60px}}
@media print{.calendar-presentation-bar,.mcard-dialog{display:none!important}.mcard-host{position:static!important;width:100%!important;height:auto!important}.mcard-scroll{height:auto;overflow:visible}}

/* The time span is the visual boundary, even for a short visit. Full text is in the peek/details. */
.mcard-event.mcard-timed{display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;min-height:0!important;max-height:none;padding:3px 7px;overflow:hidden;border-radius:5px;line-height:1.3}
.mcard-timed span{flex:0 0 auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.3}
.mcard-timed .mcard-helper,.mcard-timed .mcard-service,.mcard-timed .mcard-destination,.mcard-timed .mcard-status{line-height:1.3}
