/**
 * Shared auth page styles (login + signup). One file, loaded on both pages.
 * This is the AUTHORITATIVE source of mobile styles for auth pages.
 * pwa.css must NOT contain auth overrides (they were removed).
 */

/* ============================================
   DESKTOP: 2-column grid layout
   ============================================ */
@media (min-width: 992px) {
  .signup_grid {
    grid-template-columns: 1fr minmax(360px, 480px) !important;
    grid-template-rows: auto !important;
    height: auto !important;
    min-height: 765px !important;
    width: 100% !important;
    max-width: 100% !important;
    display: grid !important;
    justify-content: stretch !important;
    justify-items: stretch !important;
  }
  .signup_left-wrap {
    position: relative !important;
    overflow: hidden !important;
    height: 100%;
    min-height: 765px;
    border-radius: 30px;
    max-width: 100% !important;
    width: 100% !important;
    display: flex;
    flex-flow: column;
    justify-content: center;
    align-items: stretch;
  }
  .gg-signup-visuals {
    position: absolute !important;
    z-index: 1;
    border-radius: 27px;
    width: 100% !important;
    height: 100% !important;
    min-height: 765px;
    overflow: hidden !important;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
  }
  .gg-signup-video {
    border-radius: 27px;
    width: 100% !important;
    height: 100% !important;
    position: relative;
    overflow: hidden !important;
    max-width: 100% !important;
  }
  .gg-signup-video.w-background-video {
    height: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }
  .gg-signup-video.w-background-video > video {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    object-fit: cover !important;
    z-index: -100;
    max-width: 100% !important;
    max-height: 100% !important;
  }
  .gg-logo {
    position: absolute !important;
    z-index: 100;
    width: 294px;
    height: 170px;
    margin-top: 20px;
    margin-left: 20px;
  }
  .signup_details-wrap {
    padding: 20px;
    max-width: 100%;
    width: 100%;
  }
  .container-large {
    max-width: 80rem !important;
    margin-left: auto;
    margin-right: auto;
  }
  /* Hide mobile logo on desktop */
  .signup_mobile-logo {
    display: none !important;
  }
}

/* ============================================
   BASE STYLES (all viewports)
   ============================================ */

.section_signup {
  min-height: 100svh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 2.5rem;
  padding-bottom: calc(2.5rem + env(safe-area-inset-bottom, 0px));
  position: relative;
  overflow-x: hidden;
  width: 100%;
}

.signup_wrap {
  width: 100% !important;
  max-width: 100% !important;
  position: relative;
  overflow: hidden;
  display: block !important;
}

.padding-global {
  padding-left: 2.5rem;
  padding-right: 2.5rem;
  position: relative;
  overflow-x: hidden;
  width: 100%;
}

.container-large {
  position: relative;
  overflow-x: hidden;
  width: 100%;
  max-width: 80rem !important;
  margin-left: auto;
  margin-right: auto;
}

.w-layout-grid.signup_grid {
  display: grid !important;
  width: 100% !important;
}

.signup_left-wrap {
  contain: layout style paint;
  isolation: isolate;
  will-change: auto;
}

.signup_left-wrap * {
  max-width: 100%;
  box-sizing: border-box;
}

.signup_left-wrap .gg-signup-video.w-background-video {
  will-change: auto;
  transform: translateZ(0);
}

.gg-nav-links {
  gap: 0 !important;
}

.gg-nav-link .gg-menu-text {
  white-space: nowrap;
  margin: 0;
  color: #fff;
  font-family: inter-variable, sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 13px;
}

.gg-signup-icon,
.gg-login-icon {
  opacity: 0 !important;
  display: none !important;
}

/* Password strength (signup page) */
.gg-password-strength {
  margin-top: 8px;
  margin-bottom: 4px;
}
.gg-password-strength-bar {
  height: 4px;
  background: rgba(255,255,255,0.2);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}
