/* One geometry contract: 28x16 track, 12x12 thumb, 2px inset, 12px travel.
 * The named important layer intentionally outranks legacy unlayered dimensions,
 * including reduced-motion overrides. It does not resize labels or consent cards.
 */
@layer vr-toggle-metrics {
 :is(.vr-toggle-track,.service-toggle-track,.sms-choice-track,.proposal-consent-track,.followup-email-track,.vp-note-switch,.cp-reminder-switch>span,.ops-switch>span),:is(.gps-toggle input[type="checkbox"],.mobile-check input[type="checkbox"]){
  box-sizing:border-box!important;width:28px!important;min-width:28px!important;max-width:28px!important;
  height:16px!important;min-height:16px!important;max-height:16px!important;
  flex:0 0 28px!important;padding:0!important;border-width:0!important;transform:none!important;
  border-radius:999px!important;vertical-align:middle;
 }
 :is(.vr-toggle-track,.service-toggle-track,.sms-choice-track,.proposal-consent-track,.followup-email-track,.vp-note-switch,.cp-reminder-switch>span,.ops-switch>span)::after,:is(.gps-toggle input[type="checkbox"],.mobile-check input[type="checkbox"])::after{
  box-sizing:border-box!important;width:12px!important;min-width:12px!important;max-width:12px!important;
  height:12px!important;min-height:12px!important;max-height:12px!important;
  top:2px!important;left:2px!important;right:auto!important;bottom:auto!important;
  margin:0!important;padding:0!important;border:0!important;transform:translateX(0)!important;
 }
 .vr-toggle>input:checked+.vr-toggle-track::after,
 .service-chip:has(input:checked) .service-toggle-track::after,
 .sd-check:has(input:checked) .service-toggle-track::after,
 .sms-choice-input:checked+.sms-choice-track::after,
 .proposal-consent-switch>input:checked+.proposal-consent-track::after,
 .followup-email-input:checked+.followup-email-track::after,
 .vp-note-input:checked~.vp-note-switch::after,
 .cp-reminder-switch input:checked+span::after,
 .ops-switch input:checked+span::after,
 .gps-toggle input[type="checkbox"]:checked::after,
 .mobile-check input[type="checkbox"]:checked::after{transform:translateX(100%)!important}
 :is(.cp-reminder-switch,.proposal-consent-switch,.sms-choice-control){
  box-sizing:border-box!important;flex:0 0 28px!important;width:28px!important;min-width:28px!important;max-width:28px!important;
  height:16px!important;min-height:16px!important;max-height:16px!important;
 }
 .sms-choice-control>input{
  width:28px!important;min-width:28px!important;max-width:28px!important;
  height:16px!important;min-height:16px!important;max-height:16px!important;
 }
 input.custom-checkbox:not(.service-chip>input,.sr-only,[data-native-checkbox],[data-checkbox-style="custom"],.vp-note-input,.followup-email-input,.sms-choice-input){
  box-sizing:border-box!important;width:28px!important;min-width:28px!important;max-width:28px!important;
  height:16px!important;min-height:16px!important;max-height:16px!important;
  flex:0 0 28px!important;padding:0!important;border:0!important;transform:none!important;
 }
 input.custom-checkbox:not(.service-chip>input,.sr-only,[data-native-checkbox],[data-checkbox-style="custom"],.vp-note-input,.followup-email-input,.sms-choice-input):not(:indeterminate){
  background-image:radial-gradient(circle at center,#fff 5.5px,#fff 6px,transparent 6px)!important;
  background-size:12px 12px!important;background-position:2px center!important;
 }
 input.custom-checkbox:not(.service-chip>input,.sr-only,[data-native-checkbox],[data-checkbox-style="custom"],.vp-note-input,.followup-email-input,.sms-choice-input):checked:not(:indeterminate){background-position:right 2px center!important}
 /* Painted native inputs have one dot, never an additional legacy pseudo-element. */
 input.custom-checkbox:not(.service-chip>input,.sr-only,[data-native-checkbox],[data-checkbox-style="custom"],.vp-note-input,.followup-email-input,.sms-choice-input)::after{content:none!important}
 .vr-toggle>input{
  position:absolute!important;width:1px!important;min-width:0!important;max-width:1px!important;
  height:1px!important;min-height:0!important;max-height:1px!important;
  padding:0!important;margin:-1px!important;border:0!important;overflow:hidden!important;
  clip:rect(0,0,0,0)!important;clip-path:inset(50%)!important;white-space:nowrap!important;
 }
 @media(prefers-reduced-motion:reduce){
  :is(.vr-toggle-track,.service-toggle-track,.sms-choice-track,.proposal-consent-track,.followup-email-track,.vp-note-switch,.cp-reminder-switch>span,.ops-switch>span),:is(.vr-toggle-track,.service-toggle-track,.sms-choice-track,.proposal-consent-track,.followup-email-track,.vp-note-switch,.cp-reminder-switch>span,.ops-switch>span)::after,:is(.gps-toggle input[type="checkbox"],.mobile-check input[type="checkbox"]),:is(.gps-toggle input[type="checkbox"],.mobile-check input[type="checkbox"])::after,input.custom-checkbox:not(.service-chip>input,.sr-only,[data-native-checkbox],[data-checkbox-style="custom"],.vp-note-input,.followup-email-input,.sms-choice-input){transition:none!important}
 }
 @media(forced-colors:active){
  :is(.vr-toggle-track,.service-toggle-track,.sms-choice-track,.proposal-consent-track,.followup-email-track,.vp-note-switch,.cp-reminder-switch>span,.ops-switch>span),:is(.gps-toggle input[type="checkbox"],.mobile-check input[type="checkbox"]){outline:1px solid CanvasText;outline-offset:0}
  input.custom-checkbox:not(.service-chip>input,.sr-only,[data-native-checkbox],[data-checkbox-style="custom"],.vp-note-input,.followup-email-input,.sms-choice-input){background-image:none!important;background-size:auto!important}
 }
}
/* Semantic equivalent for the documented Tailwind component, with no runtime compiler. */
/* Inline labels define their intrinsic width. Never truncate or shrink their text. */
.vr-toggle{box-sizing:border-box;position:relative;display:inline-flex;align-items:center;flex:0 0 auto;gap:8px;width:max-content;min-width:max-content;max-width:none;padding:8px 0;margin:0;font:inherit;font-size:14px;line-height:20px;white-space:nowrap;cursor:pointer}
.vr-toggle>span:last-child{flex:0 0 auto;min-width:max-content;white-space:nowrap;overflow-wrap:normal;word-break:normal}
/* Explicit full-width layouts always win, including a pre-existing w-full class.
 * Long card labels may wrap naturally; the 28px track never shrinks.
 * These rules do not resize or reclassify legacy consent/permission cards.
 */
.vr-toggle:is(.w-full,.vr-toggle--full,[data-toggle-layout="full"]){display:flex;flex:0 1 auto;width:100%;min-width:0;max-width:100%;white-space:normal}
.vr-toggle:is(.w-full,.vr-toggle--full,[data-toggle-layout="full"])>span:last-child{flex:1 1 0;min-width:0;white-space:normal;overflow-wrap:anywhere;word-break:normal}
/* Wrap between components, not within inline labels. For an oversized label,
 * its own scroll wrapper contains overflow instead of widening the page.
 */
.vr-toggle-row{display:flex;flex-wrap:wrap;align-items:center;gap:12px;min-width:0;max-width:100%}
.vr-toggle-scroll{box-sizing:border-box;min-width:0;max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;padding:4px}
.vr-toggle-scroll:focus-visible{outline:2px solid #3b82f6;outline-offset:2px}
.vr-toggle-track{position:relative;display:inline-block;flex-shrink:0;background:#9ca3af;transition:background-color .18s}
.vr-toggle-track::after{content:"";position:absolute;display:block;border-radius:50%;background:#fff;box-shadow:0 1px 2px #0002;transition:transform .18s ease}
.vr-toggle>input:checked+.vr-toggle-track{background:#2563eb}
.vr-toggle>input:focus-visible+.vr-toggle-track{outline:2px solid #3b82f6;outline-offset:3px}
.vr-toggle:has(input:disabled){cursor:not-allowed}
.vr-toggle>input:disabled~span{opacity:.55}
html[data-theme=dark] .vr-toggle-track,html.dark .vr-toggle-track{background:#64748b}
html[data-theme=dark] .vr-toggle>input:checked+.vr-toggle-track,html.dark .vr-toggle>input:checked+.vr-toggle-track{background:#3b82f6}
@media(pointer:coarse){.vr-toggle{min-height:44px;box-sizing:border-box}}
/* File Policy's Enabled cells deliberately fill the column, not the global 28px width. */
html body :is(#ops-types,form[data-ops-form="file_policy_save"]) .ops-switch{
 display:flex;box-sizing:border-box;width:100%;min-width:28px;max-width:100%;margin:0;
}
form[data-ops-form="file_policy_save"] .vr-grid-cell-content:has(.ops-switch [data-file-enabled]){width:100%;min-width:0}
@layer vr-toggle-metrics {
 :is(#ops-types,form[data-ops-form="file_policy_save"]) .ops-switch>input.custom-checkbox,
 :is(#ops-types,form[data-ops-form="file_policy_save"]) .ops-switch>span{
  width:100%!important;min-width:28px!important;max-width:none!important;flex:1 1 auto!important;
 }
 :is(#ops-types,form[data-ops-form="file_policy_save"]) .ops-switch>input:checked+span::after{
  left:calc(100% - 14px)!important;transform:translateX(0)!important;
 }
}
/* The native label remains a full-cell click target before checkbox enhancement. */
html body :is(#ops-types,form[data-ops-form="file_policy_save"]) .ops-switch>input:not(.custom-checkbox){
 left:0;top:0;width:100%;height:100%;min-height:0;max-width:none;
}
@media(forced-colors:active){.vr-toggle-track{background:Canvas}.vr-toggle-track::after{background:CanvasText}.vr-toggle>input:checked+.vr-toggle-track{background:Highlight}.vr-toggle>input:checked+.vr-toggle-track::after{background:HighlightText}}
