/**
 * DiaperGuys logged-out auth — real glassmorphism (X × Sniffies)
 * Scoped to .dg-auth-page / .dg-auth-page-wrapper only.
 */
.dg-auth-page,
.dg-auth-page-wrapper {
  --dg-cyan: #ffffff;
  --glass-fill: rgba(8, 16, 24, 0.14);
  --glass-input: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.18);
  --text-1: #ffffff;
  --text-2: rgba(255, 255, 255, 0.72);
  /* legacy aliases */
  --dg-auth-accent: var(--dg-cyan);
  --dg-auth-accent-soft: rgba(255, 255, 255, 0.72);
  --dg-auth-text-main: var(--text-1);
  --dg-auth-text-muted: var(--text-2);
  --dg-auth-border-soft: var(--glass-border);
}

/* ---- Full-bleed photo backdrop ---- */
.dg-auth-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.dg-auth-bg__inner {
  position: absolute;
  inset: 0;
  background: #000;
}

.dg-auth-bg__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  opacity: 0;
  transition: opacity 1s ease-in-out, transform 14s ease-out;
  transform: scale(1.04);
}

.dg-auth-bg__image.dg-hero-video,
.dg-auth-bg__inner video.dg-hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  opacity: 0;
  transition: opacity 1s ease-in-out, transform 14s ease-out;
  transform: scale(1.04);
  pointer-events: none;
  background: #000;
}

.dg-auth-bg__inner .dg-hero-slide.dg-hero-slide--contain {
  object-fit: contain;
}

.dg-auth-bg__inner .dg-hero-slide.dg-hero-slide--contain {
  transform: none;
}

.dg-auth-bg__image.dg-hero-image--active {
  opacity: 1;
  transform: scale(1.08);
}

.dg-auth-bg__inner video.dg-hero-slide.dg-hero-image--active {
  opacity: 1;
  transform: scale(1.08);
}

.dg-auth-bg__inner .dg-hero-slide.dg-hero-slide--contain.dg-hero-image--active {
  transform: none;
}

.dg-auth-bg__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.32) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0.5) 100%),
    rgba(0, 0, 0, 0.38);
}

body.dg-auth-page {
  background: #000;
  padding-top: 0 !important;
}

body.dg-auth-page .main-wrapper {
  min-height: 100dvh;
  background: transparent;
}

body.dg-auth-page .main-header,
body.dg-auth-page .footer-bottom-bar {
  display: none !important;
}

.dg-auth-page-wrapper {
  position: relative;
  z-index: 1;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 28px clamp(20px, 7vw, 96px) calc(100px + env(safe-area-inset-bottom)) 24px;
  background: transparent;
}

body.dg-auth-page--standalone {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  margin: 0;
  padding: 28px clamp(20px, 7vw, 96px) calc(100px + env(safe-area-inset-bottom)) 24px;
  overflow-x: hidden;
  color: var(--text-1);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  background: transparent;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

/* ---- Shell: transparent frame, no fixed height ---- */
.dg-auth-shell,
.dg-landing-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1180px;
  height: auto;
  max-height: none;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  display: flex;
  align-items: flex-start;
  gap: 24px;
  box-shadow: none;
  overflow: visible;
}

.dg-auth-shell::before,
.dg-auth-shell::after,
.dg-landing-shell::before,
.dg-landing-shell::after {
  display: none;
}

/* Background-only layout: no left hero card, form on the right over full-bleed backdrop */
.dg-auth-shell--bg-only {
  justify-content: flex-end;
  max-width: 1180px;
  width: 100%;
  margin: 0;
}

.dg-auth-shell--bg-only .dg-auth-card,
.dg-auth-shell--bg-only .dg-auth-panel {
  flex: none;
  width: 100%;
  max-width: 420px;
}

/* ---- Left hero photo card (sharp, Sniffies-forward) ---- */
.dg-auth-photo-tile,
.dg-hero-panel {
  flex: 1.05;
  position: relative;
  z-index: 1;
  border-radius: 24px;
  overflow: hidden;
  min-height: 480px;
  max-height: 85vh;
  align-self: flex-start;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 16px 56px rgba(0, 0, 0, 0.55);
}

