/* PBWASH-OVERLAY-001: shared geometry, independent of feature loading. */
@media (min-width:1101px), (min-width:981px) and (orientation:landscape) {
 html body .pb-settings-panel .services-drawer.pb-side-form.pb-form-shell {width:min(480px,calc(100vw - 32px));}
}
.pb-settings-panel .services-overlay:has(.pb-side-form) {
 position:fixed;inset:0;z-index:160;display:flex;justify-content:flex-end;
 isolation:isolate;
}
.pb-settings-panel .services-drawer.pb-side-form {
 display:grid;grid-template-rows:auto minmax(0,1fr) auto;overflow:hidden;
 width:min(600px,calc(100vw - 32px));height:calc(100dvh - 32px);max-height:calc(100dvh - 32px);
 margin:16px;border-radius:24px;padding:0;background:rgba(255,255,255,.92);box-shadow:-24px 0 64px rgba(15,23,42,.2);
}
.app-shell .main :is(.admin-booking-backdrop,.booking-detail-backdrop) {background:rgba(15,23,42,.32);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);}
/* A filter on the overlay makes it the containing block of fixed forms.
   Keep the blur on a separate paint layer so visualViewport offsets apply once. */
.pb-settings-panel .services-overlay:has(.pb-side-form) {background:transparent;backdrop-filter:none;-webkit-backdrop-filter:none;}
.pb-settings-panel .services-overlay:has(.pb-side-form)::before {
 content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;
 background:rgba(15,23,42,.32);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);
}
.app-shell .main .booking-detail-v3 .booking-detail-header,
.pb-settings-panel .services-drawer.pb-side-form > header {box-sizing:border-box;min-height:56px;display:flex;padding:6px 18px;border-bottom:1px solid var(--pb-color-border,#e8eef5);background:#fff;align-items:center;flex-wrap:nowrap;gap:8px;}
.app-shell .main .booking-detail-v3 .booking-detail-header h2,
.pb-settings-panel .services-drawer.pb-side-form > header h2 {flex:0 1 auto;margin:0;text-align:left;font-size:18px;line-height:24px;font-weight:750;min-width:0;overflow-wrap:anywhere;}
.pb-settings-panel .services-drawer.pb-side-form > header .service-header-status {flex:none;font-size:13px;line-height:18px;white-space:nowrap;}
.pb-settings-panel .services-drawer.pb-side-form > header .pb-side-form-close {margin-left:auto;}
.app-shell .main .booking-detail-v3 .booking-detail-header button,
.pb-settings-panel .services-drawer.pb-side-form button.pb-side-form-close {display:grid;place-items:center;flex:none;width:44px;min-width:44px;height:44px;padding:0;border:1px solid #dde5f0;border-radius:12px;background:#fff;box-shadow:none;}
.app-shell .main .booking-detail-v3 .booking-detail-header button {margin-left:auto;}
.pb-settings-panel .pb-side-form-close svg {width:19px;height:19px;fill:none;stroke:#2f6df6;stroke-width:2;stroke-linecap:round;pointer-events:none;}
.pb-settings-panel .services-drawer.pb-side-form button.pb-side-form-close:hover {background:#f8fbff;border-color:#c7d5e8;}
.app-shell .main .booking-detail-v3 .booking-detail-header button:focus-visible,
.pb-settings-panel .services-drawer.pb-side-form button.pb-side-form-close:focus-visible {outline:0;box-shadow:0 0 0 3px rgba(47,109,246,.18);}
.pb-settings-panel .services-drawer.pb-side-form .services-drawer-body {display:grid;align-content:start;grid-auto-rows:max-content;min-height:0;overflow-y:auto;padding:14px 18px 24px;gap:10px;overflow-x:hidden;background:transparent;}
.pb-settings-panel .services-drawer.pb-side-form .services-drawer-body > * {margin:0;}
.app-shell .main .booking-detail-v3 .booking-detail-footer,
.pb-settings-panel .services-drawer.pb-side-form > footer {display:block;padding:0;border:0;background:#fff;}
.app-shell .main .admin-booking-submit-footer.pb-compact-outline,
.app-shell .main .booking-detail-v3 .booking-detail-footer button,
.pb-settings-panel .services-drawer.pb-side-form > footer .pb-side-form-submit {
 display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:100%;
 min-height:calc(68px + var(--pb-form-footer-safe,env(safe-area-inset-bottom,0px)));height:auto;max-height:none;
 margin:0;padding:12px 18px;border:0;border-top:1px solid var(--pb-color-border,#e8eef5);border-radius:0;
 box-shadow:none;background:#fff;font:600 16px/22px var(--pb-font-system,system-ui);white-space:normal;text-align:center;
 transition:background-color .16s ease,color .16s ease,border-color .16s ease,box-shadow .16s ease;
}
/* Only action labels are non-selectable; form fields keep native selection. */
:is(.app-shell .main .admin-booking-submit-footer,
 .app-shell .main .booking-detail-v3 .booking-detail-footer button,
 .pb-settings-panel .services-drawer.pb-side-form > footer button),
:is(.app-shell .main .admin-booking-submit-footer,
 .app-shell .main .booking-detail-v3 .booking-detail-footer button,
 .pb-settings-panel .services-drawer.pb-side-form > footer button) * {
 -webkit-user-select:none;user-select:none;-webkit-touch-callout:none;
}
.pb-settings-panel .services-drawer.pb-side-form > footer .pb-side-form-submit {color:var(--pb-color-text,#172033);}
.app-shell .main .admin-booking-submit-footer.pb-compact-outline:hover:not(:disabled),
.pb-settings-panel .services-drawer.pb-side-form > footer .pb-side-form-submit:hover:not(:disabled) {background:#f8fbff;}
.app-shell .main .admin-booking-submit-footer.pb-compact-outline:active:not(:disabled),
.pb-settings-panel .services-drawer.pb-side-form > footer .pb-side-form-submit:active:not(:disabled) {background:#eef4ff;}
.app-shell .main .admin-booking-submit-footer.pb-compact-outline:focus-visible,
.pb-settings-panel .services-drawer.pb-side-form > footer .pb-side-form-submit:focus-visible {outline:0;box-shadow:inset 0 0 0 3px rgba(47,109,246,.18);}
.app-shell .main .admin-booking-submit-footer.pb-compact-outline:disabled,
.app-shell .main .booking-detail-v3 .booking-detail-footer button:disabled,
.pb-settings-panel .services-drawer.pb-side-form > footer .pb-side-form-submit:disabled {opacity:1;background:#f1f5f9;color:#94a3b8;cursor:not-allowed;}
/* Opt-in emphasis for the client card and its vehicle form; retain one full-width action. */
.pb-settings-panel .services-drawer.pb-side-form > footer .pb-side-form-submit--accent:not(:disabled) {
 background:var(--pb-color-accent-soft,#eef4ff);color:var(--pb-color-accent-hover,#255de8);
}
.pb-settings-panel .services-drawer.pb-side-form > footer .pb-side-form-submit--accent:is(:hover,:active):not(:disabled) {background:#e3ecff;}
.pb-settings-panel .services-drawer.pb-side-form > footer.services-close-pending {display:flex;padding:12px 18px;}
.pb-settings-panel .services-drawer.pb-side-form .service-header-status {min-height:44px;}
.pb-settings-panel .services-drawer.pb-side-form .service-description summary {min-height:44px;line-height:24px;padding:10px 0;box-sizing:border-box;}
.pb-settings-panel .services-drawer.pb-side-form .service-description summary span:empty {display:none;}
.pb-settings-panel .services-drawer.pb-side-form .service-description:not([open]) > :not(summary) {display:none;}
.pb-settings-panel .services-drawer.pb-side-form .service-description[open] > label {margin-top:6px;}

/* Closed native fields stay within their grid track on WebKit as well as Blink.
   Appearance affects the closed box only; the semantic OS picker is retained. */
:is(.app-shell .main .admin-booking-drawer, .pb-settings-panel.pb-settings-panel) input.pb-native-temporal {
 display:block;box-sizing:border-box;appearance:none;-webkit-appearance:none;
 width:100%;min-width:0;max-width:100%;min-inline-size:0;
 height:44px;min-height:44px;margin:0;padding:8px 12px;line-height:normal;
}
input.pb-native-temporal::-webkit-date-and-time-value {
 min-width:0;min-height:1.2em;margin:0;text-align:left;
}
.pb-settings-panel .schedule-settings-grid > label > input,
.pb-settings-panel .schedule-exception-grid > label > :is(input,select) {grid-row:2;}

.app-shell .main .booking-detail-v3,
.pb-settings-panel .services-drawer.pb-side-form.pb-form-standalone {
 position:fixed;top:calc(var(--pb-viewport-top,0px) + 16px);bottom:auto;right:16px;left:auto;
 display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:0;box-sizing:border-box;
 width:min(600px,calc(100vw - 32px));height:calc(var(--pb-viewport-height,100dvh) - 32px);max-height:none;
 margin:0;padding:0;overflow:hidden;border:0;border-radius:24px;background:#f5f7fa;
 box-shadow:-24px 0 64px rgba(15,23,42,.2);
}
.app-shell .main .booking-detail-v3 .booking-detail-scroll {
 min-height:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior-y:contain;padding:14px 18px 24px;background:#f5f7fa;
}
.app-shell .main .booking-detail-v3:not(:has(.booking-detail-footer)) .booking-detail-scroll {padding-bottom:max(24px,env(safe-area-inset-bottom,0px));}

/* One mobile shell owner for booking, services, categories and client forms.
   Viewport variables are progressive enhancement; CSS works without JS. */
@media (max-width:980px), (max-width:1100px) and (orientation:portrait) {
 .pb-settings-panel .services-overlay:has(.pb-side-form) {
  top:var(--pb-viewport-top,0px);bottom:auto;height:var(--pb-viewport-height,100dvh);
  align-items:flex-end;padding:0 12px 12px;
 }
 .app-shell .main :is(.admin-booking-drawer,.booking-detail-v3),
 .pb-settings-panel .services-drawer.pb-side-form {
  --pb-sheet-bottom:12px;
  --pb-sheet-height:min(calc(var(--pb-viewport-height,100dvh) * .88),960px,calc(var(--pb-viewport-height,100dvh) - max(24px,env(safe-area-inset-top)) - 24px));
  box-sizing:border-box;width:calc(100% - 24px);max-width:none;
  height:var(--pb-sheet-height);max-height:var(--pb-sheet-height);
  margin:0;padding:0;border:0;border-radius:24px;overflow:hidden;
  box-shadow:0 -18px 48px rgba(15,23,42,.22);
 }
 .app-shell .main :is(.admin-booking-drawer,.booking-detail-v3),
 .pb-settings-panel .services-drawer.pb-side-form.pb-form-standalone {
  top:calc(var(--pb-viewport-bottom,100dvh) - var(--pb-sheet-height) - var(--pb-sheet-bottom));
  left:12px;right:12px;bottom:auto;
 }
 .pb-settings-panel .services-drawer.pb-side-form {width:100%;}
 .pb-settings-panel .services-drawer.pb-side-form.pb-form-standalone {width:calc(100% - 24px);height:var(--pb-sheet-height);max-height:var(--pb-sheet-height);}
 .app-shell .main .booking-detail-v3 .booking-detail-header,
 .app-shell .main .admin-booking-drawer .admin-booking-header,
 .pb-settings-panel .services-drawer.pb-side-form > header {
  box-sizing:border-box;min-height:56px;padding:6px 14px;gap:8px;align-items:center;
 }
 .app-shell .main .admin-booking-drawer .admin-booking-header h2,
 .pb-settings-panel .services-drawer.pb-side-form > header h2 {
  margin:0;font-size:18px;line-height:24px;font-weight:750;overflow-wrap:anywhere;
 }
 .app-shell .main .admin-booking-drawer .admin-booking-content,
 .pb-settings-panel .services-drawer.pb-side-form .services-drawer-body {
  min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;
 }
}
@media (max-width:700px) {
 .app-shell .main :is(.admin-booking-drawer,.booking-detail-v3),
 .pb-settings-panel .services-drawer.pb-side-form {
  --pb-sheet-bottom:0px;
  --pb-sheet-top-gap:16px;
  --pb-sheet-height:calc(var(--pb-viewport-height,100dvh) - env(safe-area-inset-top,0px) - var(--pb-sheet-top-gap));
  border-radius:24px 24px 0 0;
 }
 .app-shell .main :is(.admin-booking-drawer,.booking-detail-v3),
 .pb-settings-panel .services-drawer.pb-side-form.pb-form-standalone {left:8px;right:8px;width:calc(100% - 16px);border-radius:24px 24px 0 0;}
 .pb-settings-panel .services-overlay:has(.pb-side-form) {padding:0 8px;}
 .app-shell .main .booking-detail-v3 .booking-detail-scroll,
 .pb-settings-panel .services-drawer.pb-side-form .services-drawer-body {padding:16px 14px 20px;}
 .app-shell .main .admin-booking-submit-footer.pb-compact-outline,
 .app-shell .main .booking-detail-v3 .booking-detail-footer button,
 .pb-settings-panel .services-drawer.pb-side-form > footer .pb-side-form-submit {padding-left:14px;padding-right:14px;}
 .app-shell .main .admin-booking-back-button.pb-compact-outline {width:44px;max-width:44px;flex:0 0 44px;padding:0;}
 :root[data-pb-short-viewport] .app-shell .main :is(.admin-booking-drawer,.booking-detail-v3),
 :root[data-pb-short-viewport] .pb-settings-panel .services-drawer.pb-side-form {--pb-sheet-top-gap:0px;}
}
@media (max-width:700px) and (max-height:479px) {
 .app-shell .main :is(.admin-booking-drawer,.booking-detail-v3),
 .pb-settings-panel .services-drawer.pb-side-form {--pb-sheet-top-gap:0px;}
}

/* E2 field metrics. Scope only form bodies; native toggles and icon buttons
   deliberately do not inherit text-field width or height. */
:is(.app-shell .main .admin-booking-drawer .admin-booking-content, .pb-settings-panel .services-drawer.pb-side-form .services-drawer-body) :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=button]):not([type=submit]), select) {
 box-sizing:border-box;width:100%;min-width:0;max-width:100%;height:44px;min-height:44px;
 margin:0;border:1px solid #d8e1ed;border-radius:12px;padding:var(--pb-field-padding,10px 12px);
 font:600 16px/22px var(--pb-font-system,system-ui);background-color:#fff;
}
:is(.app-shell .main .admin-booking-drawer .admin-booking-content, .pb-settings-panel .services-drawer.pb-side-form .services-drawer-body) select {--pb-field-padding:0 12px;}
.app-shell .main .admin-booking-drawer .admin-booking-content,
.pb-settings-panel .services-drawer.pb-side-form .services-drawer-body {background:#f5f7fa;}
:is(.app-shell .main .admin-booking-drawer .admin-booking-content, .pb-settings-panel .services-drawer.pb-side-form .services-drawer-body) textarea {
 box-sizing:border-box;width:100%;min-width:0;max-width:100%;min-height:88px;
 border:1px solid #d8e1ed;border-radius:12px;padding:10px 12px;font:400 16px/22px var(--pb-font-system,system-ui);
}
.app-shell .main .admin-booking-drawer .admin-booking-content label:not(.toggle-line) {display:grid;gap:6px;font-size:14px;line-height:20px;font-weight:600;}
.app-shell .main .admin-booking-drawer .admin-booking-field-note {font-size:14px;line-height:20px;color:#64748b;margin:6px 0 0;}
.app-shell .main .admin-booking-drawer .admin-booking-tariff-check {
 display:flex;align-items:flex-start;gap:10px;min-height:44px;box-sizing:border-box;padding:11px 0;margin:0;
 font:400 16px/22px var(--pb-font-system,system-ui);
}
.app-shell .main .admin-booking-drawer .admin-booking-tariff-check input[type=checkbox] {
 appearance:none;-webkit-appearance:none;flex:0 0 22px;width:22px;min-width:22px;height:22px;min-height:22px;
 margin:0;padding:0;border:1px solid #7c899a;border-radius:5px;background:#fff;box-shadow:none;
}
.app-shell .main .admin-booking-drawer .admin-booking-tariff-check input[type=checkbox]:checked {
 border-color:#2f6df6;background:#2f6df6 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Cpath d='m5 11 4 4 8-8' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/22px 22px no-repeat;
}
.app-shell .main .admin-booking-drawer .admin-booking-tariff-check input[type=checkbox]:focus-visible {outline:2px solid #2f6df6;outline-offset:2px;}
@media (forced-colors:active) {
 .app-shell .main .admin-booking-drawer .admin-booking-tariff-check input[type=checkbox] {appearance:auto;-webkit-appearance:checkbox;}
}
.app-shell .main .admin-booking-drawer .pb-native-date-field {position:relative;display:block;height:44px;min-width:0;}
.app-shell .main .admin-booking-drawer .pb-native-date-field > .pb-native-date-text {
 display:flex;align-items:center;height:100%;box-sizing:border-box;padding:0 12px;
 border:1px solid #d8e1ed;border-radius:12px;background:#fff;font:600 16px/22px var(--pb-font-system,system-ui);
}
.app-shell .main .admin-booking-drawer .pb-native-date-field > input.pb-native-temporal {position:absolute;inset:0;opacity:0;cursor:pointer;}
.app-shell .main .admin-booking-drawer .pb-native-date-field:focus-within {outline:2px solid #2f6df6;outline-offset:2px;border-radius:12px;}

/* Opt-in shared runtime: booking, its child forms, detail and client forms. Geometry is measured
   before the keyboard, then only the body budget changes (approved A/B). */
.pb-form-shell[data-pb-form-managed] {
 top:var(--pb-form-top)!important;bottom:auto!important;
 height:var(--pb-form-height)!important;max-height:var(--pb-form-height)!important;
}
.pb-form-shell-panel {height:100%;min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr) auto;}
.pb-form-shell-body {min-height:0;overflow-y:auto;overscroll-behavior-y:none;scroll-padding-block:12px;overflow-anchor:none;}
.pb-settings-panel .services-drawer.pb-side-form .services-drawer-body {overscroll-behavior-y:none;}
.pb-form-shell[data-pb-footer-hidden] .pb-form-shell-footer {display:none!important;}
.pb-form-shell[data-pb-keyboard] {--pb-form-footer-safe:0px;}
.pb-form-shell-body textarea {min-height:44px;}
