/********************************************************
 * Styling for a Password Generator
 * 
 * @author (Anyanwu Benedict Chuwkwuemeka)
 * @version 0.01
 ********************************************************/

@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');

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: var(--bcg-handle) var(--bcg-trpnt);
}

html:root
{
    --bcg-base: #1d69d3;
    --bcg-bright: #ffffff;
    --bcg-btn: #0468f3;
    --bcg-dark: #000000;
    --bcg-handle: #a0c7ff;
    --bcg-shade: #000000c3;
    --bcg-trpnt: #00000000;
    --bcg-white: #eaf3ff;
    --bcg-grey: #777777;
    --font-clr: #dfeafb;
    --font-shadow: #1d5ea3aa;
    --warn-clr: #ab0a0a;
    --transition-flow: 250ms;
    --transition-delay: 100ms;
    --item_max_w: 40rem;
    --item_pd_hntl: 1rem;
    --item_bdr_rad: 0.625rem;
    --rng_w: 4rem;
    --rng_h: 2rem;
    --rng_pd: 0.25rem;
}

html
{
    background-color: var(--bcg-base);
    scroll-behavior: smooth;
}

body
{
    font-family: 'Poppins', sans-serif;
    min-height: 100svh;
    min-height: 100vh;
}

@supports(-webkit-tap-highlight-color: var(--bcg-trpnt))
{
    body
    {
        -webkit-tap-highlight-color: var(--bcg-trpnt);
    }
}

a, ul, button, input
{
    font-family: 'Poppins', sans-serif;
    background-color: var(--bcg-trpnt);
    outline: none;
    border: none;
    text-decoration: none;
    list-style: none;
}

button, label, a
{
    cursor: pointer;
}

button:active, 
label:active
{
    scale: 0.975;
}

::-moz-selection, 
::selection
{
    background: var(--bcg-btn);
    color: var(--bcg-bright);
}



.wrapper
{
    width: 100%;
    padding: 2rem 1rem;
}

.wrapper .base
{
    width: 100%;
    max-width: var(--item_max_w);
    margin: 0 auto;
    padding: 1.25rem;
    border-radius: var(--item_bdr_rad);
    background-color: var(--bcg-white);
    box-shadow: inset 0 0 1.25rem 0.25rem var(--bcg-shade);
}

.base .greeting
{
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: var(--bcg-dark);
    text-shadow: 0 0.125rem 0.75rem var(--bcg-shade);
}

.greeting .mjr
{
    font-size: 1.875rem;
}

.greeting .mnr
{
    font-size: 1rem;
}

.base .customize
{
    width: 100%;
    margin: 1.25rem 0;
}

.customize .list
{
    width: 100%;
    display: flex;
    flex-direction: column;
}

.list .items
{
    width: 100%;
}

.items:not(:last-child)
{
    margin-bottom: 1rem;
}

.items .rng_bdr
{
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.rng_bdr .rng_val
{
    color: var(--bcg-dark);
    font-size: 1rem;
    margin-right: 0.625rem;
    text-shadow: 0 0.125rem 0.5rem var(--bcg-shade);
}

.items .tgl_base
{
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.tgl_base .tgl_lbl
{
    width: calc((100% - var(--rng_w)));
    margin-right: 0.625rem;
    color: var(--bcg-dark);
    font-size: 1rem;
    text-shadow: 0 0.125rem 0.5rem var(--bcg-shade);
}

.tgl_base .tgl_bdr
{
    --rng_btn_w: calc((var(--rng_h) - (var(--rng_pd) * 2)));
    position: relative;
    width: var(--rng_w);
    height: var(--rng_h);
    padding: var(--rng_pd);
    border-radius: var(--rng_h);
    box-shadow: inset 0 0 0.3125rem 0.125rem var(--bcg-grey);
    background-color: var(--bcg-white);
    transition: all var(--transition-flow) ease-in-out;
}

.tgl_bdr .tgl_box
{
    width: var(--rng_btn_w);
    height: var(--rng_btn_w);
    border-radius: 50%;
    background-color: var(--bcg-btn);
    transition: all var(--transition-flow) ease-in-out;
}

.tgl_bdr .tgl_inp
{
    position: fixed;
    top: -1000%;
    left: -1000%;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.tgl_bdr:has(.tgl_inp:checked)
{
    box-shadow: 0 0 0.3125rem 0.125rem var(--bcg-grey);
    background-color: var(--bcg-btn);
}

.tgl_bdr:has(.tgl_inp:checked) .tgl_box
{
    background-color: var(--bcg-white);
    translate: calc((var(--rng_w) - var(--rng_btn_w)) - (var(--rng_pd) * 2)) 0;
}

.create
{
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--bcg-white);
    border-radius: var(--item_bdr_rad);
    box-shadow: 0 0 0.3125rem 0.125rem var(--bcg-grey);
    background-color: var(--bcg-btn);
    transition: all var(--transition-flow) ease-in-out;
}