.dg-hero-inner {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 480px;
  overflow: hidden;
  background: #000;
}

.dg-hero-gradient {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, transparent 40%, rgba(0, 0, 0, 0.7) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.35) 0%, transparent 50%);
  pointer-events: none;
}

.dg-hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 1s ease-in-out, transform 14s ease-out;
  opacity: 0;
  transform: scale(1.03);
}

.dg-hero-panel video.dg-hero-slide,
.dg-hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 1s ease-in-out, transform 14s ease-out;
  opacity: 0;
  transform: scale(1.03);
  pointer-events: none;
  background: #000;
}

.dg-hero-panel .dg-hero-image.dg-hero-image--active {
  opacity: 1;
  transform: scale(1.07);
}

.dg-hero-panel video.dg-hero-slide.dg-hero-image--active,
.dg-hero-panel .dg-hero-video.dg-hero-image--active {
  opacity: 1;
  transform: scale(1.07);
}

.dg-hero-badge {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 4;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--glass-fill);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  font-size: 10px;
  font-weight: 500;
  color: var(--text-2);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dg-hero-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
}

.dg-hero-copy {
  position: absolute;
  left: 16px;
  top: 16px;
  z-index: 4;
  max-width: 280px;
}

.dg-hero-copy__title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.35;
}

.dg-hero-copy__sub {
  margin: 0;
  font-size: 11px;
  color: var(--text-2);
  line-height: 1.45;
}

/* ---- Right glass form panel ---- */
.dg-auth-card,
.dg-auth-panel {
  flex: 1;
  position: relative;
  z-index: 1;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.1) 0%, rgba(10, 16, 24, 0.18) 38%, rgba(6, 10, 16, 0.12) 100%);
  backdrop-filter: blur(48px) saturate(200%);
  -webkit-backdrop-filter: blur(48px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 24px;
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -1px 0 rgba(255, 255, 255, 0.08),
    0 0 60px rgba(255, 255, 255, 0.1);
  height: auto;
  min-height: 0;
  overflow: visible;
  padding: 28px 28px 22px;
  display: flex;
  flex-direction: column;
}

.dg-auth-card::before,
.dg-auth-panel::before {
  display: none;
}

.dg-auth-main {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: none;
  min-height: auto;
  overflow: visible;
}

.dg-auth-intro {
  text-align: center;
}

.dg-logo-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--text-1);
}

.dg-auth-headline {
  margin: 8px 0 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-2);
}

.dg-auth-subhead {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-2);
  text-align: center;
}

/* Tabs */
.dg-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-2);
}

.dg-tab-link {
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  color: inherit;
  user-select: none;
}

.dg-tab-link.dg-tab-link--active {
  border-color: rgba(255, 255, 255, 0.55);
  color: var(--dg-cyan);
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.12);
}

/* Form container — NO internal scroll */
.fr_auth_form {
  overflow: visible;
  flex: none;
  min-height: auto;
  padding-right: 0;
}

.fr_auth_form .js_panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dg-form-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fr_welcome_field {
  position: relative;
  margin-bottom: 0;
}

/* Inputs — frosted, X-clean */
.dg-auth-card input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.dg-auth-card select,
.dg-input,
.fr_welcome_field input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.fr_welcome_field select,
.dg-auth-card .form-control:not([type="checkbox"]):not([type="radio"]) {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  background: var(--glass-input);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text-1);
  font-size: 15px;
  outline: none;
  box-sizing: border-box;
}

.dg-auth-card input::placeholder,
.dg-auth-card select,
.fr_welcome_field input::placeholder {
  color: var(--text-2);
}

.dg-auth-card input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):focus,
.dg-auth-card select:focus,
.dg-input:focus,
.fr_welcome_field input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):focus,
.fr_welcome_field select:focus,
.dg-auth-card .form-control:not([type="checkbox"]):not([type="radio"]):focus {
  border-color: var(--dg-cyan);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.28);
  outline: none;
}

.dg-password-wrap {
  position: relative;
}

.dg-password-wrap .dg-input {
  padding-right: 48px;
}

