/**
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 * Adapted from material-esm/material switch/switch.js and checkbox/checkbox.js;
 * outlined select and menu styling follows select/select.js and menu/menu.js
 * at fafed6f5da70f12e5d897230181f9b42dff373c6. See README.md for modifications.
 */
.md3-switch { position: relative; display: inline-flex; align-items: center; width: 52px; height: 48px; flex: 0 0 52px; }
.md3-switch input { position: absolute; z-index: 2; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.md3-switch-track { position: relative; display: block; width: 52px; height: 32px; border: 2px solid var(--muted); border-radius: 999px; background: rgba(249,249,255,.55); transition: background 180ms var(--ease), border-color 180ms var(--ease); }
.md3-switch-handle { position: absolute; left: 6px; top: 6px; width: 16px; height: 16px; display: grid; place-items: center; border-radius: 50%; color: var(--theme-deep); background: var(--muted); transition: width 180ms var(--ease), height 180ms var(--ease), left 180ms var(--ease), top 180ms var(--ease), background 180ms var(--ease); }
.md3-switch-handle::before { position: absolute; width: 40px; height: 40px; border-radius: 50%; background: var(--theme-deep); content: ""; opacity: 0; transition: opacity 180ms var(--ease); }
.md3-switch-handle svg { width: 16px; height: 16px; opacity: 0; transition: opacity 180ms var(--ease); }
.md3-switch input:checked + .md3-switch-track { border-color: var(--theme-deep); background: var(--theme-deep); }
.md3-switch input:checked + .md3-switch-track .md3-switch-handle { left: 22px; top: 2px; width: 24px; height: 24px; background: var(--theme-on-deep); }
.md3-switch input:checked + .md3-switch-track svg { opacity: 1; }
.md3-switch input:hover + .md3-switch-track .md3-switch-handle::before, .md3-switch input:focus-visible + .md3-switch-track .md3-switch-handle::before { opacity: .08; }
.md3-switch input:active + .md3-switch-track .md3-switch-handle::before { opacity: .12; }
.md3-switch input:focus-visible + .md3-switch-track { outline: 3px solid var(--theme-deep); outline-offset: 4px; }
.md3-check-control { position: relative; isolation: isolate; display: inline-grid; place-items: center; width: 40px; height: 44px; flex: 0 0 40px; }
.md3-check-control::before { position: absolute; width: 40px; height: 40px; border-radius: 50%; content: ""; background: var(--theme-deep); opacity: 0; transform: scale(.6); pointer-events: none; transition: opacity 150ms linear, transform 350ms cubic-bezier(.05,.7,.1,1); }
label:hover > .md3-check-control::before, .md3-check-control:has(input:focus-visible)::before { transform: scale(1); }
label:active > .md3-check-control:has(input:not(:disabled))::before { opacity: .12; transform: scale(1); }
.md3-check-control::after { position: absolute; top: 50%; left: 50%; margin: -9px 0 0 -9px; width: 18px; height: 18px; border-radius: 2px; content: ""; pointer-events: none; background: var(--theme-deep); opacity: 0; transform: scale(.6); transition: transform 150ms cubic-bezier(.3,0,.8,.15), opacity 50ms linear; }
.md3-check-control:has(input:checked, input:indeterminate)::after { opacity: 1; transform: scale(1); transition-duration: 350ms, 50ms; transition-timing-function: cubic-bezier(.05,.7,.1,1), linear; }
label:hover > .md3-check-control::before, .md3-check-control:has(input:focus-visible)::before { opacity: .08; }
.md3-checkbox { position: relative; z-index: 1; appearance: none; -webkit-appearance: none; width: 18px; height: 18px; margin: 0; border: 2px solid var(--muted); border-radius: 2px; color: var(--theme-on-deep); background: transparent; cursor: pointer; transition: border-color 50ms linear; }
.md3-checkbox:checked, .md3-checkbox:indeterminate { border-color: transparent; }
.md3-check-control svg { position: absolute; z-index: 2; width: 18px; height: 18px; pointer-events: none; fill: none; stroke: var(--theme-on-deep); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: scale(.6); transition: transform 150ms cubic-bezier(.3,0,.8,.15), opacity 50ms linear; }
.md3-checkbox:is(:checked, :indeterminate) + svg { opacity: 1; transform: scale(1); transition-duration: 350ms, 50ms; transition-timing-function: cubic-bezier(.05,.7,.1,1), linear; }
.md3-check, .md3-mixed { opacity: 0; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 150ms cubic-bezier(.3,0,.8,.15), opacity 50ms linear; }
.md3-checkbox:checked:not(:indeterminate) + svg .md3-check, .md3-checkbox:indeterminate + svg .md3-mixed { opacity: 1; stroke-dashoffset: 0; transition: stroke-dashoffset 350ms cubic-bezier(.05,.7,.1,1), opacity 50ms linear; }
.md3-checkbox:focus-visible { outline: 3px solid var(--theme-deep); outline-offset: 4px; }
.md3-checkbox:disabled { opacity: .38; cursor: default; }
.md3-checkbox:disabled + svg { opacity: .38; }
.md3-check-control:has(input:disabled)::after { opacity: .38; }
.md3-check-control:has(input:disabled:not(:checked):not(:indeterminate))::after { opacity: 0; }
.md3-select { position: relative; min-width: 0; margin-top: 8px; }
.md3-select-outline { position: absolute; inset: -8px 0 0; margin: 0; padding: 0 12px; min-width: 0; border: 1px solid var(--muted); border-radius: 4px; pointer-events: none; }
.md3-select-outline legend { padding: 0 4px; font-size: 12px; line-height: 16px; color: var(--muted); }
.md3-select > [role="combobox"] { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 56px; padding: 12px 16px; border: 0; border-radius: 4px; font: inherit; color: var(--ink); background: transparent; cursor: pointer; text-align: left; }
.md3-select > [role="combobox"] > svg { width: 20px; height: 20px; flex: none; transition: transform 180ms var(--ease); }
.md3-select > [aria-expanded="true"] > svg { transform: rotate(180deg); }
.md3-select:focus-within .md3-select-outline { border: 2px solid var(--theme-deep); padding-inline: 11px; }
.md3-select:focus-within legend { color: var(--theme-deep); }
.md3-select > [role="combobox"]:focus-visible { outline: 2px solid var(--theme-deep); outline-offset: 3px; }
.md3-select-menu { position: absolute; z-index: 5; top: calc(100% + 4px); left: 0; right: 0; padding: 8px 0; overflow-y: auto; overscroll-behavior: contain; border-radius: 4px; border: 0; background: var(--theme-deep-soft); color: var(--ink); box-shadow: none; }
.md3-select-menu[data-motion] { overflow: hidden; will-change: height, opacity; }
.md3-select-menu[data-motion="closing"] { pointer-events: none; }
.md3-select-menu[hidden] { display: none; }
.md3-select[data-placement="above"] .md3-select-menu { top: auto; bottom: calc(100% + 4px); }
.md3-select-menu [role="option"] { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 12px 16px; cursor: pointer; }
.md3-select-menu [role="option"] > svg { width: 20px; height: 20px; flex: none; opacity: 0; }
.md3-select-menu [role="option"][aria-selected="true"] { color: var(--theme-deep); font-weight: 650; }
.md3-select-menu [role="option"][aria-selected="true"] > svg { opacity: 1; }
.md3-select-menu [role="option"] { transition: background 100ms linear; }
.md3-select-menu [role="option"].is-active { background: color-mix(in srgb, var(--theme-deep) 12%, transparent); }
@media (prefers-reduced-motion: reduce) { .md3-switch *, .md3-checkbox, .md3-check-control::before, .md3-check-control::after, .md3-check-control svg, .md3-check-control path { transition: none; } }
@media (forced-colors: active) {
  .md3-switch-track { border-color: ButtonText; background: Canvas; }
  .md3-switch-handle { background: ButtonText; }
  .md3-switch input:checked + .md3-switch-track { border-color: Highlight; background: Highlight; forced-color-adjust: none; }
  .md3-switch input:checked + .md3-switch-track .md3-switch-handle { background: HighlightText; color: Highlight; forced-color-adjust: none; }
  .md3-checkbox { border-color: ButtonText; }
  .md3-check-control::after { background: Highlight; forced-color-adjust: none; }
  .md3-check-control svg { stroke: HighlightText; forced-color-adjust: none; }
  .md3-select-outline { border-color: ButtonText; }
  .md3-select-menu { background: Canvas; color: CanvasText; border: 1px solid CanvasText; }
  .md3-select-menu [role="option"].is-active { background: Highlight; color: HighlightText; forced-color-adjust: none; }
}
