/*
  Template Name: Random Password Generator
  Author: Micropixels Studio
  Description: Random Password Generator
  File Description: Main CSS file of the template
  */

@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');


:root {
    --common-black: #18171f;
    --common-yellow: #a1a1a1;
    --common-blue: #319506;
}

[data-theme="light"] {
    --both-bg: #e1e1e1;
    --both-blue-mix: #333333;
    --both-white-black-one: #a1a1a1;
    --both-white-black-two: #fefeff;
}

[data-theme="dark"] {
    --both-bg: #000000;
    --both-blue-mix: #555555;
    --both-white-black-one: #e6e5ea;
    --both-white-black-two: #18171f;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow: scroll;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    font-family: "Poppins", serif;
    background: var(--both-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.container {
    margin: auto;
    width: 800px;
    padding: 30px 0 50px;
}

@media (max-width: 840px) {
    .container {
        width: 600px;
    }
}

@media (max-width: 640px) {
    .container {
        width: 420px;
    }
}

@media (max-width: 440px) {
    .container {
        width: 320px;
    }
}

h1 {
    font-size: 30px;
    font-weight: 600;
    text-align: center;
    color: var(--both-white-black-one);
    margin-bottom: 0;
}

h2 {
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    color: var(--both-white-black-one);
    margin-bottom: 0;
}

p {
    font-size: 18px;
    color: var(--both-white-black-one);
}

span {
    font-size: 16px;
}

/* ====================================== */
/* THEME TOGGLE BUTTON */
/* ====================================== */
.change_theme_color {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    top: 22px;
    z-index: 2;
}

.header_themeToggle.header_themeToggle_light {
    background-image: url(../img/light.svg);
}

.header_themeToggle {
    padding: 8px;
    border: 2px solid #817d92;
    background-image: url(../img/dark.svg);
    background-repeat: no-repeat;
    background-position: center;
    height: 44px;
    width: 44px;
    border-radius: 100%;
    background-color: rgba(45, 45, 45, 0.05);
    cursor: pointer;
    display: inline;
    position: relative;
}

/* ====================================== */
/* PASSWORD FIELD */
/* ====================================== */
.password_field {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 40px;
    margin-bottom: 30px;
    background: var(--both-blue-mix);
}

.password_display {
    word-break: break-all;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    height: 140px;
    padding: 30px 40px;
    color: var(--both-white-black-one);
    background: var(--both-white-black-two);
}

@media (max-width: 840px) {
    .password_display {
        width: 100%;
        height: 160px;
        padding: 30px 30px;
    }
}

@media (max-width: 640px) {
    .password_display {
        width: 100%;
        height: 200px;
        padding: 30px 20px;
    }
}

@media (max-width: 440px) {
    .password_display {
        width: 100%;
        height: 280px;
        padding: 30px 20px;
    }
}

.password_placeholder {
    font-size: 20px;
    color: var(--both-white-black-one);
}

.copy_wrapper {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
}

.copy_btn {
    outline: none;
    border: none;
    cursor: pointer;
    background: none;
}

.copy_btn:hover img {
    filter: contrast(1.2);
}

/* ====================================== */
/* STRENGTH BOX BARS */
/* ====================================== */
.password_setting {
    padding: 40px 40px;
    background: var(--both-blue-mix);
}

.strength_box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-transform: uppercase;
    padding: 20px 40px;
    margin-bottom: 30px;
    background: var(--both-white-black-two);
}

@media (max-width: 640px) {
    .strength_box {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-transform: uppercase;
        padding: 20px 40px;
        margin-bottom: 30px;
        background: var(--both-white-black-two);
    }
}

.strength_label {
    font-size: 22px;
    font-weight: 500;
    color: var(--both-white-black-one);
}

@media (max-width: 440px) {
    .strength_label {
        font-size: 18px;
    }
}

.strength_rating {
    display: flex;
    align-items: center;
    gap: 22px;
}

@media (max-width: 640px) {
    .strength_rating {
        gap: 0;
    }
}

.strength_rating_text {
    font-size: 22px;
    font-weight: 500;
    color: var(--both-white-black-one);
}

@media (max-width: 440px) {
    .strength_rating_text {
        font-size: 18px !important;
    }
}

.strength_rating_bars {
    display: flex;
    gap: 12px;
}

@media (max-width: 640px) {
    .strength_rating_bars {
        margin: 10px;
    }
}

.bar {
    width: 16px;
    height: 32px;
    border: 2px solid var(--both-white-black-one);
    background: none;
}

@media (max-width: 440px) {
    .bar {
        width: 14px;
        height: 28px;
    }
}

/* ====================================== */
/* CHARACTER RANGE GROUP */
/* ====================================== */
.char_length {
    display: flex;
    align-self: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.char_count {
    font-size: 24px;
    font-weight: 600;
    color: var(--common-yellow);
}

input[type="range"].char_length_slider {
    -webkit-appearance: none;
    appearance: none;
    margin-right: 15px;
    width: 100%;
    height: 6px;
    margin-bottom: 36px;
    background-color: var(--both-white-black-two);
    background-image: linear-gradient(var(--common-yellow), var(--common-yellow));
    background-size: 50%, 100%;
    background-repeat: no-repeat;
}

.char_length_slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    height: 28px;
    width: 28px;
    border: 2px solid var(--common-yellow);
    border-radius: 50%;
    background: var(--common-yellow);
    cursor: pointer;
}

.char_length_slider::-webkit-slider-thumb:hover {
    border: 2px solid var(--common-yellow);
    background: #fdcd4b;
}

.char_length_slider::-webkit-slider-runnable-track {
    -webkit-appearance: none;
    appearance: none;
    box-shadow: none;
    background: transparent;
}

/* ====================================== */
/* CHARACTER INCLUDE GROUP */
/* ====================================== */
.char_include_group {
    display: flex;
    flex-wrap: wrap;
    margin-top: 10px;
}

label {
    position: relative;
    display: block;
    padding-left: 50px;
    margin-bottom: 20px;
    margin-right: 40px;
    cursor: pointer;
}

input[type="checkbox"] {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
}

.custom_checkbox {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    top: 2px;
    left: 0;
    height: 26px;
    width: 26px;
    border: 2px solid var(--both-white-black-one);
}

.custom_checkbox::after {
    position: absolute;
    display: none;
    content: url("../img/check.svg");
}

.custom_checkbox:hover {
    border-color: var(--common-yellow);
}

input[type="checkbox"]:checked~.custom_checkbox {
    border-color: var(--common-yellow);
    background: var(--common-yellow);
}

input[type="checkbox"]:checked~.custom_checkbox::after {
    display: block;
    background: var(--common-yellow);
}

input[type="checkbox"]:focus~.custom_checkbox::after {
    outline: none;
}

.include_text {
    font-size: 18px;
    color: var(--both-white-black-one);
}

/* ====================================== */
/* GENERATE BUTTON */
/* ====================================== */
.generate_btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    width: 100%;
    padding: 20px;
    border: 2px solid var(--common-yellow);
    background: var(--common-yellow);
    cursor: pointer;
    margin-top: 36px;
    transition: all 0.3s ease-in-out;
    -webkit-transition: all 0.3s ease-in-out;
}

