/**
 * Register page (register.html) styles.
 *
 * Design system: uses the shared tokens from /css/tokens.css, matching
 * the redesign pass done across the rest of the site (login.css and
 * post-a-request.css/list-your-services.css/get-a-quote.css share this
 * same register-form pattern).
 */

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

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

.register-card h1 {
  text-align: center;
  margin-bottom: var(--space-5);
  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;
}

/* ==========================================================================
   Login 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;
}

.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);
}

/* ==========================================================================
   Password requirements checklist
   ========================================================================== */
.pw-requirements {
  display: none; /* hidden on load */
  margin-top: var(--space-3);
  padding: var(--space-3) 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--surface-alt);
  font-size: var(--font-size-sm);
}

.pw-requirements.show {
  display: block; /* shown when active */
}

.pw-req {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 6px 0;
  font-weight: var(--font-weight-medium);
  line-height: 1.3;
}

.pw-req.not-met {
  color: var(--danger);
}

.pw-req.not-met i {
  color: var(--danger);
}

.pw-req.met {
  color: var(--success);
}

.pw-req.met i {
  color: var(--success);
}

.pw-req i {
  font-size: var(--font-size-base);
  min-width: 18px;
}

/* Optional show-password toggle -- no matching control in the current
   markup, kept in case register.js's optional #showPassword hookup is
   wired back up (see register.js). */
.pw-toggle {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

.pw-toggle input {
  cursor: pointer;
}

/* ==========================================================================
   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) {
  .register-container {
    padding: var(--space-4);
  }

  .register-card {
    padding: var(--space-5) var(--space-4);
  }
}
