/**
--------------------------------------------------------------------------------
Option	        |       Data Attribute
--------------------------------------------------------------------------------
Rounded         |	    data-style="rounded"
--------------------------------------------------------------------------------
Square          |	    data-style="square"
--------------------------------------------------------------------------------
No Text         |	    data-text="false"
--------------------------------------------------------------------------------
Disabled        |	    add the disabled attribute to the input tag
--------------------------------------------------------------------------------
Checked         |   	add the checked attribute to the input tag
--------------------------------------------------------------------------------
                |       data-size="xl"
                |       data-size="lg"
Sizes	        |       medium (default)
                |       data-size="sm"
                |       data-size="xs"
--------------------------------------------------------------------------------
                |       data-color="red"
                |       data-color="orange"
                |       data-color="yellow"
Colors	        |       data-color="green"
                |       data-color="blue"
                |       data-color="purple"
                |       data-color="gray"
--------------------------------------------------------------------------------
Labels	        |       data-label="left"
                |       label on right (default)
*/
/* Customizable styles */
/* Colors: Default (blue) */
.oxo-switch {
    color: #fff;
}

.oxo-switch > input + .toggle:before {
    content: 'ON';
}

.oxo-switch > input + .toggle:after {
    content: 'OFF';
}

.oxo-switch > input + .toggle > .switch {
    background: #fff;
}

.oxo-switch > input + .toggle + .label {
    color: #000;
}

.oxo-switch > input:checked + .toggle {
    background: #3498db;
}

.oxo-switch > input:not(:checked) + .toggle {
    background: #ccc;
}

.oxo-switch > input:checked + .toggle > .switch {
    border: 3px solid #3498db;
}

.oxo-switch > input:not(:checked) + .toggle > .switch {
    border: 3px solid #ccc;
}

.oxo-switch > input:focus + .toggle,
.oxo-switch > input:active + .toggle {
    /*box-shadow: 0 0 5px 3px rgba(0, 119, 200, 0.50);*/
}

/* Rounded switch corners */
.oxo-switch > input + .toggle {
    border-radius: 4px;
}

.oxo-switch > input + .toggle .switch {
    border-radius: 6px;
}

/* //////////////////////////
CORE STYLES BELOW - NO TOUCH
////////////////////////// */
.oxo-switch {
    display: inline-flex;
    align-items: center;
    user-select: none;
    position: relative;
    vertical-align: middle;
    margin-bottom: 0;
}

.oxo-switch:hover {
    cursor: pointer;
}

.oxo-switch > input {
    position: absolute;
    opacity: 0;
}

.oxo-switch > input + .toggle {
    align-items: center;
    position: relative;
}

