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

:root {
    --ff-primary:  'Inter', sans-serif;
    --fw-reg: 400;
    --fw-med: 600;
    --fw-bold: 800;

    --clr-primary: #1F2937;
    --clr-secondary: #273549;
    --clr-lgt-sndry: #4A5667;
    --clr-inverse: #FFFFFF;
    --clr-pr-txt: #FFFFFF;
    --clr-snd-txt: #D5D4D8;
    --clr-accent: #D22779;
}

body {
    font-family: var(--ff-primary);
    color: var(--clr-pr-txt);
    background: #1c1c1c;
    font-size: 16px;
}

h1 { font-size: 2.5rem; margin: 0; }
h3 { font-size: 1.25rem; margin: 0; }

/* Password Generator Styles */
.generator {
    max-width: 550px;
    min-width: 300px;
    width: 90%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-content: center;
    height: 100%;
    background: #1F2937;
    margin: 50px auto;
    padding: 46px 52px;
}

.generator__header {
    border-bottom: #2F3E53 1px solid;
    padding-bottom: 35px;
}

.generator__header_title span {
    color: var(--clr-accent);
    margin: 0;
}

.generator__header_subtitle {
    color: var(--clr-snd-txt);
    font-weight: 400;
    margin: 10px 0 46px;
}

.generator__header_options {
    display: flex;
    width: 100%;
    justify-content: space-between
}

/* Style Checkbox */
label > input[type='checkbox'] {
    display: none;
}

label > input[type="checkbox"] + * {
  display: inline-flex;
}

label > input[type="checkbox"] + *::before {
  content: "";
  display: inline-block;
  vertical-align: center;
  text-align: center;
  width: 1rem;
  height: 1rem;
  border-radius: 10%;
  border: solid 0.1rem var(--clr-lgt-sndry);
  background: var(--clr-secondary);
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

label > input[type="checkbox"]:checked + *::before {
  content: "✓";
  color: white;
  text-align: center;
  vertical-align: center;
  background: var(--clr-accent);
  border-color: var(--clr-accent);
  border: solid 0.1rem var(--clr-accent);
}

/* Button section style */
.generator__header_options_button {
    align-self: flex-end;
    margin-left: .5rem;
    text-align: right;
}

.error {
    color: var(--clr-accent);
    font-size: .8rem;
    margin-bottom: 0.5rem;
}

.btn {
    background: var(--clr-accent);
    color: var(--clr-pr-txt);
    padding: 0 17px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    height: 39px;

}

.btn img {
    height: 18px;
    margin-right: 15px;
    vertical-align: middle;
}

.btn:hover,
.btn:focus {
  background: #E32B84;
}

@media (max-width: 500px) {
    .generator__header_options {
        flex-direction: column;
    }

    .generator__header_options_button {
        margin-left: 0;
        margin-top: 1rem;
        justify-content: center;
        width: 100%;
    }

    .btn {
        display: block;
        width: 100%;
    }

    .error { text-align: center; }
}

.slider {
    -webkit-appearance: none;
    width: 100%;
    height: .5rem;
    border-radius: 5px;
    background: var(--clr-secondary);
    border: solid 0.1rem var(--clr-lgt-sndry);
    outline: none;
    -webkit-transition: .2s;
    transition: opacity .2s;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: var(--clr-accent);
    cursor: pointer;
}

.slider::-moz-range-thumb {
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: var(--clr-accent);
    cursor: pointer;
}

/* Password Area */
.generator__passwords {
    margin-top: 35px;
    display: grid;
    grid-gap: 27px 24px;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr))
}

.generator__passwords_password {
    border-radius: 6px;
    border: none;
    height: 39px;
    background: #273549 url('../images/dots-drk-icon.png') no-repeat center;
    text-align: center;
    color: var(--clr-accent);
    font-weight: 600;
}

/* Snackbar */
#snackbar {
  visibility: hidden;
  min-width: 250px;
  margin-left: -125px;
  background-color: var(--clr-secondary);
  color: var(--clr-accent);
  text-align: center;
  border-radius: .5rem;
  border: 2px solid var(--clr-lgt-sndry);
  padding: 16px;
  position: fixed;
  z-index: 1;
  left: 50%;
  bottom: 30%;
  font-size: 1rem;
}

#snackbar.show {
  visibility: visible;
  -webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s;
  animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

@-webkit-keyframes fadein {
  from {bottom: 0; opacity: 0;}
  to {bottom: 30%; opacity: 1;}
}

@keyframes fadein {
  from {bottom: 0; opacity: 0;}
  to {bottom: 30%; opacity: 1;}
}

@-webkit-keyframes fadeout {
  from {bottom: 30%; opacity: 1;}
  to {bottom: 0; opacity: 0;}
}

@keyframes fadeout {
  from {bottom: 30%; opacity: 1;}
  to {bottom: 0; opacity: 0;}
}

/* Footer */
footer {
    text-align: center;
    color: var(--clr-snd-txt);
    font-size: .75rem;
    margin-bottom: 2rem;
}

footer a {
    text-decoration: none;
    color: var(--clr-snd-txt);
}

footer a:hover {
  text-decoration: none;
  color: var(--clr-lgt-sndry);
}
