@import url('./variables.css');

body {
  background-color: var(--BG);
  color: var(--Add4);
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.login-container {
  width: 298px;              /* ширина */
  height: 263px;              /* высота */
  border-radius: 4px;         /* скругление углов */
  border: 1px solid var(--Add2);  /* рамка */
  background-color: var(--Add1);
  display: flex;
  flex-direction: column;
}

.text-login-container {
  width: 250px;              /* ширина */
  height: 27px;              /* высота */
  margin: 24px 24px 0 24px;
  text-align: center;
  font-weight: bold;
  font-size: 20px;
  color: var(--Add4);
}

.login-form {
  width: 240px;              /* ширина */
  height: 148px;              /* высота */
  margin: 40px 29px 0 29px;
  text-align: center;
  position: relative;
  gap: 24px;
}

.input-wrapper-container {
  width: 100%;             /* ширина */
  height: 80px;              /* высота */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;

}

.input-wrapper {
  width: 100%;              /* ширина */
  height: 36px;              /* высота */
  display: flex;
  align-items: center;
  border-radius: 4px;        /* скругление углов */
  background: var(--BG);
}

.input-wrapper .icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  object-fit: contain; /* сохраняет пропорции */
  margin: 6px 12px;
}

.input-wrapper input {
  width: 100%;             /* ширина */
  height: 24px;
  display: flex;
  padding: 0;
  margin: 0;
  border: none;
  align-items: center;
  background: var(--BG);
  color: var(--Add4);
  font-size: 13px;
}

button[type="submit"] {
  width: 100%;
  height: 44px;
  margin-top: 24px;
  background-color: var(--BG); /* Неактивная */
  border: none;
  color: var(--Add6);
  border-radius: 4px;
  font-size: 14px;
  font-weight: bold;
  cursor: not-allowed;
  padding: 0;
}

button[type="submit"]:not(.disabled) {
  background-color: var(--Add5); /* Активная */
  color: var(--Add3);
  cursor: pointer;
}

.error {
  width: 278px;
  height: 32px;
  position: fixed; /* фиксируем относительно экрана */
  top: 5%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: var(--Add8);
  color: var(--Add7);
  border: 1px solid var(--Add7);
  font-size: 13px;
  font-weight: 600;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 40px;
   z-index: 1000;
}

.error .close-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: white;
  margin: 4px 12px 4px 0;
  padding: 0;
  display: flex;
}

.error .close-icon {
  flex-shrink: 0;
  object-fit: contain;
}

@media screen and (max-width: 1024px) {
  .login-container {
    width: 90%;
    max-width: 320px;
  }
}

@media screen and (max-width: 768px) {
  .login-container {
    width: 95%;
    max-width: 300px;
  }
}

@media screen and (max-width: 428px) {
  .login-container {
    width: 98%;
    max-width: 280px;
  }

  .error {
    font-size: 12px;
    padding: 6px 10px;
  }
}
