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

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body,
html {
  height: 100%;
  font-family: var(--font-main);
  background-color: var(--color-background);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#toggle-theme-btn {
  position: fixed;
  top: 1.2rem;
  right: 1.5rem;
  z-index: 999;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 2rem;
  color: var(--color-text);
  transition: color 0.3s, scale 0.2s;
  max-width: 50px;
}

#toggle-theme-btn:focus {
  outline: none;
}

#toggle-theme-btn:hover {
  color: var(--color-success);
  transform: scale(1.12);
}

.container {
  display: flex;
  height: 100vh;
  flex-direction: row;
}

.left,
.right {
  flex: 1;
  min-height: 100%;
}

.error-message {
  color: var(--color-danger);
  margin-top: 1rem;
}

/* Lado esquerdo - Formulário */
.left {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
  padding: 2rem;
}

.form-box {
  width: 100%;
  max-width: 400px;
}

.form-box h1 {
  font-size: 3rem;
  margin-bottom: 0.3rem;
}

.form-box p {
  margin-bottom: 2rem;
}

.form-box h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.input-group {
  background-color: var(--color-secondary);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
}

.input-group i {
  color: var(--color-text-secondary);
  margin-right: 0.5rem;
}

.input-group input {
  background: none;
  border: none;
  outline: none;
  width: 100%;
  font-size: 1rem;
}

input::placeholder {
  color: var(--color-text-secondary);
}

button {
  width: 100%;
  padding: 0.75rem;
  background-color: var(--color-success);
  color: #312e38;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s ease;
}

button:hover {
  background-color: var(--color-sucess-hover);
}

.create-account {
  display: block;
  text-align: center;
  margin-top: 1rem;
  color: var(--color-success);
  text-decoration: none;
}

.create-account:hover {
  color: var(--color-sucess-hover);
  /* text-decoration: underline; */
}

/* Lado direito com imagem */
.right {
  background: url("../images/login.png") no-repeat center center;
  background-size: cover;
  background-color: var(--color-background);
}

.back-link {
  display: inline-block;
  margin-top: 1rem;
  color: var(--color-success);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.3s;
}

.back-link i {
  margin-right: 5px;
}

.back-link:hover {
  color: var(--color-sucess-hover);
}

/* ---------- Responsividade ---------- */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
  }

  .left,
  .right {
    width: 100%;
    height: auto;
    min-height: auto;
  }

  .right {
    height: 250px;
  }

  .form-box {
    max-width: 100%;
  }

  .form-box h1 {
    font-size: 1.5rem;
  }

  .form-box h2 {
    font-size: 1rem;
  }

  .input-group input {
    font-size: 0.9rem;
  }

  button {
    font-size: 0.95rem;
  }
}

@media (max-width: 768px) {
  .container {
    flex-direction: column;
  }

  .right {
    display: none;
  }

  .left {
    width: 100%;
    height: 100vh;
    padding: 2rem 1.5rem;
    justify-content: center;
  }

  .form-box {
    max-width: 100%;
  }

  .form-box h1 {
    font-size: 1.75rem;
    text-align: center;
  }

  .form-box p,
  .form-box h2 {
    text-align: center;
  }

  .input-group input {
    font-size: 1rem;
  }

  button {
    font-size: 1rem;
  }
}
