/* Plumbix note: shared visual styling for auth forms. */
.auth-page { min-height: 75vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 36px 40px;
  max-width: 440px;
  width: 100%;
  border: 1px solid var(--gray-border);
  box-shadow: var(--shadow-md);
}
.auth-card h1 { font-size: 1.5rem; margin-bottom: 8px; }
.auth-card > p.sub { color: var(--text-light); margin-bottom: 24px; font-size: 0.9rem; }
.auth-field { margin-bottom: 14px; }
.auth-field label { display: block; font-size: 0.8rem; font-weight: 600; margin-bottom: 6px; color: var(--text-dark); }
.auth-field input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--gray-border);
  border-radius: 12px;
  font-size: max(16px, 0.95rem);
  min-height: 44px;
}
.auth-field input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26, 102, 217, 0.12); transition: border-color 0.18s ease, box-shadow 0.18s ease; }
.auth-field input { transition: border-color 0.18s ease, box-shadow 0.18s ease; }
.password-hint { font-size: 0.75rem; color: var(--text-muted); margin-top: 6px; }
.password-hint.invalid { color: var(--danger); }
.auth-card .btn-auth {
  width: 100%;
  padding: 12px;
  min-height: 48px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-full);
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.18s ease, opacity 0.18s ease, transform 0.18s ease;
}
.auth-card .btn-auth:hover:not(:disabled) { background: var(--primary-dark); }
.auth-card .btn-auth:focus-visible { outline: 2px solid var(--primary-dark); outline-offset: 3px; }
.auth-card .btn-auth:disabled { opacity: 0.6; cursor: not-allowed; }
.auth-links { text-align: center; margin-top: 20px; font-size: 0.85rem; }
.auth-links a { color: var(--primary); text-decoration: none; font-weight: 500; border-radius: 4px; transition: color 0.18s ease; }
.auth-links a:hover { color: var(--primary-dark); }
.auth-links a:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.error-msg { color: var(--danger); text-align: center; margin-top: 12px; font-size: 0.85rem; min-height: 1.2em; font-weight: 600; }
.modal-content .auth-modal-form .error-msg { margin: 8px 0 12px; }
.modal-content .auth-modal-form button[type="submit"] { margin-top: 4px; }
.success-msg { color: var(--success); text-align: center; margin-top: 12px; font-size: 0.85rem; }
.captcha-box { margin: 16px 0; padding: 14px; background: #f8fafd; border-radius: 12px; border: 1px solid var(--gray-border); }
.captcha-label { font-size: 0.75rem; font-weight: 600; display: block; margin-bottom: 8px; }
.captcha-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.captcha-question { font-weight: 700; font-size: 1.1rem; color: var(--primary); min-width: 80px; }
.captcha-row input { flex: 1; min-width: 80px; padding: 8px 12px; border: 1px solid var(--gray-border); border-radius: 8px; }
.captcha-refresh {
  background: white;
  border: 1px solid var(--gray-border);
  border-radius: 8px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  color: var(--primary);
}

/* Accesso social (Google / Apple / Facebook) */
.auth-oauth { margin: 0 0 20px; }
.auth-oauth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0 18px;
  color: var(--text-muted, #64748b);
  font-size: 0.8rem;
}
.auth-oauth-divider::before,
.auth-oauth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-border, #e2e8f0);
}
.btn-oauth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 11px 16px;
  margin-bottom: 10px;
  border-radius: var(--radius-full, 999px);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--gray-border, #e2e8f0);
  background: var(--white, #fff);
  color: var(--text-dark, #0f172a);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.btn-oauth i { font-size: 1.1rem; }
.btn-oauth:hover:not(:disabled) { background: #f8fafc; border-color: #cbd5e1; }
.btn-oauth:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-oauth-google i { color: #ea4335; }
.btn-oauth-apple { background: #0f172a; color: #fff; border-color: #0f172a; }
.btn-oauth-apple i { color: #fff; }
.btn-oauth-apple:hover:not(:disabled) { background: #1e293b; border-color: #1e293b; }
.btn-oauth-facebook { background: #1877f2; color: #fff; border-color: #1877f2; }
.btn-oauth-facebook i { color: #fff; }
.btn-oauth-facebook:hover:not(:disabled) { background: #166fe5; border-color: #166fe5; }
.auth-oauth-tier-hint {
  font-size: 0.72rem;
  color: var(--text-muted, #64748b);
  text-align: center;
  margin: 0 0 12px;
  line-height: 1.45;
}
.auth-oauth-tier-hint small {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted, #64748b);
  text-align: center;
  margin: 4px 0 0;
  line-height: 1.4;
}
.modal-content .auth-oauth { margin-bottom: 16px; }
.modal-content .btn-oauth { margin-bottom: 8px; font-size: 0.85rem; padding: 10px 14px; }

/* Banner account social retail-only */
.oauth-retail-banner {
  position: sticky;
  top: 0;
  z-index: 500;
  background: linear-gradient(90deg, #eff6ff, #f0fdf4);
  border-bottom: 1px solid #bfdbfe;
  padding: 10px 16px;
}
.oauth-retail-banner-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: #1e3a5f;
}
.oauth-retail-banner-inner p { margin: 0; flex: 1; min-width: 200px; }
.oauth-retail-banner-cta {
  background: #1a66d9;
  color: #fff;
  padding: 8px 16px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.8rem;
  white-space: nowrap;
}
.oauth-retail-banner-close {
  background: transparent;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: #64748b;
  line-height: 1;
}

/* Auth pages: header più pulito (evita “ammucchiamento”) */
body[data-auth-page] .home-header__categories,
body[data-auth-page] .plumbix-macro-row {
  display: none !important;
}

body[data-auth-page] .home-guarantees-strip,
body[data-auth-page] .home-guarantees {
  display: none !important;
}

body[data-auth-page] .px-trust-ribbon,
body[data-auth-page] #pxTrustRibbon {
  display: none !important;
}

/* Profilo pro / gate installatori */
.pro-feature-gate, .pro-feature-gate-wrap .pro-feature-gate {
  text-align: center;
  padding: 40px 24px;
  background: #f8fafd;
  border-radius: 16px;
  border: 1px dashed #cbd5e1;
  margin: 20px 0;
}
.pro-feature-gate .gate-icon { font-size: 3rem; color: #1a66d9; margin-bottom: 16px; }
.pro-feature-gate-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }
.pro-profile-status {
  padding: 14px 16px;
  border-radius: 12px;
  margin-bottom: 16px;
  font-size: 0.88rem;
}
.pro-profile-status--ok { background: #d1fae5; color: #065f46; }
.pro-profile-status--pending { background: #fef3c7; color: #92400e; }
.product-price-pro .price-public.struck { text-decoration: line-through; color: #94a3b8; font-size: 0.85em; margin-right: 6px; }
.product-price-pro .price-pro { color: #059669; font-weight: 700; }

.auth-card-pro { border-top: 3px solid #1a66d9; }
.auth-pro-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #1e40af;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 6px 12px;
  margin-bottom: 12px;
}
.auth-account-type-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: #475569;
}
.auth-account-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 400;
  cursor: pointer;
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}
.auth-account-option--pro { border-color: #93c5fd; background: #f8fafc; }
.auth-account-option input { width: auto; margin-top: 4px; flex-shrink: 0; }
.auth-oauth-retail-note {
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.5;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed #e2e8f0;
}
.auth-oauth-retail-note a { color: #1a66d9; font-weight: 600; }

@media (max-width: 768px) {
  .auth-page { padding: 24px 16px; min-height: auto; align-items: flex-start; }
  .auth-card { padding: 28px 20px; border-radius: var(--radius-lg); }
  .auth-card h1 { font-size: 1.3rem; }
  .btn-oauth { min-height: 48px; }
  .captcha-row input { font-size: 16px; min-height: 44px; }
}

@media (max-width: 480px) {
  .auth-card { padding: 24px 16px; }
  .pro-feature-gate-actions { flex-direction: column; }
  .pro-feature-gate-actions .btn-primary,
  .pro-feature-gate-actions .btn-outline {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }
}
