/* Layout fixes for Jahia vs demo.
   Loaded only on body.bootstrap5. Selectors stay on employer-block classes
   so homepage chrome, language pages, and non-employer help pages are unchanged. */

/* Download menus: Resources Printable Program Resources + enrollment brochure. */
/* Download menus overlay the next section (FAQ, etc.). Do not use
   overflow-x:hidden on the host — it forces overflow-y:auto and a scrollbar. */
body.bootstrap5 .cs-pi-section,
body.bootstrap5 .cs-pi-section .container,
body.bootstrap5 .cs-pi-section table,
body.bootstrap5 .cs-pi-section td,
body.bootstrap5 section:has(.cs-pi-section) {
  overflow: visible !important;
}
body.bootstrap5 .cs-htr .dropdown,
body.bootstrap5 .cs-htr .cs-printable-card__action.dropdown,
body.bootstrap5 .cs-printable .dropdown {
  position: relative !important;
  display: inline-block !important;
  overflow: visible !important;
}
body.bootstrap5 .cs-htr .dropdown-menu,
body.bootstrap5 .cs-printable .dropdown-menu {
  display: none;
  position: absolute !important;
  top: 100% !important;
  z-index: 2000;
  min-width: 180px;
  margin: 4px 0 0 !important;
  padding: 8px 0;
  list-style: none;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
}
body.bootstrap5 .cs-htr .dropdown-menu {
  right: 0;
  left: auto;
}
/* Enrollment brochure sits in a table cell — pin the menu under the button. */
body.bootstrap5 .cs-pi-section .cs-printable .dropdown-menu {
  left: 0 !important;
  right: auto !important;
}
body.bootstrap5 .cs-htr .dropdown.open > .dropdown-menu,
body.bootstrap5 .cs-htr .cs-printable-card__action.open > .dropdown-menu,
body.bootstrap5 .cs-printable .dropdown.open > .dropdown-menu {
  display: block !important;
}
body.bootstrap5 .cs-htr.cs-dropdown-open,
body.bootstrap5 .cs-htr__panel.cs-dropdown-open,
body.bootstrap5 .cs-htr__panel.cs-printable,
body.bootstrap5 .cs-printable.cs-dropdown-open {
  overflow: visible !important;
}

/* Need additional support? cards — only .cs-pi-support. */
body.bootstrap5 .cs-pi-support .cs-pi-support__card {
  text-align: left !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
}
body.bootstrap5 .cs-pi-support .cs-pi-support__icon,
body.bootstrap5 .cs-pi-support .cs-pi-support__icon svg,
body.bootstrap5 .cs-pi-support .cs-pi-support__icon img {
  width: 32px !important;
  height: 32px !important;
  max-width: 32px !important;
  max-height: 32px !important;
  margin: 0 0 1rem 0 !important;
  display: block !important;
}

/* Demo callouts on add-employee / enrollment / deductions / contributions. */
body.bootstrap5 .cs-pi-hero .cs-pi-callout,
body.bootstrap5 .hero-section .cs-pi-callout,
body.bootstrap5 .eligibility-section .cs-pi-callout,
body.bootstrap5 .cs-eligibility .cs-pi-callout,
body.bootstrap5 .cs-pi-section .cs-pi-callout {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  text-align: left !important;
  width: 100% !important;
  box-sizing: border-box;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
body.bootstrap5 .cs-pi-hero .cs-pi-callout:has(> table),
body.bootstrap5 .hero-section .cs-pi-callout:has(> table),
body.bootstrap5 .eligibility-section .cs-pi-callout:has(> table),
body.bootstrap5 .cs-eligibility .cs-pi-callout:has(> table),
body.bootstrap5 .cs-pi-section .cs-pi-callout:has(> table) {
  display: block !important;
}
body.bootstrap5 .cs-pi-hero .cs-pi-callout__body,
body.bootstrap5 .hero-section .cs-pi-callout__body,
body.bootstrap5 .eligibility-section .cs-pi-callout__body,
body.bootstrap5 .cs-eligibility .cs-pi-callout__body,
body.bootstrap5 .cs-pi-section .cs-pi-callout__body {
  display: flex !important;
  align-items: flex-start !important;
  text-align: left !important;
  gap: 1rem !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
}
body.bootstrap5 .cs-pi-callout--gold .cs-pi-callout__body {
  align-items: center !important;
}
body.bootstrap5 .cs-pi-hero .cs-pi-callout__icon,
body.bootstrap5 .cs-pi-hero .cs-pi-callout__icon img,
body.bootstrap5 .cs-pi-hero .cs-pi-callout__icon svg,
body.bootstrap5 .hero-section .cs-pi-callout__icon,
body.bootstrap5 .hero-section .cs-pi-callout__icon img,
body.bootstrap5 .hero-section .cs-pi-callout__icon svg,
body.bootstrap5 .eligibility-section .cs-pi-callout__icon,
body.bootstrap5 .eligibility-section .cs-pi-callout__icon img,
body.bootstrap5 .eligibility-section .cs-pi-callout__icon svg,
body.bootstrap5 .cs-eligibility .cs-pi-callout__icon,
body.bootstrap5 .cs-eligibility .cs-pi-callout__icon img,
body.bootstrap5 .cs-eligibility .cs-pi-callout__icon svg,
body.bootstrap5 .cs-pi-section .cs-pi-callout__icon,
body.bootstrap5 .cs-pi-section .cs-pi-callout__icon img,
body.bootstrap5 .cs-pi-section .cs-pi-callout__icon svg {
  width: 40px !important;
  height: 40px !important;
  max-width: 40px !important;
  max-height: 40px !important;
  flex-shrink: 0 !important;
}
@media (min-width: 1025px) {
  body.bootstrap5 .hero-section .cs-pi-callout-container,
  body.bootstrap5 .cs-pi-hero .cs-pi-callout-container,
  body.bootstrap5 .hero-section > .container,
  body.bootstrap5 .cs-pi-hero > .container {
    max-width: 66.666% !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}
body.bootstrap5 .eligibility-section .cs-pi-callout-container {
  max-width: 100% !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
#cs-pi-image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  background: rgba(0, 0, 0, 0.8);
  padding: 24px;
  box-sizing: border-box;
}
#cs-pi-image-lightbox[hidden] {
  display: none !important;
}
#cs-pi-image-lightbox .cs-pi-image-lightbox__img {
  max-width: min(96vw, 1100px);
  max-height: 80vh;
  width: auto !important;
  height: auto !important;
  object-fit: contain;
  background: #fff;
  border-radius: 4px;
}
#cs-pi-image-lightbox .cs-pi-image-lightbox__close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #00594f;
  color: #fff;
  border: 0;
  border-radius: 4px;
  padding: 8px 16px;
  font-weight: 600;
  cursor: pointer;
}
body.bootstrap5 .cs-pi-zoomable-wrap,
body.bootstrap5 img.cs-pi-zoomable,
body.bootstrap5 img.cs-pi-accordion__screenshot {
  cursor: zoom-in !important;
  pointer-events: auto !important;
}

