/**
 * GeoIBRAM — Auth pages mobile optimization (login, cadastro, recuperar senha)
 *
 * @package GeoIBRAM_Theme
 */

/* Base: safe areas e altura real do viewport */
body.geoibram-auth-page {
  min-height: 100dvh;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

body.geoibram-auth-page #landing-container {
  min-height: 0;
}

/* Coluna do formulário — touch targets e inputs sem zoom iOS */
body.geoibram-auth-page .geoibram-auth-form-column input,
body.geoibram-auth-page .geoibram-auth-form-column select,
body.geoibram-auth-page .geoibram-auth-form-column textarea {
  font-size: 16px;
  min-height: 48px;
}

/* Checkboxes e radios não devem herdar min-height */
body.geoibram-auth-page .geoibram-auth-form-column input[type="checkbox"],
body.geoibram-auth-page .geoibram-auth-form-column input[type="radio"] {
  min-height: unset;
  font-size: inherit;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

/* Garante que labels com checkbox/radio mantenham layout em linha */
body.geoibram-auth-page .geoibram-auth-form-column label.flex {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start;
}

body.geoibram-auth-page .geoibram-auth-form-column button[type="submit"],
body.geoibram-auth-page .geoibram-auth-form-column .geoibram-btn-green,
body.geoibram-auth-page .geoibram-auth-form-column a.geoibram-btn-green {
  min-height: 48px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

body.geoibram-auth-page .geoibram-auth-form-column [data-toggle-password] {
  min-width: 44px;
  min-height: 44px;
}

@media (max-width: 767px) {
  body.geoibram-auth-page {
    overflow-x: hidden;
  }

  body.geoibram-auth-page #landing-container {
    flex-direction: column;
    overflow: visible;
  }

  body.geoibram-auth-page .geoibram-auth-left-panel {
    min-height: auto !important;
    padding: 1rem 1rem 0.75rem !important;
    border-right: none !important;
    border-bottom: 1px solid rgb(226 232 240 / 0.8);
  }

  body.geoibram-auth-page .geoibram-auth-left-promo {
    display: none !important;
  }

  body.geoibram-auth-page .geoibram-auth-left-promo .space-y-4.text-center {
    display: none !important;
  }

  body.geoibram-auth-page .geoibram-auth-left-footer {
    display: none !important;
  }

  /* Ocultar overlays no vídeo (HUD, área protegida, comunicação) — mobile e PWA */
  body.geoibram-auth-page .geoibram-auth-left-panel .absolute.inset-0.bg-gradient-to-t,
  body.geoibram-auth-page .geoibram-auth-left-panel .absolute.top-3.left-3,
  body.geoibram-auth-page .geoibram-auth-left-panel .absolute.top-3.right-3,
  body.geoibram-auth-page .geoibram-auth-left-panel .absolute.bottom-3.left-3 {
    display: none !important;
  }

  body.geoibram-auth-page .geoibram-auth-form-column {
    width: 100% !important;
    min-height: auto !important;
    padding: 1rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom, 0px)) !important;
    border-left: none !important;
    box-shadow: none !important;
    overflow-y: visible !important;
  }

  body.geoibram-auth-page .geoibram-auth-form-column > .my-auto {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
    min-height: 0 !important;
  }

  body.geoibram-auth-page .geoibram-auth-form-column h2 {
    font-size: 1.375rem;
    line-height: 1.25;
  }

  body.geoibram-auth-page .geoibram-auth-form-column .role-selector-label {
    min-height: 44px;
  }

  body.geoibram-auth-page .geoibram-auth-form-column .geoibram-auth-top-bar a,
  body.geoibram-auth-page .geoibram-auth-form-column .geoibram-auth-top-bar span {
    font-size: 0.6875rem;
  }

  /* Ícones dos campos — sem sobrepor texto */
  body.geoibram-auth-page .geoibram-auth-form-column .relative > i[data-lucide] {
    top: 50% !important;
    transform: translateY(-50%);
    left: 0.875rem !important;
    pointer-events: none;
  }

  body.geoibram-auth-page .geoibram-auth-form-column .relative input {
    padding-left: 2.75rem !important;
    padding-right: 2.75rem !important;
    line-height: 1.25 !important;
  }

  body.geoibram-auth-page .geoibram-auth-form-column .relative button[data-toggle-password] {
    top: 50% !important;
    transform: translateY(-50%);
    right: 0.5rem !important;
  }

  body.geoibram-auth-page > .geoibram-site-footer {
    padding: 0.875rem 1rem calc(0.875rem + env(safe-area-inset-bottom, 0px)) !important;
    text-align: center !important;
  }

  body.geoibram-auth-page > .geoibram-site-footer .geoibram-footer-inner {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
    text-align: center !important;
  }

  body.geoibram-auth-page > .geoibram-site-footer .geoibram-footer-text,
  body.geoibram-auth-page > .geoibram-site-footer p {
    font-size: 0.6875rem !important;
    line-height: 1.45 !important;
    text-align: center !important;
  }

  body.geoibram-auth-page #global-toast {
    top: calc(1rem + env(safe-area-inset-top, 0px));
    max-width: calc(100vw - 2rem);
  }
}

@media (max-width: 380px) {
  body.geoibram-auth-page .geoibram-auth-form-column {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}
