/* One full-width date row and the same two-mode switch across calendar views. */
.calendar-controls{display:grid!important;grid-template-columns:44px minmax(0,1fr) 44px!important;gap:12px!important;min-width:0;width:100%;box-sizing:border-box;align-items:center!important}
.calendar-controls>#calendarPrev{grid-column:1;grid-row:1}
.calendar-controls>#calendarNext{grid-column:3;grid-row:1}
.calendar-controls>#calendarDate,.calendar-controls>.vt-date-input{grid-column:2;grid-row:1;width:100%!important;min-width:0!important;max-width:none!important;box-sizing:border-box}
.calendar-controls>#calendarPrev,.calendar-controls>#calendarNext,.calendar-controls>#calendarDate,.calendar-controls>.vt-date-input{margin-top:0!important;height:48px!important;min-height:48px!important}
.calendar-controls>.vt-calendar-options{grid-column:1/-1!important;grid-row:2!important;grid-template-columns:repeat(2,minmax(0,1fr));margin-top:12px!important;min-width:0;width:100%}
.gd-mode-choice{display:grid!important;grid-template-columns:minmax(0,1fr) 52px minmax(0,1fr)!important;align-items:center!important;gap:14px!important;min-width:0;max-width:100%;width:100%;min-height:48px;height:48px!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;box-sizing:border-box}
.gd-mode-choice>.gd-mode-original{display:none!important}
.gd-mode-label{min-width:0;font-size:14px;line-height:1.4;color:inherit;opacity:.65;white-space:nowrap}
.gd-mode-label:first-child{text-align:right}
.gd-mode-label.gd-mode-selected{opacity:1;font-weight:600}
.gd-mode-choice .gd-ios-switch{margin:0!important}
.vt-booking-viewbar>.gd-mode-choice{width:320px;max-width:100%}
.vt-timeline-appointment{box-sizing:border-box!important;width:auto!important;min-width:0!important;max-width:100%!important;justify-self:stretch}
.vt-timeline-appointment>*{min-width:0;max-width:100%;box-sizing:border-box}
.vt-timeline-appointment .vt-appointment-head,.vt-timeline-appointment .vt-notification{overflow-wrap:anywhere;white-space:normal}
@media(max-width:680px){.calendar-controls>.vt-calendar-options{grid-template-columns:minmax(0,1fr)!important}.vt-booking-viewbar>.gd-mode-choice{width:100%}.gd-mode-label{font-size:13px}.calendar-controls .gd-mode-choice{width:100%}}

html body .calendar-controls{display:grid!important;grid-template-columns:44px minmax(0,1fr) 44px!important;grid-auto-flow:row!important}
html body .calendar-controls>.vt-calendar-options{grid-column:1/-1!important;grid-row:2!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;width:100%!important;min-width:0!important;max-width:100%!important}
html body .calendar-controls>.vt-calendar-options>div{grid-column:auto!important;grid-row:auto!important;width:100%!important;min-width:0!important;max-width:100%!important;display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:18px 48px auto!important}
html body .calendar-controls .gd-mode-choice,html body .vt-booking-viewbar .gd-mode-choice{display:grid!important;grid-template-columns:minmax(0,1fr) 52px minmax(0,1fr)!important;background:transparent!important;border:0!important;padding:0!important}
html body .calendar-controls .gd-mode-choice>*{grid-row:1!important;grid-column:auto!important}
html body .calendar-controls .gd-mode-choice>.gd-mode-original{display:none!important}
html body .calendar-controls .vt-calendar-step-control{grid-row:auto!important;width:100%;max-width:100%}
html body .vt-timeline-appointment{box-sizing:border-box!important;width:auto!important;min-width:0!important;max-width:100%!important}
@media(max-width:680px){html body .calendar-controls>.vt-calendar-options{grid-template-columns:minmax(0,1fr)!important}}

html body .gd-mode-choice,html body .calendar-controls .gd-mode-choice,html body .vt-booking-viewbar .gd-mode-choice{grid-template-columns:minmax(0,1fr) 52px!important;width:100%!important}
.gd-mode-labels{display:flex;align-items:center;justify-content:flex-start;gap:8px;min-width:0;flex-wrap:wrap}
.gd-mode-divider{opacity:.45;font-size:13px}.gd-mode-labels .gd-mode-label{text-align:left}
.gd-mode-choice>.gd-ios-switch{justify-self:end}

html body .vt-booking-viewbar{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 24px;align-items:center}
.vt-booking-viewbar>strong{grid-column:1/-1}
html body .vt-booking-viewbar>.gd-mode-choice{grid-column:1;width:100%;max-width:none}
.gd-calendar-density-row{grid-column:2;min-width:0;width:100%}
.gd-calendar-density-row[hidden],html body .calendar-controls>.vt-calendar-options>div[hidden]{display:none!important}
@media(max-width:680px){html body .vt-booking-viewbar{grid-template-columns:minmax(0,1fr)}.gd-calendar-density-row{grid-column:1}.vt-booking-viewbar>strong{margin-bottom:2px}}

