@import url(variaveis.css);

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

body {
  min-height: 100vh;
  overflow-x: hidden;
  font-family: "Montserrat", sans-serif;
}

h1, h2 {
  font-family: "Syne", sans-serif;
}

a {
  color: var(--brand-light);
  font-weight: 600;
  text-decoration: none;

  &:hover { text-decoration: underline; }
}

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

/* ── Seção esquerda ────────────────────────── */
.left-section {
  flex: 1;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: radial-gradient(circle, var(--brand-blue-light) 15%, var(--brand-blue-dark) 100%);
}

.content-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 900px;

  & h1 {
    font-size: 2.5rem;
    color: white;
    line-height: 1.1;
    margin-bottom: 1.5rem;

    & span:nth-child(1) { color: var(--brand-pink); }
    & span:nth-child(2) { color: var(--brand-yellow); }
  }

  & img { width: 90%; }
}

.subtitle {
  font-size: 1.25rem;
  line-height: 1.25;
  margin-bottom: 2rem;
  color: white;
}

/* ── Seção direita ─────────────────────────── */
.right-section {
  flex: 1;
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: black;
}

.form-container {
  width: 100%;
  max-width: 480px;
}

.center {
  text-align: center;

  & h2 {
    color: var(--brand-pink);
    font-size: 2rem;
    margin-bottom: 0.5rem;
  }
}

/* ── Ícones ────────────────────────────────── */
.lock-icon,
.success-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;

  & svg {
    width: 38px;
    height: 38px;
  }
}

.lock-icon {
  background: rgba(255, 34, 150, 0.12);
  border: 2px solid rgba(255, 34, 150, 0.3);

  & svg { color: var(--brand-pink); }
}

.success-icon {
  background: rgba(16, 185, 129, 0.12);
  border: 2px solid rgba(16, 185, 129, 0.35);
  animation: pulse-green 2.5s ease-in-out infinite;

  & svg { color: #10B981; }
}

@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.3); }
  50%       { box-shadow: 0 0 0 12px rgba(16, 185, 129, 0); }
}

.form-subtitle {
  font-size: 1rem;
  color: var(--text-body);
  margin-bottom: 2rem;
}

/* ── Formulário ────────────────────────────── */
.recovery-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

label {
  font-size: 0.875rem;
  color: var(--text-body);
  display: block;
  margin-bottom: 0.25rem;
}

input[type="email"] {
  appearance: none;
  width: 100%;
  border: 1px solid var(--input-stroke);
  border-radius: 0.5rem;
  background-color: var(--input-base);
  padding: 0.812rem 1rem;
  font-size: 0.95rem;
  color: var(--text-heading);

  &::placeholder { color: var(--input-placeholder); }

  &:focus {
    outline: 2px solid var(--brand-pink);
    outline-offset: 0.1px;
  }
}

/* ── Erros ─────────────────────────────────── */
.error-message {
  color: var(--danger);
  font-size: 0.75rem;
  margin-top: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;

  &::before {
    content: url("../../assets/icons/circle-alert.svg");
    display: inline-block;
    width: 16px;
    height: 16px;
    vertical-align: middle;
  }
}

input.erro {
  outline: 2px solid var(--danger);
}

/* ── Botão principal ───────────────────────── */
.submit-btn {
  border: none;
  padding: 1.2rem 2rem;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  width: 100%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  background-color: var(--brand-pink);
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;

  &:hover {
    background-color: #e01e86;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 34, 150, 0.4);
  }

  &:active { transform: translateY(0); }

  &:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
  }
}

/* ── Spinner de carregamento ───────────────── */
.loading-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Link de voltar ────────────────────────── */
.back-link {
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-body);
  margin-top: 0.5rem;

  & a { color: var(--brand-pink); }
}

.center-link {
  margin-top: 1.25rem;
}

/* ── Tela de sucesso ───────────────────────── */
#step-success {
  animation: fadeInUp 0.5s ease-out;
}

.success-message-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  margin: 1.75rem 0 1.5rem;

  & p {
    color: var(--text-body);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;

    &:last-child { margin-bottom: 0; }
  }
}

.email-highlight {
  display: block;
  color: var(--brand-light);
  font-size: 1rem;
  margin: 0.4rem 0 1rem;
  word-break: break-all;
}

.tip-text {
  color: var(--input-placeholder) !important;
  font-size: 0.8rem !important;
  font-style: italic;
}

/* ── Botão de reenvio ──────────────────────── */
.resend-btn {
  background-color: transparent;
  border: 2px solid var(--brand-pink);
  color: var(--brand-pink);
  margin-bottom: 0.75rem;

  &:hover {
    background-color: var(--brand-pink);
    color: white;
  }

  &:disabled {
    border-color: var(--input-stroke);
    color: var(--input-placeholder);
    background: transparent;
  }
}

.timer-text {
  text-align: center;
  font-size: 0.8rem;
  color: var(--input-placeholder);
  margin-bottom: 0.25rem;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsividade ────────────────────────── */
@media (max-width: 1024px) {
  .content-wrapper h1 { font-size: 2.5rem; }
}

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

  .left-section {
    min-height: 45vh;
    padding: 1.5rem;
    text-align: center;
  }

  .content-wrapper {
    max-width: none;

    & h1 {
      font-size: 2rem;
      margin-bottom: 1rem;
    }
  }

  .subtitle {
    font-size: 1rem;
    margin-bottom: 1rem;
  }

  .right-section { padding: 1.5rem; }
}

@media (max-width: 480px) {
  .left-section { padding: 1rem; }
  .right-section { padding: 1rem; }

  .content-wrapper h1 { font-size: 1.75rem; }

  .submit-btn { padding: 1rem 1.5rem; }
}