.dg-toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--glass-input);
  color: var(--text-1);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.dg-toggle-password:hover {
  border-color: var(--dg-cyan);
  color: var(--dg-cyan);
}

.dg-caps-warning {
  font-size: 11px;
  color: #ffd3d3;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Primary CTA — solid cyan, beats Bootstrap .btn-primary on sign pages */
.dg-auth-page .dg-login-button,
.dg-auth-page .fr_welcome_btn,
.dg-auth-page .dg-auth-card .btn-primary,
.dg-auth-page-wrapper .dg-login-button,
.dg-auth-page-wrapper .fr_welcome_btn {
  width: 100%;
  height: 56px;
  padding: 0 20px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  background: var(--dg-cyan) !important;
  color: #001016 !important;
  font-weight: 600;
  font-size: 15px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  transition: filter 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dg-auth-page .dg-login-button:hover,
.dg-auth-page .fr_welcome_btn:hover,
.dg-auth-page .dg-auth-card .btn-primary:hover,
.dg-auth-page-wrapper .dg-login-button:hover,
.dg-auth-page-wrapper .fr_welcome_btn:hover {
  filter: brightness(1.06);
  background: var(--dg-cyan) !important;
  color: #001016 !important;
}

.dg-auth-page .dg-login-button:disabled,
.dg-auth-page-wrapper .dg-login-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.dg-auth-secondary {
  text-align: center;
  font-size: 13px;
  color: var(--text-2);
}

.dg-auth-secondary a,
.dg-auth-card a.text-link {
  color: var(--dg-cyan);
  text-decoration: none;
  font-weight: 500;
}

.dg-auth-secondary a:hover {
  text-decoration: underline;
}

/* Social row */
.dg-auth-socials {
  margin-top: 4px;
  text-align: center;
}

.dg-social-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-2);
  margin-bottom: 12px;
}

.dg-social-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.dg-social-btn {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--glass-input);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-1);
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  font: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.dg-social-btn:hover {
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
}

.dg-auth-18plus {
  margin: 4px 0 8px;
  font-size: 10px;
  font-weight: 400;
  color: var(--text-2);
  text-align: center;
  line-height: 1.55;
}

.dg-auth-18plus a {
  color: var(--text-2);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.dg-auth-18plus a:hover {
  color: var(--dg-cyan);
}

/* Legal + footer */
.dg-auth-footer,
.dg-legal {
  margin-top: 4px;
  font-size: 10px;
  font-weight: 400;
  color: var(--text-2);
  text-align: center;
  line-height: 1.6;
}

.dg-auth-footer a,
.dg-legal a {
  color: var(--text-2);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.dg-auth-footer a:hover,
.dg-legal a:hover {
  color: var(--dg-cyan);
}

.dg-footer-links {
  margin-top: 10px;
  font-size: 10px;
  text-align: center;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 12px;
}

.dg-footer-links a {
  color: var(--text-2);
  text-decoration: none;
}

.dg-footer-links a:hover {
  color: var(--dg-cyan);
}

.dg-copy {
  margin-top: 8px;
  font-size: 10px;
  text-align: center;
  color: var(--text-2);
}

/* reCAPTCHA + checkboxes breathing room */
.fr_auth_form .g-recaptcha,
.fr_auth_form .cf-turnstile,
.dg-auth-card .g-recaptcha,
.dg-auth-card .cf-turnstile {
  margin: 8px 0 4px;
  overflow: visible;
}

.dg-auth-page .form-check,
.dg-auth-page-wrapper .form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  min-height: auto;
}

.dg-auth-page .form-check-input,
.dg-auth-page-wrapper .form-check-input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
  border-radius: 4px;
  border: 1px solid var(--glass-border);
  background: var(--glass-input);
  backdrop-filter: none;
  cursor: pointer;
  float: none;
}

.dg-auth-page .form-check-label,
.dg-auth-page-wrapper .form-check-label {
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.5;
  flex: 1;
}

.dg-auth-page .form-check-label a {
  color: var(--dg-cyan);
}

