/**
 * Login page (login.html) styles.
 *
 * Design system: uses the shared tokens from /css/tokens.css, matching
 * the redesign pass done across the rest of the site.
 */

/* ==========================================================================
   Container & card
   ========================================================================== */
.login-container {
  flex: 1; /* takes all remaining space above footer */
  display: flex;
  justify-content: center;
  align-items: center; /* center the login card */
  background: linear-gradient(135deg, var(--light), var(--surface));
  padding: var(--space-9);
  box-sizing: border-box;
}

.footer {
  background-color: var(--dark);
  color: #fff;
  padding: var(--space-6) 0;
}

.login-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  max-width: 400px;
  width: 100%;
  box-shadow: var(--shadow-lg);
}

.login-card h1 {
  text-align: center;
  color: var(--dark);
  font-weight: var(--font-weight-bold);
}

/* ==========================================================================
   Form: input groups & error messages
   ========================================================================== */
.input-group {
  position: relative;
  margin-bottom: var(--space-4);
}

.input-group input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  font-size: var(--font-size-base);
  border-radius: var(--radius-sm);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.input-group input:focus {
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
  outline: none;
}

.error-message {
  color: var(--danger);
  font-size: var(--font-size-sm);
  margin-top: 4px;
  display: block;
  min-height: 18px;
  opacity: 0;
  transition: opacity 0.3s;
}

.error-message.active {
  opacity: 1;
}

.form-message {
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--danger);
  min-height: 1.2em; /* prevents layout shift */
}

.form-message.success {
  color: var(--success);
}

/* ==========================================================================
   Login / register link
   ========================================================================== */
.login-link {
  text-align: center;
  margin-top: var(--space-4);
  font-size: var(--font-size-sm);
}

.login-link a {
  color: var(--primary);
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
}

.login-link a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Google sign-in button + OR separator
   ========================================================================== */
.btn-google {
  background-color: var(--surface);
  color: #000;
  border: 2px solid #000;
  border-radius: var(--radius-full);
  padding: var(--space-3) var(--space-4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-base);
  width: 100%;
  margin-bottom: var(--space-5);
  transition:
    background-color 0.2s,
    transform 0.1s;
}

.btn-google:hover {
  background-color: var(--surface-alt);
  transform: translateY(-1px);
}

.google-logo {
  width: 20px;
  height: 20px;
  margin-right: 10px;
}

.google-logo:hover {
  filter: brightness(0.94);
}

.or-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: var(--space-4) 0;
  gap: var(--space-3);
}

.or-container .line {
  flex: 1;
  height: 1px;
  background-color: var(--border-color);
}

.or-container .or-text {
  white-space: nowrap;
  font-weight: var(--font-weight-medium);
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  text-align: center;
}

.or-subtext {
  text-align: center;
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

/* ==========================================================================
   Mobile home button (nav)
   ========================================================================== */
.home-btn {
  width: 56px;
  height: 56px;
  background: #dedfe0;
  border-radius: 50%;
  color: #000;
  text-decoration: none;
  margin-left: -5px;
  transition: all 0.2s ease;
}

.home-btn:hover {
  background-color: #e9ecef;
  color: #000;
  transform: scale(1.05);
}

.home-btn:active {
  transform: scale(0.95);
}

.home-btn i {
  font-size: 1.5rem;
  line-height: 1;
}

.home-text {
  font-size: 10px;
  line-height: 1;
  margin-top: 2px;
  color: #1f2937;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 768px) {
  .login-container {
    padding: var(--space-4);
  }
  .login-card {
    padding: var(--space-5) var(--space-4);
  }
}
