.sdmt-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    border: 0;
    background: transparent !important;
    color: #f5f5f5;
    font: inherit;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.sdmt-toggle__track {
    position: relative;
    display: inline-block;
    flex: 0 0 auto;
    width: 48px;
    height: 26px;
    border-radius: 999px;
    background: #3a3a3a !important;
    transition: background-color .2s ease;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .24);
}

.sdmt-toggle__thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .28);
    transition: transform .2s ease;
}

/* aria-pressed=true now means LIGHT MODE is active. */
.sdmt-toggle[aria-pressed="true"] .sdmt-toggle__track {
    background: #d9d9d9 !important;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18);
}

.sdmt-toggle[aria-pressed="true"] .sdmt-toggle__thumb {
    transform: translateX(22px);
    background: #111111 !important;
}

.sdmt-toggle__label {
    color: inherit !important;
}

.sdmt-toggle:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
}

/* Website is dark by default; this class only exists when light mode is on. */
html.sdmt-light-mode {
    color-scheme: light;
}

html.sdmt-light-mode .sdmt-toggle,
html.sdmt-light-mode .sdmt-toggle__label {
    color: #111111 !important;
}
