diff --git a/frontend/css/styles.css b/frontend/css/styles.css index c229785..6a43e94 100644 --- a/frontend/css/styles.css +++ b/frontend/css/styles.css @@ -257,6 +257,42 @@ body { appearance: none; } +/* Toggle switch: a checkbox styled as a sliding on/off switch. Overrides the + full-width .form-group input rule above (which otherwise stretches a checkbox + into an empty box). Apply class="toggle" to . */ +.form-group input[type="checkbox"].toggle { + width: 46px; + height: 26px; + flex: 0 0 auto; + padding: 0; + border-radius: 13px; + background: var(--bg); + border: 1px solid var(--border); + position: relative; + cursor: pointer; + transition: background 0.15s, border-color 0.15s; +} +.form-group input[type="checkbox"].toggle::after { + content: ""; + position: absolute; + top: 50%; + left: 3px; + width: 20px; + height: 20px; + border-radius: 50%; + background: var(--muted); + transform: translateY(-50%); + transition: left 0.15s, background 0.15s; +} +.form-group input[type="checkbox"].toggle:checked { + background: var(--primary); + border-color: var(--primary); +} +.form-group input[type="checkbox"].toggle:checked::after { + left: 23px; + background: #fff; +} + select { background: var(--bg); color: var(--on-surface); diff --git a/frontend/js/main.js b/frontend/js/main.js index b3087e3..4886587 100644 --- a/frontend/js/main.js +++ b/frontend/js/main.js @@ -8256,7 +8256,7 @@ function showProfileModal() {