@use '../variables' as *;
@use '../mixins' as *;

.auth-page {
  min-height: calc(100vh - 180px);
  display: grid;
  place-items: center;
  padding: 120px 20px 40px;
}

.auth-card {
  width: 100%;
  max-width: 460px;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  background: var(--bg-secondary);
  padding: 22px;
  display: grid;
  gap: 14px;

  h1 {
    margin: 0;
    font-size: 1.5rem;
  }

  > p {
    margin: 0;
    color: var(--text-secondary);
  }
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;

  button {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 9px 10px;
    background: var(--bg-primary);
    color: var(--text-primary);
    cursor: pointer;
  }

  .is-active {
    border-color: $primary-color;
    color: $primary-color;
  }
}

.auth-form {
  display: grid;
  gap: 10px;

  label {
    font-size: 0.9rem;
  }

  input {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px 12px;
    background: var(--bg-primary);
    color: var(--text-primary);
  }

  button {
    margin-top: 4px;
    border: none;
    border-radius: 10px;
    padding: 10px 12px;
    background: linear-gradient(135deg, #0d3c9f, #2457c9);
    color: #ffffff;
    cursor: pointer;
    font-weight: 600;
  }
}

.auth-rules {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: grid;
  gap: 4px;
  font-size: 0.86rem;
  color: var(--text-secondary);

  li {
    &.ok {
      color: #0f9f61;
    }
  }
}

.google-auth {
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--bg-primary);
  color: var(--text-primary);
  cursor: pointer;

  &--provider {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
  }
}

.google-auth__icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
}

.auth-message {
  margin: 0;
  font-size: 0.9rem;

  &--error {
    color: #dc2626;
  }

  &--success {
    color: #0f9f61;
  }
}

.auth-back-link {
  color: var(--text-secondary);
  text-decoration: underline;
  width: fit-content;
}
