/*
 * Cabeçalhos persistentes do aplicativo Tua Pele.
 * A altura real é calculada por fixed-app-headers.js para impedir
 * espaços vazios e conteúdo escondido em páginas com headers diferentes.
 */
:root {
  --app-fixed-header-height: 0px;
  --app-fixed-top-stack-height: var(--app-fixed-header-height);
}

body.app-fixed-header-page > header.app-fixed-header {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  left: 0 !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  transform: none !important;
  z-index: 1300 !important;
  isolation: isolate;
  will-change: auto;
}

/* Barras que já eram sticky/fixed continuam imediatamente abaixo do header. */
body.app-fixed-header-page .app-header-companion,
body.app-fixed-header-page > .tab-nav,
body.app-fixed-header-page > .sales-period-strip,
body.app-fixed-header-page > .orders-filters,
body.app-fixed-header-page > .delivery-filters,
body.app-fixed-header-page .profile-tabs {
  top: var(--app-fixed-header-height) !important;
}

/* Âncoras e redirecionamentos não ficam escondidos sob o topo fixo. */
html.app-fixed-header-root {
  scroll-padding-top: calc(var(--app-fixed-top-stack-height) + 12px);
}

body.app-fixed-header-page [id] {
  scroll-margin-top: calc(var(--app-fixed-top-stack-height) + 12px);
}

/* Mantém o topo visualmente sólido durante a rolagem. */
body.app-fixed-header-page > header.app-fixed-header {
  background-clip: padding-box !important;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

@media print {
  body.app-fixed-header-page {
    padding-top: 0 !important;
  }

  body.app-fixed-header-page > header.app-fixed-header {
    position: static !important;
  }
}
