/*=============== GOOGLE FONTS ===============*/
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500&display=swap");
/*=============== VARIABLES CSS ===============*/
:root {
  /*========== Colors ==========*/
  /*Color mode HSL(hue, saturation, lightness)*/
  --white-color: hsl(0, 0%, 100%);
  --black-color: hsl(0, 0%, 0%);
  /*========== Font and typography ==========*/
  /*.5rem = 8px | 1rem = 16px ...*/
  --body-font: "Poppins", sans-serif;
  --h1-font-size: 1.75rem;
  --normal-font-size: 1rem;
  --small-font-size: 0.813rem;
  /*========== Font weight ==========*/
  --font-medium: 500;
}

/*=============== BASE ===============*/
* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

body,
input,
button {
  font-size: var(--normal-font-size);
  font-family: var(--body-font);
}

body {
  color: var(--white-color);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

input,
button {
  border: none;
  outline: none;
}

a {
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

/*=============== LOGIN ===============*/
.login {
  position: relative; /* Изменено с absolute на relative */
  display: grid;
  align-items: center;
  justify-content: center;
  height: 100vh; /* Занимает всю высоту экрана */
  width: 100%; /* Занимает всю ширину экрана */
}

.login__img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: -1; /* Перемещаем изображение на задний план */
}

.login__form {
  position: relative;
  background-color: hsla(0, 0%, 10%, 0.7); /* Увеличена прозрачность */
  border: 2px solid var(--white-color);
  margin-inline: 1.5rem;
  padding: 2.5rem 1.5rem;
  border-radius: 1rem;
  backdrop-filter: blur(8px);
  z-index: 1; /* Устанавливаем форму поверх фона */
}

.login__title {
  text-align: center;
  font-size: var(--h1-font-size);
  font-weight: var(--font-medium);
  margin-bottom: 2rem;
}
.login__content,
.login__box {
  display: grid;
}
.login__content {
  row-gap: 1.75rem;
  margin-bottom: 1.5rem;
}
.login__box {
  grid-template-columns: max-content 1fr;
  align-items: center;
  column-gap: 0.75rem;
  border-bottom: 2px solid var(--white-color);
}
.login__icon,
.login__eye {
  font-size: 1.25rem;
}
.login__input {
  width: 100%;
  padding-block: 0.8rem;
  background: none;
  color: var(--white-color);
  position: relative;
  z-index: 1;
}
.login__box-input {
  position: relative;
}
.login__label {
  position: absolute;
  left: 0;
  top: 13px;
  font-weight: var(--font-medium);
  transition: top 0.3s, font-size 0.3s;
}
.login__eye {
  position: absolute;
  right: 0;
  top: 18px;
  z-index: 10;
  cursor: pointer;
}
.login__box:nth-child(2) input {
  padding-right: 1.8rem;
}
.login__check,
.login__check-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.login__check {
  margin-bottom: 1.5rem;
}
.login__check-label {
  font-size: var(--small-font-size);
}
.login__check-group {
  column-gap: 0.5rem;
}
.login__check-input {
  width: 16px;
  height: 16px;
}
.login__button {
  width: 100%;
  padding: 1rem;
  border-radius: 0.5rem;
  background-color: var(--white-color);
  font-weight: var(--font-medium);
  cursor: pointer;
  margin-bottom: 2rem;
}
/* Input focus move up label */
.login__input:focus + .login__label {
  top: -12px;
  font-size: var(--small-font-size);
}

/* Input focus sticky top label */
.login__input:not(:placeholder-shown).login__input:not(:focus) + .login__label {
  top: -12px;
  font-size: var(--small-font-size);
}

.captcha-container {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  justify-content: space-between;
}

.captcha-image-group {
  display: flex;
  align-items: center;
}

@media (max-width: 768px) {
  .captcha-container {
    flex-direction: column;
    align-items: flex-start;
  }

  #captcha-img,
  #refresh-captcha {
    margin-top: 20px;
  }
}

.captcha-wrapper {
  position: relative;
  flex: 1;
}

#captcha-img {
  width: 90%;
  height: auto;
  margin-left: 0.5rem;
  border-radius: 0.5rem;
}

#captcha-input {
  padding: 0.8rem 0rem;
  background: none;
  color: var(--white-color);
  border: none;
  border-bottom: 2px solid var(--white-color);
  width: 100%;
  text-align: center;
  position: relative;
  z-index: 1;
}

.captcha__label {
  position: absolute;
  left: 0;
  top: 13px;
  font-weight: var(--font-medium);
  transition: top 0.3s, font-size 0.3s;
  color: var(--white-color);
  font-size: var(--normal-font-size);
  pointer-events: none;
}

/* Input focus move up label */
#captcha-input:focus + .captcha__label {
  top: -12px;
  font-size: var(--small-font-size);
}

/* Input focus sticky top label */
#captcha-input:not(:placeholder-shown):not(:focus) + .captcha__label {
  top: -12px;
  font-size: var(--small-font-size);
}

#refresh-captcha {
  position: relative;
  background: none;
  border: none;
  color: var(--white-color);
  cursor: pointer;
  margin-left: 5px;
}

#refresh-captcha:hover {
  transform: scale(1.4);
  opacity: 0.8;
}

.hidden {
  display: none;
}

/*=============== NOTIFICATIONS ===============*/
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
  font-family: "Poppins", sans-serif;
  font-size: 1rem;
  color: #fff;
  z-index: 2000;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  animation: fadeInOut 3s ease-in-out;
}

.notification-info {
  background-color: #2196f3; /* Синий цвет для информационных сообщений */
}

.notification-success {
  background-color: #4caf50;
}

.notification-error {
  background-color: #f44336;
}

@keyframes fadeInOut {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }
  10%,
  90% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-20px);
  }
}

/*=============== BREAKPOINTS ===============*/
/* For medium devices */
@media screen and (min-width: 576px) {
  .login {
    justify-content: center;
  }
  .login__form {
    width: 432px;
    padding: 4rem 3rem 3.5rem;
    border-radius: 1.5rem;
  }
  .login__title {
    font-size: 2rem;
  }
}
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px transparent inset !important; /* Прозрачный фон */
  -webkit-text-fill-color: #f8f7f7 !important; /* Цвет текста */
  transition: background-color 5000s ease-in-out 0s; /* Отключаем анимацию */
}
