@import url('https://fonts.googleapis.com/css?family=Poppins:400,700|Mulish:400');

:root {
  --text: #08181d;
  --white: #fff;
  --background: #e0eff4;
  --primary: #80AF81;
  --secondary: #508D4E;
  --accent: #CBEFCE;
  --border-radius: 20px;
  --grey: #adbcc3;
}
* {
  box-sizing: border-box;
}

body {
  background-image: url(/asha/img/login-bg.webp);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  max-height: 100vh;
  color: var(--white);
}

h3,
h5 {
  color: var(--white);
  margin: 0;
}
html {
  font-size: 100%;
}
h3 {
  font-family: 'Poppins';
  font-size: 2.369rem;
  font-weight: 700;
}
h5 {
  font-size: 1.333rem;
  font-family: 'Mulish';
}
form {
  display: flex;
  flex-direction: column;
}
label {
  position: relative;
  font-family: 'Mulish';
}
label.succes::after,
label.error::after,
label.empty::after {
  position: absolute;
  right: 0;
  width: 100%;
  text-align: right;
}
label.succes::after {
  content: 'Password is correct!';
  color: var(--accent);
}
label.error::after {
  content: 'Password is incorrect';
  color: #a93331;
}
label.empty::after {
  content: 'Password empty';
  color: yellow;
}
label.error + #psw {
  border: 2px solid #a93331;
}
.container {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 50px;
}
.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 500px;
  height: max-content;
  padding: 30px;
  border-radius: 20px;
  border: 0.5px solid rgba(128, 175, 129);
  box-shadow: 0px 2.8px 2.2px rgba(0, 0, 0, 0.02),
    0px 6.7px 5.3px rgba(0, 0, 0, 0.028), 0px 12.5px 10px rgba(0, 0, 0, 0.035),
    0px 22.3px 17.9px rgba(0, 0, 0, 0.042),
    0px 41.8px 33.4px rgba(0, 0, 0, 0.05), 0px 100px 80px rgba(0, 0, 0, 0.07);
  background-color: rgba(80, 141, 78);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.card:has(.error) {
  animation-duration: 0.2s;
  animation-name: horizontal-shaking;
  animation-iteration-count: 2;
}
.titles {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
}
.fields {
  width: 100%;
}
input,
textarea {
  width: 100%;
  padding: 12px 20px;
  margin: 8px 0 12px 0;
  box-sizing: border-box;
  border-style: solid;
  border-color: #e5e7eb;
  border-width: 1.5px;
  border-radius: 10px;
  font-size: 1rem;
}
input::placeholder {
  color: var(--grey);
}
input:disabled,
textarea:disabled {
  color: var(--white);
}
input:focus {
  outline: none;
}

.button {
  align-self: center;
  padding: 14px 32px;
  margin-top: 30px;
  border-radius: 10px;
  border: 1px solid rgba(203, 239, 206);
  font-size: 16px;
  background-color: var(--primary);
  color: #08181d;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}
.button:hover {
  background-color: var(--primary);
  color: var(--secondary);
}

/* Animation */
@keyframes horizontal-shaking {
  0% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(5px);
  }
  50% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
  100% {
    transform: translateX(0);
  }
}

/* Media queries */
@media (max-width: 500px) {
  .container {
    padding: 10px;
  }
  .titles {
    gap: 10px;
  }
  .titles h3 {
    text-align: center;
    line-height: 1;
  }
}
