* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    font-size: 62.5%;
}

body {
    width: 100vw;
    height: 100vh;
    background-color: #feffff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1.6rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

#main {
    
    padding: 2rem;
    background-color: #222629;
    color: #86c232;
    text-shadow: 1px 1px black;
    font-weight: bold;
    border: .3rem solid black;
    border-radius: 1rem;
    box-shadow: 0 0 10px 5px white;
}

#main,
form {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
}

h1 {
    padding: 2rem;
    text-shadow: 1px 1px black;
    text-align: center;
}

.container,
button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: .1rem solid rgba(0, 0, 0, 0.5);
}

.container {
    margin: 5px;
    padding: 1rem;
    background-color: #474b4f;
    border-radius: 1rem;
}

/* ----- Password display -----*/

#display {
    height: 6rem;
    padding: 0px;
    margin-bottom: 2rem;
    background-color: #121416;
    border: 1px solid white;
}

#visor {
    width: 90%;
    padding: 1rem;
    background-color: transparent;
    color: #86c232;
    font-size: 1.9rem;
    text-align: center;
    border: none;
    outline: none;
    font-weight: bold;
    cursor: default;
}

/* ----- Toggle buttons -----*/

.toggle,
#length {
    width: 5rem;
    height: 2.6rem;
    background-color: #222629;
    font-size: 1.8rem;
    border-radius: 10rem;
    text-align: center;
    /* cursor: pointer; */
    position: relative;
    display: inline-block;
    appearance: none;
    /* This property doesn't work in EDGE and IE (so we add the next two properties */
    -webkit-appearance: none;
    -moz-appearance: none;
}

.toggle::after {
    content: "";
    width: 2rem;
    height: 2rem;
    background-color: white;
    border-radius: 9rem;

    position: absolute;
    top: 3px;
    left: 3px;
    
    transition: .3s;
    transform: translateX(0);
}

.toggle:checked {
    background-color: #86c232;
    transition: background-color .1s;
}

/* The circle moves to the other side (when it's activated) */
.toggle:checked::after {
    left: calc(100% - 3px);
    transform: translateX(-100%);
}

/* toggle button becomes wider when is pressed*/
.toggle:active::after {
    width: 2.8rem;
}

/* ----- removes the arrows of the input (type number) ----- */

/* Chrome, Safari, Edge, Opera */
#length::-webkit-outer-spin-button,
#length::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
    outline: none;
    border: none;
    background-color: #222629;
    color: #86c232;
    font-weight: bold;
}

/* Firefox */
#length {
    -moz-appearance: textfield;
    outline: none;
    border: none;
    background-color: #222629;
    color: #86c232;
    font-weight: bold;
}

#length::placeholder {
    color: #86c232;
}

/* --------BUTTON--------*/
button,
#copy {
    background-color: #474b4f;
    color: #86c232;
    font-size: 1.8rem;
    box-shadow: inset 4px 4px 8px white, inset -4px -4px 8px black;
    cursor: pointer;
}

button {
    border-radius: 2rem;
}

button:active,
#copy:active {
    box-shadow: inset 4px 4px 8px black, inset -4px -4px 8px white;
}

#generate {
    min-width: fit-content;
    margin: 2rem auto .5rem;
    padding: 1rem 2rem;
    font-weight: bold;
}

#copy {
    width: 6rem;
    height: 100%;
    font-size: 2.8rem;
    border: none;
    border-radius: 0 1rem 1rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

