html.totem-child-document {
  --totem-child-petrol: #0c6e82;
  --totem-child-petrol-dark: #084a59;
  --totem-child-green: #8fb51d;
  --totem-child-ink: #17282c;
  --totem-child-muted: #5c6e70;
  --totem-child-line: #d5e1e2;
  --totem-child-soft: #eff4f4;
  overscroll-behavior: none;
  touch-action: pan-y;
}

html.totem-child-document,
html.totem-child-document body {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden !important;
}

html.totem-child-document body {
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-x: none;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

html.totem-secondary-document {
  overflow-y: auto !important;
  overscroll-behavior-y: contain;
  /* El paneo nativo permanece habilitado; totem-child.js aporta un
     respaldo durante el arrastre táctil dentro del iframe del kiosco. */
  touch-action: pan-y;
}

html.totem-secondary-document body {
  overflow-y: visible !important;
  touch-action: pan-y;
}

html.totem-secondary-document .prof-page-section,
html.totem-secondary-document .prof-page-shell,
html.totem-secondary-document .prof-demo-grid,
html.totem-secondary-document .prof-demo-card {
  touch-action: pan-y;
}

/* Vista propia de Sucursales: reutiliza literalmente las tarjetas del index. */
html.totem-sucursales-document body.site-body {
  padding-top: 0 !important;
}

html.totem-sucursales-document .web-kiosk-content > * {
  display: none !important;
}

html.totem-sucursales-document .web-kiosk-content > main {
  display: block !important;
}

html.totem-sucursales-document .web-kiosk-content > main > * {
  display: none !important;
}

html.totem-sucursales-document .web-kiosk-content > main > #sucursales {
  display: block !important;
  min-height: 100%;
  padding-top: 84px !important;
}

/* Las paginas secundarias se convierten en contenido del contenedor padre. */
html.totem-secondary-document body.site-body,
html.totem-secondary-document body.app-layout {
  padding-top: 76px !important;
  background: #f3f7f7 !important;
}

html.totem-secondary-document .site-header,
html.totem-secondary-document .site-nav,
html.totem-secondary-document .mobile-nav,
html.totem-secondary-document .floating-sidebar,
html.totem-secondary-document .floating-btn,
html.totem-secondary-document .fab-whatsapp-mobile,
html.totem-secondary-document .newsletter-section,
html.totem-secondary-document .site-footer,
html.totem-secondary-document footer.site-footer {
  display: none !important;
}

html.totem-secondary-document #main-content,
html.totem-secondary-document main {
  margin-top: 0 !important;
}

html.totem-secondary-document .page-band {
  padding-top: 1.15rem !important;
  padding-bottom: 1.15rem !important;
}

html.totem-secondary-document .page-band-inner,
html.totem-secondary-document main > section,
html.totem-secondary-document main > .container,
html.totem-secondary-document .legal-container,
html.totem-secondary-document .nosotros-container,
html.totem-secondary-document .profesionales-page-container {
  max-width: 1540px !important;
}

html.totem-secondary-document h1 { font-size: clamp(28px, 2.35vw, 42px) !important; }
html.totem-secondary-document h2 { line-height: 1.16; }
html.totem-secondary-document p,
html.totem-secondary-document li { line-height: 1.55; }

html.totem-secondary-document button,
html.totem-secondary-document input,
html.totem-secondary-document select,
html.totem-secondary-document textarea,
html.totem-secondary-document a[class*="btn"],
html.totem-secondary-document a[class*="button"] {
  min-height: 48px;
}

html.totem-secondary-document input,
html.totem-secondary-document select,
html.totem-secondary-document textarea {
  font-size: 16px !important;
}

html.totem-secondary-document button:focus-visible,
html.totem-secondary-document a:focus-visible,
html.totem-secondary-document input:focus-visible,
html.totem-secondary-document select:focus-visible,
html.totem-secondary-document textarea:focus-visible {
  outline: 4px solid rgba(12, 110, 130, .3) !important;
  outline-offset: 2px !important;
}

html.totem-child-document .agenda-modal-close,
html.totem-child-document .esp-modal-close,
html.totem-child-document .modal-close,
html.totem-child-document .resultados-modal-close,
html.totem-child-document .mpab-cerrar {
  width: 52px !important;
  height: 52px !important;
  min-width: 52px !important;
  min-height: 52px !important;
  display: grid !important;
  place-items: center !important;
}

html.totem-child-document .esp-modal-btn,
html.totem-child-document .esp-modal-btn-outline,
html.totem-child-document .resultados-btn,
html.totem-child-document .llamame-submit-btn,
html.totem-child-document .resultados-qr-back {
  min-height: 52px !important;
  font-size: 15px !important;
}

html.totem-child-document .agenda-overlay,
html.totem-child-document .esp-overlay,
html.totem-child-document .modal-overlay,
html.totem-child-document .resultados-modal-overlay,
html.totem-child-document .mpab-overlay {
  max-height: 100dvh;
  overscroll-behavior: contain;
}

html.totem-secondary-document .legal-content,
html.totem-secondary-document .legal-card {
  font-size: 17px;
}

@media (max-width: 900px) {
  html.totem-secondary-document body.site-body,
  html.totem-secondary-document body.app-layout { padding-top: 68px !important; }
}

@media (prefers-reduced-motion: reduce) {
  html.totem-child-document *,
  html.totem-child-document *::before,
  html.totem-child-document *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