html body .calendar-controls>.vt-calendar-options:has(>div[hidden]){grid-template-columns:minmax(0,1fr)!important}

/* Calendar needs a wide workspace; phones always use the client list. */
@media(max-width:1023px){html body .vt-booking-viewbar.gd-calendar-wide-only,html body .panel.gd-calendar-wide-only{display:none!important}}

/* Pair each mode label with its switch; combine the title and tools in one header. */
html body .vt-booking-viewbar .gd-mode-choice{display:flex!important;align-items:center!important;justify-content:flex-start!important;width:max-content!important;max-width:100%;gap:14px!important}
html body .vt-booking-viewbar .gd-mode-labels{flex:0 1 auto;flex-wrap:nowrap;gap:8px}
html body .vt-booking-viewbar .gd-mode-choice>.gd-ios-switch{flex:0 0 52px}
html body .vt-booking-viewbar .gd-calendar-density-row{width:auto;min-width:0;grid-column:auto}
html body .vt-booking-viewbar .gd-booking-toolbar-options{display:grid;grid-template-columns:max-content max-content;gap:6px 28px;align-items:center;justify-content:end;min-width:0}
html body .vt-booking-viewbar .gd-booking-toolbar-options>strong{grid-column:1/-1;font-size:11px;font-weight:500;opacity:.65}
html body .vt-booking-viewbar .gd-booking-view-title{margin:0;font-size:24px;line-height:1.3}
@media(min-width:1024px){
 html body .vt-booking-viewbar{grid-template-columns:minmax(200px,1fr) auto!important;gap:16px!important;margin:0!important;padding:20px 24px 12px!important;border-radius:18px 18px 0 0!important;border-bottom:0!important}
 html body .gd-booking-view-panel{margin-top:0!important;border-top:0!important;border-radius:0 0 18px 18px!important;padding-top:12px!important}
 html body .gd-booking-view-panel>h2{display:none}
 html body .calendar-controls{grid-template-columns:44px minmax(180px,240px) 44px minmax(0,1fr)!important;column-gap:12px!important}
 html body .calendar-controls>#calendarDate,html body .calendar-controls>.vt-date-input{width:100%!important;max-width:none!important;min-width:0!important}
}
@media(min-width:1024px) and (max-width:1250px){html body .vt-booking-viewbar .gd-booking-toolbar-options{column-gap:20px}html body .vt-booking-viewbar .gd-mode-label{font-size:13px}html body .vt-booking-viewbar .gd-mode-choice{gap:10px!important}html body .vt-booking-viewbar .gd-booking-view-title{font-size:22px}}

/* Two compact blocks: date and period at left, stacked view options at right. */
html body .vt-booking-viewbar .gd-booking-toolbar-options{grid-template-columns:minmax(0,1fr)!important;grid-auto-rows:max-content;gap:8px!important;align-content:start;align-items:start;justify-content:stretch;width:310px;height:auto;min-height:0}
html body .vt-booking-viewbar .gd-booking-toolbar-options>.gd-mode-choice,html body .vt-booking-viewbar .gd-booking-toolbar-options .gd-calendar-density-row>.gd-mode-choice{display:grid!important;grid-template-columns:minmax(0,1fr) 52px!important;width:100%!important;gap:14px!important}
html body .vt-booking-viewbar .gd-booking-toolbar-options>.vt-calendar-step-control{margin:4px 0 0!important;width:auto;justify-self:start}
html body .vt-booking-viewbar .gd-booking-toolbar-options>[hidden]{display:none!important}
html body .vt-booking-viewbar .gd-booking-toolbar-main{min-width:0;display:grid;gap:16px;align-content:start}
html body .vt-booking-viewbar .gd-booking-toolbar-main>.calendar-controls{margin:0!important}
html body .vt-booking-viewbar .calendar-controls.hidden{display:none!important}
@media(min-width:1024px){html body .vt-booking-viewbar{align-items:start!important;padding-bottom:20px!important;height:auto!important;min-height:0!important}html body .vt-booking-viewbar .calendar-controls{width:100%;max-width:420px;grid-template-columns:44px minmax(0,240px) 44px!important}html body .vt-booking-viewbar .calendar-controls>.vt-calendar-options{margin-top:4px!important}html body .vt-booking-viewbar .calendar-controls>.vt-calendar-options>div{grid-template-rows:18px 48px!important}}

/* Each switch follows its own label, without filling the right-hand block. */
html body .vt-booking-viewbar .gd-booking-toolbar-options{width:max-content;max-width:100%;justify-items:start}
html body .vt-booking-viewbar .gd-booking-toolbar-options>.gd-mode-choice,html body .vt-booking-viewbar .gd-booking-toolbar-options .gd-calendar-density-row>.gd-mode-choice{display:flex!important;width:max-content!important;justify-content:flex-start!important;gap:14px!important}
html body .vt-booking-viewbar .gd-booking-toolbar-options .gd-mode-choice>.gd-ios-switch{justify-self:start;margin-left:0!important}