body.bootstrap5 .cs-pi-callout--flush td {
  vertical-align: middle !important;
}
body.bootstrap5 .cs-pi-callout--flush .cs-pi-callout__title {
  margin: 0 !important;
}
@media (max-width: 767.98px) {
  body.bootstrap5 .cs-pi-hero .cs-pi-callout,
  body.bootstrap5 .hero-section .cs-pi-callout,
  body.bootstrap5 .eligibility-section .cs-pi-callout,
  body.bootstrap5 .cs-eligibility .cs-pi-callout,
  body.bootstrap5 .cs-pi-section .cs-pi-callout {
    flex-direction: column !important;
    align-items: flex-start !important;
  }
}

/* Welcome-packet steps on enrollment. */
body.bootstrap5 .cs-pi-section .cs-pi-step-item,
body.bootstrap5 .cs-pi-hero .cs-pi-step-item {
  display: block !important;
  padding: 2px 0 !important;
}
body.bootstrap5 .cs-pi-section .cs-pi-step-num,
body.bootstrap5 .cs-pi-hero .cs-pi-step-num {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 20px !important;
  height: 20px !important;
  margin: 0 0.4rem !important;
  border-radius: 50% !important;
  background-color: #80641f !important;
  color: #fff !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  vertical-align: middle !important;
}

/* Contribution choose-method cards — match demo submitting-contributions.html */
body.bootstrap5 .eligibility-section .elig-card-body h2 {
  color: #000 !important;
  font-weight: 500 !important;
}
body.bootstrap5 .eligibility-section .elig-card-body p,
body.bootstrap5 .eligibility-section .elig-card-body strong {
  color: #6b6b6b !important;
  font-weight: 700;
}
body.bootstrap5 .eligibility-section .elig-card-body p {
  font-weight: 400 !important;
}
body.bootstrap5 .eligibility-section .elig-card-body strong {
  font-weight: 700 !important;
}
body.bootstrap5 .eligibility-section ul.cs-bullets,
body.bootstrap5 .cs-eligibility ul.cs-bullets {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  color: #000 !important;
}
body.bootstrap5 .eligibility-section .cs-bullets__item,
body.bootstrap5 .cs-eligibility .cs-bullets__item {
  display: flex !important;
  align-items: flex-start !important;
  gap: 0.75rem !important;
  padding: 0.25rem 0 !important;
  margin: 0 !important;
  color: #000 !important;
}
body.bootstrap5 .eligibility-section .cs-bullets__title,
body.bootstrap5 .cs-eligibility .cs-bullets__title {
  color: #000 !important;
  font-size: 1rem !important;
  font-weight: 400 !important;
}
body.bootstrap5 .eligibility-section .cs-bullets--gold .cs-bullets__icon,
body.bootstrap5 .cs-eligibility .cs-bullets--gold .cs-bullets__icon {
  color: #80641f !important;
  width: 22px !important;
  height: 22px !important;
  flex-shrink: 0 !important;
}

/* Administrator permissions table only. */
body.bootstrap5 .cs-pi-permissions-table tbody td:not(:first-child) {
  text-align: center !important;
  vertical-align: middle !important;
}
body.bootstrap5 .cs-pi-permissions-table td img,
body.bootstrap5 .cs-pi-permissions-table td svg {
  width: 22px !important;
  height: 22px !important;
  max-width: 22px !important;
  max-height: 22px !important;
  display: inline-block !important;
  margin: 0 auto !important;
  vertical-align: middle !important;
}
