.mdform-container {
    border: 1px solid var(--border);
    border-radius: 5px; /* Optional: rounded corners */
    padding: 1em 2em; /* Optional: add spacing inside the border */
    margin: 1em 0; /* Optional: add spacing outside the border */
}

/* stockhom.css has standard 7 em width we change it to 2em visualization for a better list in one line */
input[type="radio"].form-control,
input[type="checkbox"].form-control {
    min-width: 2em;
}

label {
    display: inline-block; /* Allows labels to sit side-by-side */
    margin-right: 1em; /* Adds spacing between radio buttons + text */
    cursor: pointer; /* Ensures the cursor changes to a pointer on hover */
}

/* --- Standard Checkbox --- */
/* We leave this alone as requested, just adding a pointer cursor */
input.form-control:not(.switch) {
    cursor: pointer;
}

/* --- Slider (The Switch) --- */
input.form-control.switch {
    /* Instead of display: none, use this: */
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    overflow: hidden;
    pointer-events: none; /* Prevents clicking the invisible box */
}

input.form-control.switch + label.switch {
    position: relative;
    padding-left: 55px; 
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    user-select: none;
}

/* The Slider Track */
input.form-control.switch + label.switch::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 22px;
    background-color: #ccc;
    border-radius: 20px;
    transition: background-color 0.2s;
}

/* The Slider Knob */
input.form-control.switch + label.switch::after {
    content: "";
    position: absolute;
    left: 3px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background-color: white;
    border-radius: 50%;
    transition: left 0.2s;
}

/* Checked States */
input.form-control.switch:checked + label.switch::before {
    background-color: #4CAF50;
}

input.form-control.switch:checked + label.switch::after {
    left: 25px;
}