.oxo-switch > input + .toggle {
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.oxo-switch > input[disabled] + .toggle {
    opacity: 0.5;
}

.oxo-switch > input[disabled] + .toggle:hover {
    cursor: not-allowed;
}

.oxo-switch > input + .toggle {
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
}

.oxo-switch > input + .toggle > .switch {
    display: block;
    height: 100%;
    position: absolute;
    right: 0;
    z-index: 3;
    box-sizing: border-box;
}

/* Labels */
.oxo-switch > input + .toggle:before,
.oxo-switch > input + .toggle:after {
    display: flex;
    align-items: center;
    position: absolute;
    z-index: 2;
    height: 100%;
}

.oxo-switch > input + .toggle:before {
    right: 55%;
}

.oxo-switch > input + .toggle:after {
    left: 50%;
}

.oxo-switch > input + .toggle + .label {
    margin-left: 5px;
}

.oxo-switch[data-label='left'] > input + .toggle {
    order: 2;
}

.oxo-switch[data-label='left'] > input + .toggle + .label {
    order: 1;
    margin-left: 0;
    margin-right: 10px;
}

/* Show / Hide */
.oxo-switch > input + .toggle:before {
    opacity: 0;
}

.oxo-switch > input:checked + .toggle:before {
    opacity: 1;
}

.oxo-switch > input:checked + .toggle:after {
    opacity: 0;
}

/* Transitions */
.oxo-switch > input + .toggle {
    transition: background 200ms linear, box-shadow 200ms linear;
}

.oxo-switch > input + .toggle:before,
.oxo-switch > input + .toggle:after {
    transition: all 200ms linear;
}

.oxo-switch > input + .toggle > .switch {
    transition: right 200ms linear, border-color 200ms linear;
}

/* //////////////////////////
CORE STYLES ABOVE - NO TOUCHY
////////////////////////// */

/* Size: Extra Large */
.oxo-switch[data-size='xl'] > input + .toggle {
    width: 85px;
    height: 40px;
}

.oxo-switch[data-size='xl'] > input + .toggle > .switch {
    width: 40px;
}

.oxo-switch[data-size='xl'] > input + .toggle:before,
.oxo-switch[data-size='xl'] > input + .toggle:after {
    font-size: 1.2rem;
}

.oxo-switch[data-size='xl'] > input:not(:checked) + .toggle > .switch {
    right: calc(100% - 40px);
}

/* Size: Large */
.oxo-switch[data-size='lg'] > input + .toggle {
    width: 75px;
    height: 35px;
}

.oxo-switch[data-size='lg'] > input + .toggle > .switch {
    width: 35px;
}

.oxo-switch[data-size='lg'] > input + .toggle:before,
.oxo-switch[data-size='lg'] > input + .toggle:after {
    font-size: 1rem;
}

.oxo-switch[data-size='lg'] > input:not(:checked) + .toggle > .switch {
    right: calc(100% - 35px);
}

/* Size: Default (Medium) */
.oxo-switch > input + .toggle {
    width: 65px;
    height: 30px;
}

.oxo-switch > input + .toggle > .switch {
    width: 30px;
}

.oxo-switch > input + .toggle:before,
.oxo-switch > input + .toggle:after {
    font-size: 0.8rem;
}

.oxo-switch > input:not(:checked) + .toggle > .switch {
    right: calc(100% - 30px);
}

/* Size: Small */
.oxo-switch[data-size='sm'] > input + .toggle {
    width: 55px;
    height: 25px;
}

.oxo-switch[data-size='sm'] > input + .toggle > .switch {
    width: 25px;
}

.oxo-switch[data-size='sm'] > input + .toggle:before,
.oxo-switch[data-size='sm'] > input + .toggle:after {
    font-size: 0.7rem;
}

.oxo-switch[data-size='sm'] > input:not(:checked) + .toggle > .switch {
    right: calc(100% - 25px);
}

/* Size: Extra Small */
.oxo-switch[data-size='xs'] > input + .toggle {
    width: 45px;
    height: 20px;
}

.oxo-switch[data-size='xs'] > input + .toggle > .switch {
    width: 20px;
}

.oxo-switch[data-size='xs'] > input + .toggle:before,
.oxo-switch[data-size='xs'] > input + .toggle:after {
    font-size: 0.5rem;
}

.oxo-switch[data-size='xs'] > input:not(:checked) + .toggle > .switch {
    right: calc(100% - 20px);
}

/* Style: Rounded */
.oxo-switch[data-style='rounded'] > input + .toggle,
.oxo-switch[data-style='rounded'] > input + .toggle > .switch {
    border-radius: 50px;
}

.oxo-switch[data-style='rounded'] > input + .toggle:before {
    right: 50%;
}

.oxo-switch[data-style='rounded'] > input + .toggle:after {
    left: 50%;
}

/* Style: Square */
.oxo-switch[data-style='square'] > input + .toggle {
    border-radius: 0;
}

.oxo-switch[data-style='square'] > input + .toggle .switch {
    border-radius: 0;
}

/* Text: Off */
.oxo-switch[data-text='false'] > input + .toggle:before,
.oxo-switch[data-text='false'] > input + .toggle:after {
    content: '';
}

.oxo-switch[data-text='false'][data-size='xl'] > input + .toggle {
    width: 80px;
}

.oxo-switch[data-text='false'][data-size='lg'] > input + .toggle {
    width: 70px;
}

.oxo-switch[data-text='false'] > input + .toggle {
    width: 60px;
}

.oxo-switch[data-text='false'][data-size='sm'] > input + .toggle {
    width: 50px;
}

.oxo-switch[data-text='false'][data-size='xs'] > input + .toggle {
    width: 40px;
}

/* Color: Red */
.oxo-switch[data-color='red'] > input:checked + .toggle {
    background: #e74c3c;
}

.oxo-switch[data-color='red'] > input:checked + .toggle > .switch {
    border-color: #e74c3c;
}

/* Color: Orange */
.oxo-switch[data-color='orange'] > input:checked + .toggle {
    background: #e67e22;
}

.oxo-switch[data-color='orange'] > input:checked + .toggle > .switch {
    border-color: #e67e22;
}

/* Color: Yellow */
.oxo-switch[data-color='yellow'] > input:checked + .toggle {
    background: #f1c40f;
}

.oxo-switch[data-color='yellow'] > input:checked + .toggle > .switch {
    border-color: #f1c40f;
}

/* Color: Green */
.oxo-switch[data-color='green'] > input:checked + .toggle {
    background: #2ecc71;
}

.oxo-switch[data-color='green'] > input:checked + .toggle > .switch {
    border-color: #2ecc71;
}

/* Color: Blue */
.oxo-switch[data-color='blue'] > input:checked + .toggle {
    background: #3498db;
}

.oxo-switch[data-color='blue'] > input:checked + .toggle > .switch {
    border-color: #3498db;
}

/* Color: Purple */
.oxo-switch[data-color='purple'] > input:checked + .toggle {
    background: #9b59b6;
}

.oxo-switch[data-color='purple'] > input:checked + .toggle > .switch {
    border-color: #9b59b6;
}

/* Color: Gray */
.oxo-switch[data-color='gray'] > input:checked + .toggle {
    background: #555;
}

.oxo-switch[data-color='gray'] > input:checked + .toggle > .switch {
    border-color: #555;
}