/* Keep modal titles and their close actions in separate, predictable areas. */
.overlay .popup .flex.items-center.justify-center.relative.mb-8:has(> h4) {
  position: relative !important;
  width: 100% !important;
  min-height: 40px;
  padding-inline: 46px !important;
}

.overlay .popup .flex.items-center.justify-center.relative.mb-8:has(> h4) > h4 {
  min-width: 0;
  max-width: 100%;
  text-align: center;
  line-height: 1.25;
}

.overlay .popup .flex.items-center.justify-center.relative.mb-8:has(> h4) > .close-btn {
  position: absolute !important;
  top: 50% !important;
  right: 0 !important;
  left: auto !important;
  display: grid !important;
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  min-height: 38px !important;
  padding: 9px !important;
  place-items: center;
  border-radius: 10px;
  color: #2a313c;
  cursor: pointer;
  transform: translateY(-50%) !important;
  transition: background-color 160ms ease, color 160ms ease;
  z-index: 3;
}

.overlay .popup .flex.items-center.justify-center.relative.mb-8:has(> h4) > .close-btn:hover {
  background: #f2f4f7;
  color: #111827;
}

.overlay .popup .flex.items-center.justify-center.relative.mb-8:has(> h4) > .close-btn:focus-visible {
  outline: 2px solid #ef3940;
  outline-offset: 2px;
}

@media (max-width: 480px) {
  .overlay .popup .flex.items-center.justify-center.relative.mb-8:has(> h4) {
    padding-inline: 42px !important;
  }

  .overlay .popup .flex.items-center.justify-center.relative.mb-8:has(> h4) > .close-btn {
    top: 50% !important;
    right: 0 !important;
  }
}