.dg-auth-page .form-check-input:checked,
.dg-auth-page-wrapper .form-check-input:checked {
  background-color: var(--dg-cyan);
  border-color: var(--dg-cyan);
}

.dg-auth-page .dg-signup-fields,
.dg-auth-page-wrapper .dg-signup-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dg-auth-page .alert-danger:not(.x-hidden),
.dg-auth-page-wrapper .alert-danger:not(.x-hidden) {
  display: block;
}

/* Reset page */
.dg-auth-reset-card .card {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.dg-auth-reset-card .card-header,
.dg-auth-reset-card .card-body {
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--text-1);
}

/* Alerts */
.dg-auth-page .alert-danger {
  border-radius: 14px;
  border: 1px solid rgba(255, 81, 81, 0.7);
  background: rgba(60, 8, 8, 0.5);
  color: #ffd3d3;
  font-size: 12px;
}

.dg-auth-page .alert-success {
  border-radius: 14px;
  border: 1px solid rgba(59, 255, 123, 0.6);
  background: rgba(8, 60, 20, 0.45);
  color: #d3ffd9;
}

.dg-auth-page .alert-warning {
  border-radius: 14px;
  background: rgba(255, 193, 7, 0.12);
  border-color: rgba(255, 193, 7, 0.35);
  color: #ffe9a8;
}

.dg-auth-page .x-hidden,
.x-hidden {
  display: none !important;
}

body.dg-auth-page.visitor {
  padding-bottom: calc(90px + env(safe-area-inset-bottom));
}

/* Cookie banner */
.dg-cookie-banner {
  position: fixed;
  left: 50%;
  bottom: max(14px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  max-width: 520px;
  width: calc(100% - 24px);
  background: var(--glass-fill);
  border-radius: 16px;
  padding: 12px 14px;
  display: none;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--text-2);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  z-index: 10000;
}

.dg-cookie-banner-show { display: flex; }

.dg-cookie-btn--primary {
  border: 0;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 11px;
  font-weight: 600;
  background: var(--dg-cyan);
  color: #001016;
  cursor: pointer;
}

.dg-cookie-close {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
}

.dg-powder-poof {
  position: fixed;
  width: 160px;
  height: 160px;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.85) 0, transparent 60%);
  filter: blur(2px);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.2);
  animation: dg-poof 0.85s ease-out forwards;
  z-index: 9999;
}

@keyframes dg-poof {
  0% { opacity: 0.85; transform: translate(-50%, -50%) scale(0.2); }
  100% { opacity: 0; transform: translate(-50%, -58%) scale(4); }
}

/* Coming Soon toast */
.dg-social-toast {
  position: fixed;
  left: 50%;
  bottom: calc(28px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(16px);
  z-index: 10050;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 999px;
  background: var(--glass-fill);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  color: var(--text-1);
  font-size: 0.875rem;
  font-weight: 500;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s ease;
  max-width: calc(100vw - 32px);
  white-space: nowrap;
}

.dg-social-toast--show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
}

.dg-social-toast__icon {
  color: var(--dg-cyan);
  font-size: 0.9rem;
  line-height: 1;
}

/* Modals on auth pages */
.dg-auth-page-wrapper ~ .modal .modal-content,
body.modal-open .modal-content {
  isolation: isolate;
}

/* ---- Responsive ---- */
@media (max-width: 960px) {
  .dg-auth-page-wrapper,
  body.dg-auth-page--standalone {
    padding: 16px 12px calc(110px + env(safe-area-inset-bottom));
    align-items: flex-start;
    justify-content: center;
  }

  .dg-auth-shell,
  .dg-landing-shell {
    flex-direction: column;
    gap: 0;
  }

  .dg-auth-shell--bg-only {
    justify-content: center;
  }

  .dg-auth-photo-tile,
  .dg-hero-panel {
    display: none;
  }

  .dg-auth-card,
  .dg-auth-panel {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    padding: 24px 20px 20px;
  }
}

@media (max-width: 640px) {
  .dg-auth-card,
  .dg-auth-panel {
    padding: 22px 18px 18px;
  }

  .dg-logo-title {
    font-size: 22px;
  }
}
