/* =============================================== */
/* Custom properties */
:root {
    /* Font */
    --font-base: 1rem;
    --ff-jetbrains: "JetBrains Mono", monospace;

    /* Colors: Base */
    --clr-white: 255, 255, 255;
    --clr-black: 0, 0, 0;

    /* Colors: Grey */
    --clr-grey-950: 8, 7, 11;
    --clr-grey-900: 20, 19, 27;
    --clr-grey-850: 24, 23, 31;
    --clr-grey-800: 36, 35, 44;
    --clr-grey-700: 84, 83, 91;
    --clr-grey-600: 128, 124, 146;
    --clr-grey-200: 230, 229, 234;

    /* Colors: Accent */
    --clr-green-200: 164, 255, 175;
    --clr-yellow-300: 248, 205, 101;
    --clr-orange-400: 251, 124, 88;
    --clr-red-500: 246, 74, 74;

    /* Gradients */
    --gradient-1-start: 20, 19, 27;
    /* #14131B */
    --gradient-1-end: 8, 7, 11;
    /* #08070B */

    /* Font sizes */
    --fs-32: 2rem;
    --fs-24: 1.5rem;
    --fs-18: 1.125rem;
    --fs-16: 1rem;

    /* Line heights */
    --lh-42: 2.625rem;
    --lh-32: 2rem;
    --lh-24: 1.5rem;
    --lh-20: 1.25rem;

    /* Letter spacing */
    --ls-0: 0px;
}

@media (max-width: 36em) {
    :root {
        --fs-32: 1.5rem;
        --fs-24: 1rem;
        --fs-18: 1rem;
        --fs-16: 1.5rem;

        --lh-42: 2rem;
        --lh-32: 1.5rem;
        --lh-24: 1.25rem;
        --lh-20: 2rem;

    }
}

/* =============================================== */
/* Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -moz-text-size-adjust: none;
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
}

body {
    font-size: var(--font-base);
    font-family: var(--ff-jetbrains);
}

body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd,
ul,
ol {
    margin: 0;
    padding: 0;
}

ul,
ol {
    list-style: none;
}

h1,
h2,
h3,
h4 {
    text-wrap: balance;
}

a:not([class]) {
    text-decoration-skip-ink: auto;
    text-decoration: none;
    color: currentColor;
}

img,
picture {
    max-width: 100%;
    display: block;
}

input,
button,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
    border: none;
}

button {
    border: none;
    background: inherit;
    cursor: pointer;
}

textarea:not([rows]) {
    min-height: 10em;
}

:target {
    scroll-margin-block: 5ex;
}

/* =============================================== */
/* Utility classes */

.container {
    margin: 0 auto;
    padding: 65px 16px 0;
}

@media (min-width: 36em) {
    :root {
        .container {
            margin: 0 auto;
            max-width: 540px;
            padding: 65px 0;
        }
    }
}

@media (min-width: 50em) {
    :root {
        .container {
            margin: 0 auto;
            max-width: 540px;
            padding: 133px 0;
        }
    }
}

/* =============================================== */
/* Text Presets */

.text-preset-1 {
    font-family: var(--ff-jetbrains);
    font-size: var(--fs-32);
    line-height: var(--lh-42);
    letter-spacing: var(--ls-0);
    font-weight: 700;
}

.text-preset-2 {
    font-family: var(--ff-jetbrains);
    font-size: var(--fs-24);
    line-height: var(--lh-32);
    letter-spacing: var(--ls-0);
    font-weight: 700;
}

.text-preset-3 {
    font-family: var(--ff-jetbrains);
    font-size: var(--fs-18);
    line-height: var(--lh-24);
    letter-spacing: var(--ls-0);
    font-weight: 700;
}

.text-preset-4 {
    font-family: var(--ff-jetbrains);
    font-size: var(--fs-16);
    line-height: var(--lh-20);
    letter-spacing: var(--ls-0);
    font-weight: 700;
}

/* =============================================== */
/* Text color */

.text-white {
    color: rgb(var(--clr-white));
}

.text-black {
    color: rgb(var(--clr-black));
}

.text-grey-950 {
    color: rgb(var(--clr-grey-950));
}

.text-grey-900 {
    color: rgb(var(--clr-grey-900));
}

.text-grey-850 {
    color: rgb(var(--clr-grey-850));
}

.text-grey-800 {
    color: rgb(var(--clr-grey-800));
}