.gg-password-strength-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 4px;
  transition: width 0.2s ease, background 0.2s ease;
}
.gg-password-strength-fill.weak { width: 25%; background: #ff4c61; }
.gg-password-strength-fill.fair { width: 50%; background: #ffc983; }
.gg-password-strength-fill.good { width: 75%; background: var(--gg-primary, #8b6eff); }
.gg-password-strength-fill.strong { width: 100%; background: var(--gg-primary, #06ffac); }
.gg-password-strength-label {
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  margin-bottom: 6px;
}
.gg-password-strength-checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 12px;
  color: rgba(255,255,255,0.6);
}
.gg-password-strength-checklist li {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.gg-password-strength-checklist li .gg-pw-icon {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  flex-shrink: 0;
}
.gg-password-strength-checklist li.met .gg-pw-icon {
  background: var(--gg-primary, #06ffac);
  color: #000;
}
.gg-password-strength-checklist li.met .gg-pw-icon::after {
  content: '✓';
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #000;
}
.gg-password-strength-checklist li.met {
  color: rgba(6, 255, 172, 0.9);
}
.signup_submit-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}
.gg-link-primary {
  color: var(--gg-primary, #06ffac);
  text-decoration: none;
}
.gg-link-primary:hover {
  text-decoration: underline;
}

/* Mobile logo — hidden on desktop by default */
.signup_mobile-logo {
  display: none;
}

/* ============================================
   MOBILE RESPONSIVE (≤ 768px)
   Breakpoint matches pwa.css to avoid 1px gaps.
   ============================================ */
@media screen and (max-width: 768px) {

  /* --- Section & Containers --- */
  .section_signup {
    padding-top: 0.5rem !important;
    padding-bottom: 5rem !important; /* Clear bottom nav */
    min-height: auto !important;
  }

  .padding-global {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
  }

  /* --- Grid: single column --- */
  .w-layout-grid.signup_grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
  }

  .signup_grid {
    grid-template-columns: 1fr !important;
    min-height: auto !important;
    height: auto !important;
  }

  /* --- NUCLEAR HIDE: all desktop-only elements --- */
  .signup_left-wrap,
  .gg-signup-visuals,
  .gg-logo,
  .gg-logo-animation,
  .signup_left-mobile {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    pointer-events: none !important;
  }

  /* Hide the site footer on auth pages */
  .section_signup ~ .gg-footer-panel {
    display: none !important;
  }

  /* --- Mobile Logo: centered GO animation --- */
  .signup_mobile-logo {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 1.5rem 0 0.5rem !important;
  }

  .signup_mobile-logo video {
    height: auto !important;
    border-radius: 12px !important;
    object-fit: contain !important;
  }

  /* --- Form Container --- */
  .signup_details-wrap {
    width: 100% !important;
    padding: 0 !important;
    min-height: auto !important;
  }

  .signup_details {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 0 0.75rem !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }

  /* --- Title --- */
  .signup_title {
    margin-bottom: 0.75rem !important;
  }

  .signup_title h1 {
    font-size: 1.5rem !important;
    margin-bottom: 0.25rem !important;
  }

  .signup_title .text-size-small {
    font-size: 0.8rem !important;
    line-height: 1.3 !important;
  }

  /* --- Input Fields --- */
  .signup_text-field.w-input {
    margin-bottom: 10px !important;
    padding: 12px 16px !important;
    font-size: 16px !important; /* Prevent iOS zoom on focus */
    min-height: 48px !important;
    border-radius: 10px !important;
    width: 100% !important;
  }

  /* --- Submit Button --- */
  .signup_submit-button.w-button {
    margin-top: 8px !important;
    padding: 14px 20px !important;
    font-size: 16px !important;
    width: 100% !important;
    min-height: 48px !important;
    border-radius: 10px !important;
  }

  /* --- Social Buttons --- */
  .signup_button-google {
    min-height: 48px !important;
    border-radius: 10px !important;
  }

  /* --- Password Checklist (compact) --- */
  .gg-password-strength {
    margin-top: 4px !important;
    margin-bottom: 2px !important;
  }

  .gg-password-strength-checklist li {
    margin-bottom: 2px !important;
    font-size: 11px !important;
  }

  /* --- "Or" Divider --- */
  .signup_option-wrap.margin-vertical.margin-small {
    margin-top: 10px !important;
    margin-bottom: 10px !important;
  }

  /* --- iOS Safari bottom address bar safe area --- */
  .section_signup {
    padding-top: max(1rem, env(safe-area-inset-top, 0px)) !important;
    padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px)) !important;
    justify-content: flex-start !important;
  }

  .signup_details {
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
  }
}
