/* Runtime-only behavior helpers for homepage mirror without plugin runtime JS. */
html,
body {
  margin: 0;
  padding: 0;
}

body > .ph-homepage-mirror {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Prevent the leading skip-link anchor from reserving space above header. */
body > .ph-homepage-mirror > a.skip-link.screen-reader-text,
body > .ph-homepage-mirror > a[href="#content"] {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  border: 0 !important;
}

.ph-site-header,
.ph-location-header {
  margin-top: 0 !important;
  top: 0;
}

.ph-nav-wrapper.is-open {
  display: flex;
  flex-direction: column;
}

.ph-invisible {
  visibility: visible;
  opacity: 1;
  transform: none;
}

.ph-nav-item .ph-nav-content {
  display: none;
}

.ph-nav-item:hover > .ph-nav-content,
.ph-nav-item:focus-within > .ph-nav-content,
.ph-nav-item.is-open > .ph-nav-content,
.ph-nav-content.is-open {
  display: flex;
  flex-direction: column;
}

[id^="ph-nav-content-"].is-open,
[id^="ph-nav-content-"].is-active {
  display: flex;
}

/* Ensure desktop hover works instantly even before JS class toggles run. */
.ph-nav-item:hover > .ph-nav-content > [id^="ph-nav-content-"],
.ph-nav-item:focus-within > .ph-nav-content > [id^="ph-nav-content-"],
.ph-nav-item.is-open > .ph-nav-content > [id^="ph-nav-content-"] {
  display: flex;
}

/* Reduce perceived mega-menu delay on open. */
.header-menu {
  --n-menu-open-animation-duration: 0ms;
}

@media (min-width: 1025px) {
  .header-menu .ph-nav-menu {
    position: relative;
  }

  .header-menu .ph-nav-item {
    position: static;
  }

  .header-menu .ph-nav-item > .ph-nav-content {
    position: absolute;
    top: 100%;
    left: var(--stretch-left, 0);
    right: auto;
    width: var(--stretch-width, 100vw);
    max-width: var(--stretch-width, 100vw);
    z-index: 2147483620;
  }

  .header-menu .ph-nav-item > .ph-nav-content > [id^="ph-nav-content-"] {
    width: 100%;
    max-width: none;
    margin-top: 10px;
    animation: none !important;
  }
}

.ph-tabs .ph-tab-title {
  cursor: pointer;
}

/* Treatments tabs: lock active state contrast so selected category is always readable. */
.treatments-mega-menu .ph-tab-title[aria-selected="true"],
.treatments-mega-menu .e-n-tab-title[aria-selected="true"] {
  background-color: #ffc53a !important;
  border-color: #d7a62e !important;
  color: #1f211d !important;
}

.treatments-mega-menu .ph-tab-title[aria-selected="true"] .ph-tab-title-text,
.treatments-mega-menu .e-n-tab-title[aria-selected="true"] .e-n-tab-title-text {
  color: #1f211d !important;
}

.treatments-mega-menu .ph-tab-title[aria-selected="false"],
.treatments-mega-menu .e-n-tab-title[aria-selected="false"] {
  color: #e2e8f0;
}

.treatments-mega-menu .ph-tab-title[aria-selected="false"] .ph-tab-title-text,
.treatments-mega-menu .e-n-tab-title[aria-selected="false"] .e-n-tab-title-text {
  color: #e2e8f0;
}

/* Global CTA contrast guard:
   button-style links should keep their intended foreground color instead of
   falling back to generic anchor colors in nested spans/icons or pseudo-states. */
a.ph-labs-btn,
a.ph-labs-btn:visited,
a.ph-labs-btn:hover,
a.ph-labs-btn:focus-visible,
a.ph-labs-btn:active,
a.ph-treatments-btn,
a.ph-treatments-btn:visited,
a.ph-treatments-btn:hover,
a.ph-treatments-btn:focus-visible,
a.ph-treatments-btn:active,
a.ph-button.ph-button-link,
a.ph-button.ph-button-link:visited,
a.ph-button.ph-button-link:hover,
a.ph-button.ph-button-link:focus-visible,
a.ph-button.ph-button-link:active,
a.get-started-btn,
a.get-started-btn:visited,
a.get-started-btn:hover,
a.get-started-btn:focus-visible,
a.get-started-btn:active,
a.login-btn,
a.login-btn:visited,
a.login-btn:hover,
a.login-btn:focus-visible,
a.login-btn:active {
  -webkit-text-fill-color: currentColor;
  text-decoration: none;
}

a.ph-labs-btn > span,
a.ph-labs-btn .ph-button-text,
a.ph-labs-btn .ph-button-content-wrapper,
a.ph-labs-btn svg,
a.ph-labs-btn i,
a.ph-treatments-btn > span,
a.ph-treatments-btn .ph-button-text,
a.ph-treatments-btn .ph-button-content-wrapper,
a.ph-treatments-btn svg,
a.ph-treatments-btn i,
a.ph-button.ph-button-link > span,
a.ph-button.ph-button-link .ph-button-text,
a.ph-button.ph-button-link .ph-button-content-wrapper,
a.ph-button.ph-button-link svg,
a.ph-button.ph-button-link i,
a.get-started-btn > span,
a.get-started-btn svg,
a.get-started-btn i,
a.login-btn > span,
a.login-btn svg,
a.login-btn i {
  color: inherit !important;
  fill: currentColor;
}

a.ph-button.ph-button-link:not(.ph-header-quick-btn-primary):not(.ph-header-quick-btn-secondary),
a.ph-button.ph-button-link:not(.ph-header-quick-btn-primary):not(.ph-header-quick-btn-secondary):visited,
a.get-started-btn,
a.get-started-btn:visited {
  color: #1f211d !important;
}

/* Header CTA layout. */
.ph-header-cta-stack {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 1024px) {
  .ph-header-cta-stack {
    gap: 6px;
  }
}

:is(.ph-site-header, .ph-location-header) .ph-header-quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 12px;
}

