/* ------------------- */
/* Custom Properties   */
/* ------------------- */
:root {
    --clr-body-bg: #1C1C1C;
    --clr-container-bg: #1F2937;
    --clr-password-bg: #273549;
    --clr-white: #ffffff;
    --clr-accent: #fffb00;

    --ff-body: 'Noto Sans';
}

/* ------------------- */
/* CSS Reset           */
/* ------------------- */

/* Box sizing rules */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Prevent font size inflation */
html {
    -moz-text-size-adjust: none;
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
}

/* Remove default margin in favour of better control in authored CSS */
body, h1, h2, h3, h4, p,
figure, blockquote, dl, dd {
    margin: 0;
}

/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
ul[role='list'],
ol[role='list'] {
    list-style: none;
}

/* Set core body defaults */
body {
    min-height: 100vh;
    line-height: 1.5;
}

/* Set shorter line heights on headings and interactive elements */
h1, h2, h3, h4,
button, input, label {
    line-height: 1.1;
}

/* Balance text wrapping on headings */
h1, h2,
h3, h4 {
    text-wrap: balance;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
    text-decoration-skip-ink: auto;
    color: currentColor;
}

/* Make images easier to work with */
img,
picture {
    max-width: 100%;
    display: block;
}

/* Inherit fonts for inputs and buttons */
input, button,
textarea, select {
    font: inherit;
}

/* Make sure textareas without a rows attribute are not tiny */
textarea:not([rows]) {
    min-height: 10em;
}

/* Anything that has been anchored to should have extra scroll margin */
:target {
    scroll-margin-block: 5ex;
}

/* ------------------- */
/* STYLING BEGINS      */
/* ------------------- */

/* General styles */
body {
    font-family: var(--ff-body), Verdana, Geneva, Tahoma, sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: var(--clr-body-bg);
    color: var(--clr-white);
}

/* Main container */
main {
    max-width: 90%;
    background-color: var(--clr-container-bg);
    padding: 3rem 1.5rem;
}

h1 {
    margin-bottom: 1rem;
}

.title__style {
    color: var(--clr-accent);
}

/* Settings section */
.setting {
    background-color: var(--clr-password-bg);
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 1.25rem 0;
}

.password-btn {
    background-color: var(--clr-accent);
    color: var(--clr-body-bg);
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.4em;
}

.password-btn:hover {
    cursor: pointer;
}

.password-btn:focus {
    outline: 0.2em solid var(--clr-accent);
    outline-offset: 0.2em;
}

hr {
    border: 0.1rem solid var(--clr-password-bg);
    margin: 2rem 0;
}

/* Passwords section */
.passwords {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5em;
    width: 100%;
}

.password-wrapper {
    min-width: 14rem;
    background-color: var(--clr-password-bg);
    padding: 0.7rem;
    border-radius: 0.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.password {
    color: var(--clr-accent);
    word-break: break-word;
}

.clipboard {
    margin-left: auto;
    background-color: var(--clr-accent);
    color: var(--clr-body-bg);
    border: none;
    padding: 0.2rem 0.5rem;
    border-radius: 0.3rem;
}

.clipboard:hover {
    cursor: pointer;
}

.clipboard:focus {
    outline: 0.15em solid var(--clr-accent);
    outline-offset: 0.15em;
}

/* Attribution */
.attribution {
    font-size: 0.6875rem; /* 11px */
    text-align: center;
    padding-top: 0.5rem;
}

.attribution a {
    color: var(--clr-accent);
}

/* Screen sizes larger than mobile */
@media only screen and (min-width: 30rem) {}

/* Tablet screen size */
@media only screen and (min-width: 43.75rem) {
    main {
        padding: 4rem 2.5rem;
    }

    h1 {
        font-size: 2.3rem;
    }
}

/* Desktop screen size */
@media only screen and (min-width: 60rem) {
    main {
        min-width: 45rem;
        max-width: 55rem;
    }

    .password-wrapper {
        min-width: 20rem;
    }

    h1 {
        font-size: 2.7rem;
    }
}