/* Auth pages (login, signup, callback) */

.auth-page {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.auth-container {
  background: var(--surface);
  border: 1px solid var(--surface-hover);
  border-radius: 12px;
  padding: 2.5rem;
  width: 100%;
  max-width: 400px;
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-header h1 {
  font-family: "Crimson Pro", serif;
  color: var(--ivory);
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.auth-header p {
  color: var(--brand-accent-1);
  font-size: 0.95rem;
}

/* OAuth buttons */
.oauth-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.btn-oauth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--ink);
  border: 1px solid var(--ink-border);
  border-radius: 0.5rem;
  color: var(--ivory);
  font-size: 0.95rem;
  font-weight: 500;
  font-family: "Sora", sans-serif;
  cursor: pointer;
  transition:
    background 0.2s,
    border-color 0.2s;
}

.btn-oauth:hover {
  background: var(--surface-hover);
  border-color: var(--teal-dark);
}

.btn-oauth:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  margin: 1.5rem 0;
  color: var(--ivory-muted);
  font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--surface-hover);
}

.auth-divider span {
  padding: 0 1rem;
}

/* Form */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  color: var(--brand-accent-1);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.form-group input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--ink);
  border: 1px solid var(--ink-border);
  border-radius: 0.5rem;
  color: var(--ivory);
  font-size: 1rem;
  font-family: "Sora", sans-serif;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.form-group input:focus {
  outline: none;
  border-color: var(--teal-dark);
}

.form-group input::placeholder {
  color: var(--ivory-muted);
}

/* Submit button */
.btn-submit {
  width: 100%;
  padding: 0.75rem;
  background: var(--teal-dark);
  color: var(--ivory);
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: "Sora", sans-serif;
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.2s;
}

.btn-submit:hover {
  background: var(--teal);
  transform: translateY(-1px);
}

.btn-submit:disabled {
  background: var(--ink-border);
  cursor: not-allowed;
  transform: none;
}

.btn-submit.loading .btn-text {
  display: none;
}

.btn-submit.loading .loading-spinner {
  display: inline-block;
}

.loading-spinner {
  display: none;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--ivory);
  border-top-color: transparent;
  border-radius: 50%;
  animation: auth-spin 0.8s linear infinite;
}

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

/* Messages */
.auth-error,
.auth-success {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  display: none;
}

.auth-error.visible,
.auth-success.visible {
  display: block;
}

.auth-error {
  background: rgba(224, 85, 85, 0.1);
  border: 1px solid var(--coral);
  color: var(--coral);
}

.auth-success {
  background: rgba(74, 157, 124, 0.1);
  border: 1px solid var(--emerald);
  color: var(--emerald);
}

/* Footer link */
.auth-link {
  text-align: center;
  margin-top: 1.25rem;
  color: var(--brand-accent-1);
  font-size: 0.9rem;
}

.auth-link a {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.2s;
}

.auth-link a:hover {
  color: var(--gold);
  text-decoration: underline;
}

/* Auth callback page */
.auth-container--centered {
  text-align: center;
}

.auth-callback-title {
  font-family: "Crimson Pro", serif;
  color: var(--ivory);
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.auth-callback-message {
  color: var(--brand-accent-1);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.auth-callback-link {
  color: var(--gold);
  margin-top: 1rem;
  display: inline-block;
  text-decoration: none;
}

.auth-callback-link:hover {
  text-decoration: underline;
}

/* Spinner for callback page */
.spinner {
  width: 3rem;
  height: 3rem;
  border: 3px solid var(--surface-hover);
  border-top-color: var(--teal-dark);
  border-radius: 50%;
  animation: auth-spin 0.8s linear infinite;
  margin: 0 auto 1.5rem;
}