:is(.ph-site-header, .ph-location-header) .ph-header-quick-actions > .ph-widget {
  margin-block-end: 0 !important;
}

:is(.ph-site-header, .ph-location-header) .ph-header-quick-actions > .ph-widget-icon-list {
  grid-column: 1 / -1;
}

:is(.ph-site-header, .ph-location-header) .ph-header-quick-actions > .ph-widget-icon-list .ph-icon-list-items {
  display: grid;
  gap: 10px;
}

:is(.ph-site-header, .ph-location-header) .ph-header-quick-action {
  min-width: 0;
}

:is(.ph-site-header, .ph-location-header) .ph-header-quick-action .ph-button.ph-header-quick-btn {
  align-items: center;
  border-radius: 12px;
  border-width: 1px;
  display: inline-flex;
  font-size: 16px;
  font-weight: 700;
  justify-content: center;
  letter-spacing: 0.01em;
  min-height: 52px;
  padding: 14px 18px;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
  width: 100%;
}

:is(.ph-site-header, .ph-location-header) .ph-header-quick-action .ph-button.ph-header-quick-btn-primary,
:is(.ph-site-header, .ph-location-header) .ph-header-quick-action .ph-button.ph-header-quick-btn-primary:visited {
  background: linear-gradient(180deg, #2a6bb2 0%, #1f5c97 52%, #0f3f92 100%);
  border-color: #0f4f8b;
  box-shadow: 0 14px 28px rgba(15, 63, 146, 0.18);
  color: #ffffff !important;
  fill: #ffffff;
}

:is(.ph-site-header, .ph-location-header) .ph-header-quick-action .ph-button.ph-header-quick-btn-primary:hover,
:is(.ph-site-header, .ph-location-header) .ph-header-quick-action .ph-button.ph-header-quick-btn-primary:focus-visible {
  background: linear-gradient(180deg, #3477c0 0%, #2563a8 56%, #12488f 100%);
  border-color: #12488f;
  box-shadow: 0 18px 34px rgba(15, 63, 146, 0.24);
  color: #ffffff !important;
  transform: translateY(-1px);
}

:is(.ph-site-header, .ph-location-header) .ph-header-quick-action .ph-button.ph-header-quick-btn-secondary,
:is(.ph-site-header, .ph-location-header) .ph-header-quick-action .ph-button.ph-header-quick-btn-secondary:visited {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, #eef5ff 100%);
  border-color: #bfd3f0;
  box-shadow: 0 10px 22px rgba(15, 39, 65, 0.08);
  color: #0f3f92 !important;
  fill: #0f3f92;
}

:is(.ph-site-header, .ph-location-header) .ph-header-quick-action .ph-button.ph-header-quick-btn-secondary:hover,
:is(.ph-site-header, .ph-location-header) .ph-header-quick-action .ph-button.ph-header-quick-btn-secondary:focus-visible {
  background: linear-gradient(180deg, #ffffff 0%, #e4efff 100%);
  border-color: #8fb2e6;
  box-shadow: 0 14px 26px rgba(15, 39, 65, 0.12);
  color: #0b326f !important;
  transform: translateY(-1px);
}

:is(.ph-site-header, .ph-location-header) .ph-header-quick-action .ph-button.ph-header-quick-btn .ph-button-content-wrapper,
:is(.ph-site-header, .ph-location-header) .ph-header-quick-action .ph-button.ph-header-quick-btn .ph-button-text {
  color: inherit !important;
}

@media (max-width: 767px) {
  :is(.ph-site-header, .ph-location-header) .ph-header-quick-actions {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  :is(.ph-site-header, .ph-location-header) .ph-header-quick-action .ph-button.ph-header-quick-btn {
    min-height: 48px;
    padding: 12px 16px;
  }
}

a.ph-labs-btn-primary,
a.ph-labs-btn-primary:visited,
a.ph-labs-btn-primary:hover,
a.ph-labs-btn-primary:focus-visible,
a.ph-labs-btn-primary:active {
  color: #121212 !important;
}

a.ph-labs-btn-secondary,
a.ph-labs-btn-secondary:visited,
a.ph-labs-btn-secondary:hover,
a.ph-labs-btn-secondary:focus-visible,
a.ph-labs-btn-secondary:active {
  color: #ffffff !important;
}

a.ph-treatments-btn-primary,
a.ph-treatments-btn-primary:visited,
a.ph-treatments-btn-primary:hover,
a.ph-treatments-btn-primary:focus-visible,
a.ph-treatments-btn-primary:active {
  color: #1f211d !important;
}

a.ph-treatments-btn-secondary,
a.ph-treatments-btn-secondary:visited,
a.ph-treatments-btn-secondary:hover,
a.ph-treatments-btn-secondary:focus-visible,
a.ph-treatments-btn-secondary:active {
  color: #ffc53a !important;
}

a.ph-treatments-btn-secondary:hover {
  color: #1f211d !important;
}

/* Keep product rail full-width and keep CTA under cards on desktop. */
.treatments-mega-menu .ph-tabs-content > [id^="ph-tab-content-"] > .ph-element > .ph-layout-inner {
  display: flex;
  flex-direction: column;
}

.treatments-mega-menu .ph-tabs-content > [id^="ph-tab-content-"] .ph-element.ph-element-d717ae6 {
  width: 100%;
}

.treatments-mega-menu .ph-tabs-content > [id^="ph-tab-content-"] .ph-element.ph-element-5fad523 {
  width: 100%;
  margin-top: 14px;
}

.treatments-mega-menu .ph-tabs-content > [id^="ph-tab-content-"] .treatments-view-more {
  width: 100%;
}

.ph-tabs-content > [id^="ph-tab-content-"] {
  display: none;
}

.ph-tabs-content > .is-active {
  display: block;
}

/* Safety guard: never render multiple treatment panes at once. */
.treatments-mega-menu .ph-tabs-content > .ph-layout-container,
.treatments-mega-menu .ph-tabs-content > [id^="ph-tab-content-"] {
  display: none !important;
}

.treatments-mega-menu .ph-tabs-content > .is-active,
.treatments-mega-menu .ph-tabs-content > .e-active,
.treatments-mega-menu .ph-tabs-content > .is-active.e-active {
  display: flex !important;
}

/* Global treatments mega-menu image sizing:
   keep all product art in a consistent visual box across categories/devices. */
.treatments-mega-menu .product-image-menu {
  height: 176px;
  min-height: 176px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  box-sizing: border-box;
}

.treatments-mega-menu .product-image-menu img.main-image,
.treatments-mega-menu .product-image-menu img {
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  max-height: 100% !important;
  object-fit: contain;
  object-position: center;
  display: block;
  margin: 0 auto;
  transform: scale(1.08);
  transform-origin: center;
}

@media (max-width: 1024px) {
  .treatments-mega-menu .product-image-menu {
    height: 164px;
    min-height: 164px;
    padding: 9px;
  }
}

@media (max-width: 767px) {
  .treatments-mega-menu .product-image-menu {
    height: 152px;
    min-height: 152px;
    padding: 8px;
  }
}

/* Footer patient quick links + LegitScript badge */
.ph-site-footer .ph-element-b6e9100 {
  align-items: center;
  text-align: center;
}

.ph-site-footer .ph-element-b6e9100 > .ph-element {
  width: auto;
  max-width: 100%;
}

.ph-site-footer .ph-element-b6e9100 .ph-widget-image > a {
  display: inline-flex;
  justify-content: center;
}

.ph-site-footer .ph-footer-patient-actions {
  width: auto;
  margin-top: 8px;
}

.ph-site-footer .ph-footer-patient-actions .ph-icon-list-items {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 12px;
}

.ph-site-footer .ph-footer-patient-actions .ph-icon-list-item {
  margin: 0;
  padding: 0;
}

.ph-site-footer .ph-footer-patient-actions .ph-icon-list-item > a {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1px;
  color: #95a0b0;
  transition: color 0.2s ease;
}

.ph-site-footer .ph-footer-patient-actions .ph-icon-list-item > a:hover,
.ph-site-footer .ph-footer-patient-actions .ph-icon-list-item > a:focus-visible {
  color: #ffc53a;
}

.ph-site-footer .ph-element-19440de .ph-footer-legitscript {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0;
}

.ph-site-footer .ph-element-19440de .ph-footer-legitscript a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ph-site-footer .ph-element-19440de .ph-footer-legitscript img {
  width: 140px;
  height: auto;
  max-width: 100%;
  opacity: 0.52;
  filter: grayscale(1) brightness(0.82) contrast(0.9);
  mix-blend-mode: normal;
}

@media (max-width: 767px) {
  .ph-site-footer .ph-footer-patient-actions .ph-icon-list-items {
    justify-content: center;
  }

}