/* Switches lead both rows, so their edges and the label starts share one axis. */
@media(min-width:1024px){html body .vt-booking-viewbar{grid-template-columns:minmax(340px,400px) max-content!important;justify-content:start!important;column-gap:40px!important}}
html body .vt-booking-viewbar .gd-booking-toolbar-options{justify-content:start;justify-items:start;width:max-content}
html body .vt-booking-viewbar .gd-booking-toolbar-options>.gd-mode-choice,html body .vt-booking-viewbar .gd-booking-toolbar-options .gd-calendar-density-row>.gd-mode-choice{display:grid!important;grid-template-columns:52px max-content!important;justify-content:start!important;width:max-content!important;gap:14px!important}
html body .vt-booking-viewbar .gd-booking-toolbar-options .gd-mode-choice>.gd-ios-switch{grid-column:1!important;grid-row:1!important;justify-self:start}
html body .vt-booking-viewbar .gd-booking-toolbar-options .gd-mode-choice>.gd-mode-labels{grid-column:2!important;grid-row:1!important}
@media(min-width:1024px){html body .vt-booking-viewbar{grid-template-columns:minmax(340px,1fr) max-content!important}html body .vt-booking-viewbar .gd-booking-toolbar-options{justify-self:end}html body .vt-booking-viewbar .gd-booking-toolbar-main{max-width:420px}}
/* Native and enhanced date fields fill the same track between equal arrow gaps. */
html body #vt-tab-bookings .vt-booking-viewbar .calendar-controls{column-gap:12px!important}
html body #vt-tab-bookings .vt-booking-viewbar .calendar-controls>input:not([type=hidden]){width:100%!important;max-width:none!important;min-width:0!important;margin:0!important;box-sizing:border-box!important;justify-self:stretch!important}
html body #vt-tab-bookings .vt-booking-viewbar .calendar-controls>#calendarPrev,html body #vt-tab-bookings .vt-booking-viewbar .calendar-controls>#calendarNext{width:44px!important;min-width:44px!important;max-width:44px!important;margin:0!important;padding:0!important;box-sizing:border-box!important}

/* Independent date and display blocks; mobile keeps only dates for the list. */
html body .vt-booking-viewbar .gd-booking-toolbar-main,html body .vt-booking-viewbar .gd-booking-toolbar-options{padding:18px;border:1px solid #8495aa26;border-radius:14px;box-sizing:border-box}
html body .vt-booking-viewbar .gd-booking-toolbar-main{background:#ffffff03}
html body .vt-booking-viewbar .gd-booking-toolbar-options{background:#ab8ad410;gap:12px!important}
html body .vt-booking-viewbar .gd-booking-toolbar-options>.gd-booking-view-title{font-size:24px;line-height:1.3;margin:0 0 4px;opacity:1;font-weight:700;grid-column:1/-1}
html[data-theme=day] body .vt-booking-viewbar .gd-booking-toolbar-options{background:#f5f1fa;border-color:#e5ddec}
html[data-theme=day] body .vt-booking-viewbar .gd-booking-toolbar-main{background:#f8fafb;border-color:#e1e7ec}
html body #vt-tab-bookings .gd-booking-view-panel>.calendar-controls{margin:16px 0 20px!important;grid-template-columns:44px minmax(0,1fr) 44px!important;gap:12px!important}
html body #vt-tab-bookings .gd-booking-view-panel>.calendar-controls>input:not([type=hidden]){width:100%!important;max-width:none!important;min-width:0!important;box-sizing:border-box}
html body #vt-tab-bookings .gd-booking-view-panel>.calendar-controls>.vt-calendar-options{grid-column:1/-1!important;grid-row:2!important}
@media(max-width:1023px){html body #vt-tab-bookings .gd-booking-view-panel>.calendar-controls .vt-calendar-options>div:has([aria-label="Отображение записей"]){display:none!important}}

/* Both desktop tool panels share the height of the taller panel. */
@media(min-width:1024px){html body .vt-booking-viewbar{align-items:stretch!important}html body .vt-booking-viewbar>.gd-booking-toolbar-main,html body .vt-booking-viewbar>.gd-booking-toolbar-options{align-self:stretch!important;height:auto!important;align-content:start}}

@media(max-width:767px){html body .gd-mobile-section-title,html body #clientDirectory>h2{display:none!important}html body #vt-tab-bookings .gd-booking-view-panel>.calendar-controls{margin-top:0!important}html body .calendar-controls .vt-calendar-options>div:has([aria-label="Период календаря"]){grid-template-rows:auto!important;gap:0!important}html body .calendar-controls .vt-calendar-options>div:has([aria-label="Период календаря"])>.vt-control-label{display:none!important}html body .calendar-controls [aria-label="Период календаря"]{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px!important;width:100%;padding:0!important;border:0!important;background:transparent!important}html body .calendar-controls [data-calendar-mode]{min-height:48px!important;width:100%;padding:10px 8px!important;margin:0!important;border:1px solid #8495aa40!important;border-radius:11px!important;font-size:14px!important;line-height:1.4!important}html body :is(#vt-tab-services,#vt-tab-bookings)>.panel{padding-top:16px!important}}
