/* Fonts */

@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");


/* Color Palette */
:root {
  --background: #4361ee;
  --font: #ffffff;
  --container: #3a0ca3;
  --button: #b5179e;
  --alternate: #f72585;
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: var(--background);
  margin: 0;
  color: var(--font);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.pw-container {
  background-color: var(--container);
  width: 400px;
  border-radius: 15px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.pw-header {
  padding: 0rem 1rem 1rem 1rem;
}
.pw-title {
  text-align: center;
  font-weight: 500;
  font-size: 1.65rem;
}

.pw {
  background-color: var(--background);
  border-radius: 10px;
  font-size: 1.5rem;
  font-weight: 100;
  display: flex;
  align-items: center;
  height: 70px;
  width: 100%;
  position: relative;
  padding: 1rem;
  overflow:hidden;
}

.pw button {
  background-color: var(--button);
  border: none;
  border-radius: 10px;
  color: var(--font);
  cursor: pointer;
  position: absolute;
  padding: 0.25rem 0.5rem;
  font-family: inherit;
  font-size: 1.25rem;
  transition: opacity 0.6s ease, background-color 0.6s ease, box-shadow 0.2s ease;
  opacity: 0;
  top: 0;
  right: 0;
}
.pw:hover button {
  opacity: 1;
}
.pw button:hover {
  background-color: var(--alternate);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.pw-body {
  padding: 0.5rem 1rem;
  margin: 1rem 1rem;
  padding-top: 0;
}

.form-control {
  display: flex;
  justify-content: space-between;
  margin: 0.5rem 0;
  margin: 0.75rem 0rem;
}
.slider{
    justify-content: end;
}
#length{
    margin-left: auto;
}

/* Generate New Password Button */
.generate {
  display: block;
  background-color: var(--button);
  color: var(--font);
  padding: 0.75rem;
  font-size: 1.35rem;
  border: none;
  border-radius: 10px;
  width: 90%;
  margin: 1.5rem 1rem 0rem 1rem;
  transition: background-color 0.6s ease, box-shadow 0.6s ease;
  opacity: 1;
  box-shadow: none;
}
.generate:hover {
  background-color: var(--alternate);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.8);
}


/* Toggle Switch */
.switch{
    position: relative;
    display: inline-block;
    background-color: var(--background);
    border-radius: 20px;
    width: 40px;
    height: 20px;
}
.switch::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: var(--font);
    top: 1px; 
    left: 1px;
    transition: all 0.3s;
}
.checkbox:checked + .switch::after {
    left : 20px; 
}
.checkbox:checked + .switch {
    background-color: var(--alternate);
}
.checkbox { 
    display : none;
}