/**
 * Modern auth forms (login, register) – tenant-login.ejs / tenant-register.ejs
 */

/* Page container */
.auth-page .auth-page-container {
  padding: 2rem 0 3rem;
  max-width: 480px;
  margin: 0 auto;
}

/* Card */
.auth-page .auth-card {
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.06);
  padding: 2.25rem 2rem;
  border: 1px solid var(--border-color, #e2e8f0);
  transition: box-shadow 0.2s ease;
}

.auth-page .auth-card:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), 0 2px 6px rgba(0, 0, 0, 0.06);
}

/* Page header inside auth (title + description) */
.auth-page .auth-page-header {
  margin-bottom: 1.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.auth-page .auth-page-header h1 {
  font-size: 1.625rem;
  font-weight: 700;
  color: var(--dark-color, #1e293b);
  margin: 0 0 0.35rem 0;
  letter-spacing: -0.02em;
}

.auth-page .auth-page-header p {
  font-size: 0.9375rem;
  color: var(--text-light, #64748b);
  margin: 0;
  line-height: 1.45;
}

/* Form */
.auth-page .auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Field group */
.auth-page .auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.auth-page .auth-field label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-color, #334155);
  letter-spacing: 0.01em;
}

.auth-page .auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-page .auth-input-wrap .auth-icon {
  position: absolute;
  left: 1rem;
  width: 1.125rem;
  height: 1.125rem;
  color: var(--text-light, #64748b);
  pointer-events: none;
  transition: color 0.2s ease;
}

.auth-page .auth-input-wrap input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-color, #334155);
  background: var(--light-color, #f8fafc);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 0.5rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

.auth-page .auth-input-wrap input::placeholder {
  color: var(--text-light, #94a3b8);
}

.auth-page .auth-input-wrap input:hover {
  border-color: var(--text-light, #cbd5e1);
}

.auth-page .auth-input-wrap input:focus {
  outline: none;
  border-color: var(--primary-color, #00B2B8);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color, #00B2B8) 25%, transparent);
  background: #fff;
}

.auth-page .auth-input-wrap:focus-within .auth-icon {
  color: var(--primary-color, #00B2B8);
}

/* Phone row: country code + number (register form) */
.auth-page .auth-phone-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
  width: 100%;
}
.auth-page .auth-phone-row .auth-phone-country {
  flex: 0 0 auto;
  width: 160px;
  max-width: 160px;
  padding: 0.75rem 0.9rem;
  font-size: 1rem;
  color: var(--text-color, #334155);
  background: var(--light-color, #f8fafc);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 0.5rem;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.auth-page .auth-phone-row .auth-phone-country:focus {
  outline: none;
  border-color: var(--primary-color, #00B2B8);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color, #00B2B8) 25%, transparent);
}
.auth-page .auth-phone-row .auth-phone-wrap {
  flex: 1 1 auto;
  min-width: 0;
}

/* Field hint (e.g. "Örnek: 0 532...") */
.auth-page .auth-field-hint {
  font-size: 0.8125rem;
  color: var(--text-light, #64748b);
  margin-top: 0.25rem;
}

/* Submit button – tenant theme vars (--primary-color, --primary-dark) from tenant-context.ejs */
.auth-page .auth-submit {
  width: 100%;
  padding: 0.875rem 1.25rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: var(--primary-color, #00B2B8);
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
  margin-top: 0.25rem;
}

.auth-page .auth-submit:hover {
  background: var(--primary-dark, var(--color-action-primary-hover, #007D9C));
}

.auth-page .auth-submit:active {
  transform: scale(0.99);
}

.auth-page .auth-submit:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color, #00B2B8) 35%, transparent);
}

/* Error message */
.auth-page .auth-error {
  font-size: 0.875rem;
  color: var(--danger-color, #ef4444);
  padding: 0.75rem 1rem;
  background: rgba(239, 68, 68, 0.08);
  border-radius: 0.5rem;
  margin-top: 0.5rem;
  display: none;
}

.auth-page .auth-error.is-visible {
  display: block;
}

/* Divider / links section */
.auth-page .auth-divider {
  height: 1px;
  background: var(--border-color, #e2e8f0);
  margin: 1.5rem 0 1rem;
}

.auth-page .auth-links {
  text-align: center;
  font-size: 0.9375rem;
  color: var(--text-light, #64748b);
}

.auth-page .auth-links a {
  color: var(--primary-color, #00B2B8);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.auth-page .auth-links a:hover {
  color: var(--primary-dark, var(--color-action-primary-hover, #007D9C));
  text-decoration: underline;
}

.auth-page .auth-links p {
  margin: 0 0 0.5rem 0;
}

.auth-page .auth-links p:last-child {
  margin-bottom: 0;
}

/* Secondary button (e.g. guest checkout) */
.auth-page .auth-btn-secondary {
  width: 100%;
  padding: 0.75rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-color, #334155);
  background: #fff;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
  margin-top: 1rem;
}

.auth-page .auth-btn-secondary:hover {
  background: var(--light-color, #f8fafc);
  border-color: var(--text-light, #cbd5e1);
}

/* Responsive */
@media (max-width: 560px) {
  .auth-page .auth-page-container {
    padding: 1.5rem 1rem 2rem;
  }

  .auth-page .auth-card {
    padding: 1.75rem 1.25rem;
  }

  .auth-page .auth-page-header h1 {
    font-size: 1.5rem;
  }
}
