/* Happy2Office product navigation system — CRM + Invoice only.
   Purpose: two-level enterprise navigation without changing page content. */

html body.product-enterprise .h2o-shared-navbar.h2o-product-global {
  position: relative !important;
  top: auto !important;
  z-index: 1000 !important;
  height: 68px !important;
  min-height: 68px !important;
  background: #fff !important;
  border-bottom: 1px solid #ececec !important;
  box-shadow: none !important;
}

html body.product-enterprise .h2o-shared-navbar.h2o-product-global .nav-container {
  width: min(1280px, calc(100% - 64px)) !important;
  min-height: 68px !important;
  height: 68px !important;
  padding: 0 !important;
}

html body.product-enterprise .enterprise-product-nav,
html body.product-enterprise.product-crm .enterprise-product-nav,
html body.product-enterprise.product-invoice .enterprise-product-nav {
  position: sticky !important;
  top: 0 !important;
  z-index: 999 !important;
  height: 76px !important;
  min-height: 76px !important;
  margin: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(15, 23, 42, .08) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  overflow: visible !important;
  box-sizing: border-box !important;
}

html body.product-enterprise.product-scrolled .enterprise-product-nav,
html body.product-enterprise.product-scrolled.product-crm .enterprise-product-nav,
html body.product-enterprise.product-scrolled.product-invoice .enterprise-product-nav {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 1100 !important;
}

