@import url('https://fonts.googleapis.com/css?family=Oxygen');
html {
    font-family: Oxygen, sans-serif;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;

    /* color variables for the default light theme */
    --bg: #fcfcfc;
    --bg-card: #ebebeb;
    --color-heading: #0077ff;
    --color-text: #333333;
}

/* color variables if the button is toggled, triggered by javascript */
html[theme='dark'] {
    --bg: #333333;
    --bg-card: #434343;
    --color-heading: #3694ff;
    --color-text: #b5b5b5;
}

body {
    background-color: var(--bg);
    /* border: 1px dotted gray; */
}
.container {
    background-color: var(--bg-card );
    padding: 4em;
    margin: 2em;
    border-radius: 10px;

    display: grid;
    grid-column: 80% auto;
    grid-row: auto auto;
    grid-template-areas: 
        "title switch"
        "content content" 
}
h1 {
    margin: 0;
    color: var(--color-heading);
}
p {
    color: var(--color-text);
    grid-area: content;
    margin-top: 2em;
    font-size: 1.1rem;
    line-height: 1.8rem;
}

/**************************
    TOGGLE BUTTON STYELS
***************************/

input[type='checkbox'] {
    height: 0;
    width: 0;
    visibility: hidden;
}
label {
    height: 27px;
    width: 52px;
    background: gray;
    float: right;
    border-radius: 100px;
    cursor: pointer;
    text-indent: -9999px; /* hiding the text "Toggle"*/
    position: relative;
}
label:after {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    top: 3px;
    left: 3px;   
    background: var(--bg);
    border-radius: 90px;
    transition: 0.3s;
}
input:checked + label {
    background: var(--color-heading);
}
input:checked + label:after {
    left: calc(100% - 3px);
    transform: translateX(-100%);
}
label:active:after {
    width: 45px;
}