.text-grey-700 {
    color: rgb(var(--clr-grey-700));
}

.text-grey-600 {
    color: rgb(var(--clr-grey-600));
}

.text-grey-200 {
    color: rgb(var(--clr-grey-200));
}

.text-green-200 {
    color: rgb(var(--clr-green-200));
}

.text-yellow-300 {
    color: rgb(var(--clr-yellow-300));
}

.text-orange-400 {
    color: rgb(var(--clr-orange-400));
}

.text-red-500 {
    color: rgb(var(--clr-red-500));
}

.uppercase {
    text-transform: uppercase;
}

/* =============================================== */
/* Gradient utility */

.bg-gradient-1 {
    background: linear-gradient(to right,
            rgb(var(--gradient-1-start)),
            rgb(var(--gradient-1-end)));
}

/* =============================================== */

h1 {
    text-align: center;
}

.password-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgb(var(--clr-grey-800));
    padding: 16px;
    margin-block: 16px;
}

@media (min-width: 36em) {
    :root {
        .password-container {
            padding: 19px 32px;
            margin-block: 32px 24px;
        }
    }
}


.password-container input {
    background-color: rgb(var(--clr-grey-800));
    width: 100%;
}

.password-container input:focus-visible {
    outline: none;
}

.password-container span {
    margin-left: 1rem;
    margin-right: 0.5rem;
}

.password-container button:hover path {
    fill: rgb(var(--clr-white));
}

.container-background {
    background-color: rgb(var(--clr-grey-800));
    padding-inline: 16px;
}

@media (min-width: 36em) {
    :root {
        .container-background {
            padding-inline: 32px;
        }
    }
}

.slide-container p {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0 8px;
}

@media (min-width: 36em) {
    :root {
        .slide-container p {
            padding: 24px 0 16px;
        }
    }
}

.slide-container input {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    background-color: rgb(var(--clr-grey-850));
    margin-block: 10px;
}

.slide-container input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: rgb(var(--clr-grey-200));
}

.slide-container input::-moz-range-thumb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: rgb(var(--clr-grey-200));
    border: none;
}

.slide-container input:hover::-webkit-slider-thumb,
.slide-container input:hover::-moz-range-thumb {
    background-color: rgb(var(--clr-grey-850));
    border: 2px solid rgb(var(--clr-green-200));
}

.checkbox-container {
    padding-block: 32px;
}

.checkbox-container li:not(:last-child) {
    margin-bottom: 16px;
}

.checkbox-container label {
    display: flex;
    gap: 16px;
}

.checkbox-container input {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px rgb(var(--clr-grey-200)) solid;
    margin: 0;
}

.checkbox-container input:checked {
    background: center / contain no-repeat url('starter-code/assets/images/icon-check.svg'),
        rgb(var(--clr-green-200));
    border-color: rgb(var(--clr-green-200));
}

.strength-container {
    background-color: rgb(var(--clr-grey-850));
    display: flex;
    justify-content: space-between;
    padding: 14px 16px;
}

@media (min-width: 36em) {
    :root {
        .strength-container {
            padding: 22px 31px;
        }
    }
}

.strength-container p {
    margin: auto 0;
}

.strength-bar {
    display: flex;
    gap: 16px;
    align-items: center;
}

.strength-container .strength-bar-container {
    display: flex;
    gap: 8px;
}

.strength-container .strength-bar-container div {
    width: 10px;
    height: 28px;
    border: 2px solid rgb(var(--clr-grey-200));
}

.too-weak {
    background-color: rgb(var(--clr-red-500));
}

.weak {
    background-color: rgb(var(--clr-orange-400));
}

.medium {
    background-color: rgb(var(--clr-yellow-300));
}

.strong {
    background-color: rgb(var(--clr-green-200));
}

.generate-btn {
    padding-block: 16px;
    background-color: rgb(var(--clr-green-200));
    width: 100%;
    margin-block: 16px;
}

@media (min-width: 36em) {
    :root {
        .generate-btn {
            padding-block: 20.5px;
            background-color: rgb(var(--clr-green-200));
            width: 100%;
            margin-block: 32px 41px;
        }
    }
}

.generate-btn:hover {
    background-color: rgb(var(--clr-grey-800));
    color: rgb(var(--clr-green-200));
    border: 2px solid rgb(var(--clr-green-200));
}

.generate-btn:hover path {
    fill: rgb(var(--clr-green-200));
}