.contact-us-form-overlay {
  display: none;
}

.contact-us-form-overlay:target,
body:has(#contact-form:target) .contact-us-form-overlay,
body:has(#contact:target) .contact-us-form-overlay,
.contact-us-form-overlay.is-visible {
  display: flex !important;
  position: fixed;
  inset: 0;
  align-items: center;
  justify-content: center;
  z-index: 9998;
}

.contact-us-form-overlay,
.contact-us-form-container,
.contact-form-container {
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}

.contact-us-form-overlay .overlay-bg {
  /* Match the light background used on blog/index so the modal appears consistent */
  background-color: #fff;
}

/* Ensure the contact form modal is centered and the close icon anchors to it */
.contact-us-form-container {
  position: relative !important; /* override fixed positioning from base css */
  inset: auto !important;
  align-self: center;
}

.icon-button.close-contact-form {
  top: 16px !important;
}

.w-form-done,
.w-form-fail {
  display: none;
}

.contact-us-form-container:has(.w-form-done[style*="display: block"]) {
  padding: 0;
  width: 0;
  height: 0;
}

.contact-us-form-container:has(.w-form-done[style*="display: block"]) > h2,
.contact-us-form-container:has(.w-form-done[style*="display: block"])
  > .icon-button,
.contact-us-form-container:has(.w-form-done[style*="display: block"])
  > .contact-form-header-wrapper,
.contact-us-form-container:has(.w-form-done[style*="display: block"])
  > .contact-form-tabs {
  display: none;
}

.contact-us-form-container:has(.w-form-done[style*="display: block"]) form {
  display: none !important;
}

.contact-us-form-overlay:has(.w-form-done[style*="display: block"]) {
  background-color: transparent;
  width: 0;
  height: 0;
  padding: 0;
}

.contact-us-form-overlay:has(.w-form-done[style*="display: block"])
  .overlay-bg {
  width: 0;
  height: 0;
  background-color: transparent;
}

.contact-us-form-container:has(.w-form-fail[style*="display: block"]) {
  padding: 0;
  width: 0;
  height: 0;
}

.contact-us-form-container:has(.w-form-fail[style*="display: block"]) > h2,
.contact-us-form-container:has(.w-form-fail[style*="display: block"])
  > .icon-button {
  display: none;
}

.contact-us-form-container:has(.w-form-fail[style*="display: block"]) form {
  display: none !important;
}

.contact-us-form-overlay:has(.w-form-fail[style*="display: block"]) {
  background-color: transparent;
  width: 0;
  height: 0;
  padding: 0;
}

.contact-us-form-overlay:has(.w-form-fail[style*="display: block"])
  .overlay-bg {
  width: 0;
  height: 0;
  background-color: transparent;
}

.segmented-control-tab[style*="background-color: rgb(255, 255, 255)"] {
  box-shadow: 0 2.5px 5px rgba(0, 0, 0, 0.05);
}

.segmented-control-tab[style*="background-color: rgb(255, 255, 255)"]
  > div
  > #stroke-icon
  > path,
.segmented-control-tab[style*="background-color: rgb(255, 255, 255)"]
  > div
  > #outline-icon
  > path {
  stroke: #0a0a0a !important;
  fill: #0a0a0a !important;
}

/* Keep nav visible when contact modal is closed */
body.contact-open .w-nav {
  opacity: 0 !important;
  pointer-events: none !important;
}

body:not(.contact-open) .w-nav {
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* Hide blog card abstracts on the blog listing page only */

/* Ensure nav reappears after closing contact overlay on mobile */
body:not(.contact-open) .w-nav {
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* Hide abstracts on blog listing cards when a specific filter is active */
.filter-no-abstracts .blog-post-date {
  display: none !important;
}