.generate_btn:hover {
    background: #319506;
    border: 2px solid #319506;
}

.generate_btn span {
    font-size: 22px;
    font-weight: 500;
    text-transform: uppercase;
    color: var(--common-black);
    letter-spacing: 1px;
    transition: all 0.3s ease-in-out;
    -webkit-transition: all 0.3s ease-in-out;
}

.generate_btn:hover span {
    letter-spacing: 2px;
}

/* ====================================== */
/* Password History */
/* ====================================== */
.password_history_wrapper {
    margin-top: 30px;
    padding: 40px 40px;
    background: var(--both-blue-mix);
}

@media (max-width: 440px) {
    .password_history_wrapper {
        padding: 40px 20px;
    }
}

.password_history ul {
    list-style: none;
}

.password_history ul li {
    word-break: break-all;
    text-align: center;
    margin-top: 30px;
    margin-bottom: 30px;
    padding: 20px 40px;
    color: var(--both-white-black-one);
    background: var(--both-white-black-two);
}

.password_history .history_strength {
    background: var(--common-blue);
    padding: 4px 20px;
}

.password_history .copy_history_btn {
    padding: 4px 20px;
    background: var(--common-yellow);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    -webkit-transition: all 0.3s ease-in-out;
}

.password_history .copy_history_btn:hover {
    background: #319506;
    border: 2px solid transparent;
}

.history_clear_btn {
    font-size: 20px;
    font-weight: 500;
    text-transform: uppercase;
    color: var(--common-black);
    width: 100%;
    padding: 20px;
    border: 2px solid var(--common-yellow);
    background: var(--common-yellow);
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    -webkit-transition: all 0.3s ease-in-out;
}

.history_clear_btn:hover {
    background: #319506;
    border: 2px solid #319506;
    letter-spacing: 1px;
}