/**************************************************************************
 * Project:		Switcher - CSS Toggle Checkbox
 * Version:		1.0
 * Author:		pixenly
 * Profile:		https://themeforest.net/user/pixenly
**************************************************************************/

:root {
    --font-family: "DM Sans", sans-serif;

    --color-primary: #383AE4;
    --color-white: #ffffff;
    --color-light: #dddddd;

    --blue: #383AE4;
    --purple: #8719FD;
    --green: #09CF6C;
    --sky: #1AB2F2;
    --pink: #FF26B7;
    --orange: #ffa536;
    --red: #ff2121;
    --dark: #272528;
}

/* Set color according to theme */

[data-theme="theme-blue"] {
    --color-primary: var(--blue);
}

[data-theme="theme-purple"] {
    --color-primary: var(--purple);
}

[data-theme="theme-green"] {
    --color-primary: var(--green);
}

[data-theme="theme-sky"] {
    --color-primary: var(--sky);
}

[data-theme="theme-pink"] {
    --color-primary: var(--pink);
}

[data-theme="theme-orange"] {
    --color-primary: var(--orange);
}

[data-theme="theme-red"] {
    --color-primary: var(--red);
}

[data-theme="theme-dark"] {
    --color-primary: var(--dark);
}

body {
    font-family: var(--font-family);
    font-size: 16px;
}


/* Header */

header {
    background-color: var(--color-primary);
    padding: 80px 0;
}

#logo {
    max-width: 232px;
    margin: 0 auto 20px;
}

#logo img {
    display: block;
    width: 100%;
}


/* Switch Common CSS */

.switch input {
    display: none;
    height: 0;
    width: 0;
    visibility: hidden;
}

.switch input:disabled + label {
    cursor: not-allowed;
    opacity: 0.6;
}


/* Switch Light */

.switch-light label {
    position: relative;
    display: block;
    cursor: pointer;
    width: 58px;
    height: 32px;
    margin: 0;
    background: var(--color-light);
    border-radius: 64px;
    text-indent: -9999px;
    transition: 0.25s all ease-in-out;
}

.switch-light label:after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 24px;
    height: 24px;
    background: var(--color-white);
    border-radius: 24px;
    transition: 0.25s all ease-in-out;
}

.switch-light label:active:after {
    width: 30px;
}

.switch-light input:checked + label {
    background: var(--color-primary);
}

.switch-light input:checked + label:after {
    left: calc(100% - 4px);
    transform: translateX(-100%);
}


/* Switch Rounded */

.switch-rounded label {
    position: relative;
    display: block;
    cursor: pointer;
    width: 58px;
    height: 32px;
    margin: 0;
    background: var(--color-light);
    border-radius: 6px;
    text-indent: -9999px;
    transition: 0.25s all ease-in-out;
}

.switch-rounded label:after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 24px;
    height: 24px;
    background: var(--color-white);
    border-radius: 4px;
    transition: 0.25s all ease-in-out;
}

.switch-rounded label:active:after {
    width: 30px;
}

.switch-rounded input:checked + label {
    background: var(--color-primary);
}

.switch-rounded input:checked + label:after {
    left: calc(100% - 4px);
    transform: translateX(-100%);
}


/* Classic */

.switch-classic label {
    position: relative;
    display: block;
    cursor: pointer;
    width: 24px;
    height: 24px;
    margin: 0;
    background: var(--color-white);
    border: 2px solid var(--color-light);
    border-radius: 6px;
    text-indent: -9999px;
    transition: 0.25s all ease-in-out;
}

.switch-classic label:after {
    content: '';
    position: absolute;
    top: 4px;
    left: 3px;
    height: 8px;
    width: 15px;
    transform: rotate(-45deg);
    border-bottom: 2px solid var(--color-white);
    border-left: 2px solid var(--color-white);
    transition: 0.25s all ease-in-out;
    opacity: 0;
}

.switch-classic input:checked + label {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.switch-classic input:checked + label:after {
    opacity: 1;
}


/* Switch Box */

.switch-box label {
    position: relative;
    display: block;
    cursor: pointer;
    width: 80px;
    height: 32px;
    margin: 0;
    font-weight: 600;
    background: var(--color-white);
    border: 1px solid var(--color-light);
    border-radius: 6px;
    overflow: hidden;
    transition: 0.25s all ease-in-out;
}

.switch-box label .on, .switch-box label .off {
    position: absolute;
    display: block;
    top: 0;
    bottom: 0;
    width: 40px;
    font-size: 16px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.25s all ease-in-out;
}

.switch-box label .on {
    left: 0;
    background: var(--color-primary);
    color: var(--color-white);
    transform: translateX(-100%);
}

.switch-box label .off {
    right: 0;
    background: var(--color-light);
    padding-bottom: 2px;
    color: #BDBDBD;
}

.switch-box input:checked + label {
    border-color: var(--color-primary);
}

.switch-box input:checked + label .on {
    transform: translateX(0);
}

.switch-box input:checked + label .off {
    transform: translateX(100%);
}

.switch-box label:active .on {
    transform: translateX(-60%);
}

.switch-box label:active .off {
    transform: translateX(40%);
}


/* Flip */

.switch-flip label {
    position: relative;
    display: block;
    cursor: pointer;
    width: 80px;
    height: 32px;
    margin: 0;
    perspective: 100px;
}

.switch-flip label:before, .switch-flip label:after {
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 4px;
    display: block;
    line-height: 32px;
    text-align: center;
    color: var(--color-white);
    font-weight: 700;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    width: 100%;
    transition: all 0.4s ease;
}

.switch-flip label:before {
    content: attr(data-on);
    background: #f00;
}

.switch-flip label:after {
    content: attr(data-off);
    background: var(--color-primary);
    transform: rotateX(-180deg);
}

.switch-flip input:checked + label:before {
    transform: rotateX(180deg);
}

.switch-flip input:checked + label:after {
    transform: rotateX(0);
    left: 0;
}

.switch-flip label:active:before {
    transform: rotateX(-20deg);
}

.switch-flip input:checked+label:active:after {
    transform: rotateX(20deg);
}

.switch-classic input:checked+label {
    background: var(--color-primary);
    border-color: var(--color-primary);
}


/* Switch Rounded */

.switch-tag label {
    position: relative;
    display: table;
    text-align: center;
    cursor: pointer;
    width: auto;
    height: 32px;
    padding: 5px 20px;
    margin: 0;
    background: var(--color-white);
    border: 1px solid var(--color-light);
    border-radius: 6px;
    transition: 0.25s all ease-in-out;
}

.switch-tag label:active {
    border-color: #b9b9b9;
}

.switch-tag input:checked+label {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-white);
}

.switch-tag input:disabled+label {
    cursor: not-allowed;
    opacity: 0.6;
}