html body.product-enterprise.product-crm .enterprise-product-nav,
html body.product-enterprise.product-crm.product-scrolled .enterprise-product-nav {
  background: linear-gradient(90deg, #fff6f4 0%, #f5fffc 55%, #eaf4ff 100%) !important;
}

html body.product-enterprise.product-invoice .enterprise-product-nav,
html body.product-enterprise.product-invoice.product-scrolled .enterprise-product-nav {
  background: linear-gradient(90deg, #fff3e4 0%, #fbfffb 55%, #edf7ff 100%) !important;
}

html body.product-enterprise .enterprise-product-nav .container,
html body.product-enterprise.product-crm .enterprise-product-nav .container,
html body.product-enterprise.product-invoice .enterprise-product-nav .container,
html body.product-enterprise.product-scrolled .enterprise-product-nav .container,
html body.product-enterprise.product-scrolled.product-crm .enterprise-product-nav .container,
html body.product-enterprise.product-scrolled.product-invoice .enterprise-product-nav .container {
  width: min(1280px, calc(100% - 64px)) !important;
  height: 76px !important;
  min-height: 76px !important;
  margin: 0 auto !important;
  padding: 0 !important;
  display: grid !important;
  grid-template-columns: 330px minmax(420px, 1fr) auto !important;
  align-items: center !important;
  gap: 32px !important;
  box-sizing: border-box !important;
}

html body.product-enterprise .product-wordmark,
html body.product-enterprise.product-crm .product-wordmark,
html body.product-enterprise.product-invoice .product-wordmark,
html body.product-enterprise.product-scrolled .product-wordmark,
html body.product-enterprise.product-scrolled.product-crm .product-wordmark,
html body.product-enterprise.product-scrolled.product-invoice .product-wordmark {
  width: 330px !important;
  min-width: 0 !important;
  height: 76px !important;
  min-height: 76px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  overflow: visible !important;
  padding: 0 !important;
  margin: 0 !important;
  line-height: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

html body.product-enterprise .product-wordmark img,
html body.product-enterprise.product-crm .product-wordmark img,
html body.product-enterprise.product-invoice .product-wordmark img,
html body.product-enterprise.product-scrolled .product-wordmark img,
html body.product-enterprise.product-scrolled.product-crm .product-wordmark img,
html body.product-enterprise.product-scrolled.product-invoice .product-wordmark img {
  display: block !important;
  width: auto !important;
  height: 58px !important;
  max-height: 58px !important;
  max-width: 300px !important;
  object-fit: contain !important;
  object-position: left center !important;
  clip-path: none !important;
  transform: none !important;
  filter: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

html body.product-enterprise.product-invoice .product-wordmark img,
html body.product-enterprise.product-scrolled.product-invoice .product-wordmark img {
  height: 54px !important;
  max-height: 54px !important;
  max-width: 310px !important;
}

.product-enterprise .product-nav-links {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 32px !important;
  min-width: 0 !important;
  white-space: nowrap !important;
}

.product-enterprise .product-nav-links a,
.product-enterprise .product-nav-actions a {
  font-family: "DM Sans", Inter, system-ui, sans-serif !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  color: #0f172a !important;
  text-transform: none !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 0 !important;
  margin: 0 !important;
}

.product-enterprise .product-nav-links a:hover {
  color: #0f766e !important;
}

.product-enterprise .product-nav-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 14px !important;
  white-space: nowrap !important;
}

.product-enterprise .product-nav-actions a {
  min-height: 44px !important;
  padding: 0 26px !important;
  border-radius: 999px !important;
  border: 1px solid #d8e2ee !important;
  background: #fff !important;
  box-shadow: none !important;
  font-weight: 800 !important;
}

.product-enterprise.product-crm .product-nav-actions a:last-child,
.product-enterprise.product-crm.product-scrolled .product-nav-actions a:last-child {
  color: #fff !important;
  border: 0 !important;
  background: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%) !important;
}

.product-enterprise.product-invoice .product-nav-actions a:last-child,
.product-enterprise.product-invoice.product-scrolled .product-nav-actions a:last-child {
  color: #111827 !important;
  border: 0 !important;
  background: linear-gradient(135deg, #ff6b35 0%, #ffb020 100%) !important;
}

.product-enterprise.product-scrolled .h2o-shared-navbar,
.product-enterprise.product-scrolled .h2o-shared-navbar.h2o-product-global {
  transform: none !important;
  opacity: 1 !important;
}

.product-enterprise .enterprise-hero,
.product-enterprise.product-crm .enterprise-hero,
.product-enterprise.product-invoice .enterprise-hero {
  margin-top: 0 !important;
  padding-top: 96px !important;
}

@media (max-width: 1180px) {
  .product-enterprise .enterprise-product-nav .container,
  .product-enterprise.product-crm .enterprise-product-nav .container,
  .product-enterprise.product-invoice .enterprise-product-nav .container {
    grid-template-columns: 280px 1fr auto !important;
    gap: 22px !important;
  }

  .product-enterprise .product-nav-links {
    gap: 20px !important;
  }

  .product-enterprise .product-wordmark {
    width: 280px !important;
  }

  .product-enterprise .product-wordmark img {
    max-width: 260px !important;
  }
}

@media (max-width: 920px) {
  .product-enterprise .h2o-shared-navbar.h2o-product-global .nav-container,
  .product-enterprise .enterprise-product-nav .container,
  .product-enterprise.product-crm .enterprise-product-nav .container,
  .product-enterprise.product-invoice .enterprise-product-nav .container {
    width: min(100% - 28px, 1280px) !important;
  }

  .product-enterprise .enterprise-product-nav,
  .product-enterprise.product-crm .enterprise-product-nav,
  .product-enterprise.product-invoice .enterprise-product-nav {
    height: auto !important;
    min-height: 76px !important;
  }

  .product-enterprise .enterprise-product-nav .container,
  .product-enterprise.product-crm .enterprise-product-nav .container,
  .product-enterprise.product-invoice .enterprise-product-nav .container {
    height: auto !important;
    min-height: 76px !important;
    grid-template-columns: 1fr !important;
    gap: 14px !important;
    align-items: start !important;
    padding: 10px 0 14px !important;
  }

  .product-enterprise .product-wordmark,
  .product-enterprise.product-crm .product-wordmark,
  .product-enterprise.product-invoice .product-wordmark {
    width: 100% !important;
    height: 56px !important;
    min-height: 56px !important;
  }

  .product-enterprise .product-wordmark img,
  .product-enterprise.product-crm .product-wordmark img,
  .product-enterprise.product-invoice .product-wordmark img {
    height: 46px !important;
    max-height: 46px !important;
    max-width: 245px !important;
  }

  .product-enterprise .product-nav-links,
  .product-enterprise .product-nav-actions {
    justify-content: flex-start !important;
    overflow-x: auto !important;
    max-width: 100% !important;
    padding-bottom: 4px !important;
  }
}

@media (max-width: 560px) {
  .product-enterprise .product-nav-links {
    gap: 16px !important;
  }

  .product-enterprise .product-nav-actions a {
    min-height: 40px !important;
    padding: 0 18px !important;
  }
}

/* Final guard against older product-page scroll rules that shrink the header. */
body.product-enterprise.product-scrolled .enterprise-product-nav,
body.product-enterprise.product-scrolled.product-crm .enterprise-product-nav,
body.product-enterprise.product-scrolled.product-invoice .enterprise-product-nav {
  height: 76px !important;
  min-height: 76px !important;
}

body.product-enterprise.product-scrolled .enterprise-product-nav .container,
body.product-enterprise.product-scrolled.product-crm .enterprise-product-nav .container,
body.product-enterprise.product-scrolled.product-invoice .enterprise-product-nav .container {
  height: 76px !important;
  min-height: 76px !important;
}

body.product-enterprise.product-scrolled .product-wordmark,
body.product-enterprise.product-scrolled.product-crm .product-wordmark,
body.product-enterprise.product-scrolled.product-invoice .product-wordmark {
  height: 76px !important;
  min-height: 76px !important;
}

body.product-enterprise.product-scrolled .product-wordmark img,
body.product-enterprise.product-scrolled.product-crm .product-wordmark img {
  height: 58px !important;
  max-height: 58px !important;
}

body.product-enterprise.product-scrolled.product-invoice .product-wordmark img {
  height: 54px !important;
  max-height: 54px !important;
}

body.product-enterprise.product-crm .product-wordmark img[src*="happy2crm-product-wordmark-v2"],
body.product-enterprise.product-scrolled.product-crm .product-wordmark img[src*="happy2crm-product-wordmark-v2"] {
  width: auto !important;
  height: 58px !important;
  max-width: 300px !important;
  max-height: 58px !important;
}

body.product-enterprise.product-invoice .product-wordmark img[src*="happy2invoice-product-wordmark-v2"],
body.product-enterprise.product-scrolled.product-invoice .product-wordmark img[src*="happy2invoice-product-wordmark-v2"] {
  width: auto !important;
  height: 54px !important;
  max-width: 310px !important;
  max-height: 54px !important;
}
