/* =============================================================================
   Banner
   ============================================================================= */

.ha-banner {
  width: 100%;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 8;
  overflow: hidden;
  text-align: center;
}

.ha-banner--shortcode {
  display: block;
}

.ha-banner[data-link-url] {
  cursor: pointer;
}

.ha-banner__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
}

.ha-banner__content {
  flex: 1;
  min-width: 0;
}

.ha-banner__title {
  margin: 0;
  font-size: 1.5rem;
  color: inherit;
}

.ha-banner__message a {
  color: #66C4EB;
  text-decoration: none;
}

.ha-banner__message a:hover {
  color: #4DA8C8;
}

.ha-banner__subtitle {
  margin: 0.25rem 0 0;
  font-size: 1rem;
  color: inherit;
}

.ha-banner__message p {
  margin: 0.25rem 0 0;
  color: inherit;
}

.ha-banner__cta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ha-banner__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  font-size: 1rem;
  text-decoration: none;
  color: inherit;
}

/* =============================================================================
   Popup
   ============================================================================= */

dialog.ha-popup {
  margin: auto;
  padding: 2rem;
  width: min(520px, calc(100vw - 2rem));
  max-height: 80vh;
  overflow-y: auto;
  border: none;
  background: #fff;
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

@starting-style {
  dialog.ha-popup[open] {
    opacity: 0;
    transform: scale(0.95);
  }
}

dialog.ha-popup::backdrop {
  background: rgba(0, 0, 0, 0.8);
  opacity: 1;
  transition: opacity 0.25s ease;
}

@starting-style {
  dialog.ha-popup[open]::backdrop {
    opacity: 0;
  }
}

dialog.ha-popup.is-closing {
  opacity: 0;
  transform: scale(0.95);
}

dialog.ha-popup.is-closing::backdrop {
  opacity: 0;
}

.ha-popup__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: transparent;
  border: 0;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.ha-popup__content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ha-popup__title {
  margin: 0;
}

.ha-popup__subtitle {
  margin: 0;
}

.ha-popup__message p {
  margin: 0;
  font-size: 2rem;
  line-height: 2.5rem;
  font-family: "Mulish", sans-serif;
}

.ha-popup__media img {
  width: 100%;
  height: auto;
}

.ha-popup__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ha-popup__primary,
.ha-popup__secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  text-decoration: none;
  cursor: pointer;
}

dialog.ha-popup[data-link-url] {
  cursor: pointer;
}

body.bap-popup-open {
  overflow: hidden;
}

/* =============================================================================
   Popup — Split template
   ============================================================================= */

dialog.ha-popup--template-split {
  width: min(800px, calc(100vw - 1rem));
  padding: 0;
}

dialog.ha-popup--template-split[open] .ha-popup__inner {
  display: flex;
  min-height: 408px;
  max-height: 90vh;
  overflow: hidden;
}

.ha-popup__panel {
  flex: 0 0 50%;
  overflow: hidden;
}

.ha-popup__panel--left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.5rem;
  padding: 2.5rem;
  color: #fff;
}

.ha-popup__panel--left .ha-popup__title,
.ha-popup__panel--left .ha-popup__subtitle,
.ha-popup__panel--left .ha-popup__message {
  color: inherit;
  margin: 0;
}

.ha-popup__panel--right {
  position: relative;
}

.ha-popup__panel-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* pseudo elements for the close button */
dialog.ha-popup--template-split .ha-popup__close {
  position: absolute;
  top: 36px;
  right: 24px;
  color: #fff;
  z-index: 1;
  /* text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); */
  text-indent: -9999px;
  width: 24px;
  height: 24px;
}

dialog.ha-popup--template-split .ha-popup__close::before,
dialog.ha-popup--template-split .ha-popup__close::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #fff;
  transform: rotate(45deg);
}

dialog.ha-popup--template-split .ha-popup__close::before {
  transform: rotate(-45deg);
}

dialog.ha-popup--template-split .ha-popup__close::after {
  transform: rotate(45deg);
}

dialog.ha-popup--template-split .ha-popup__primary {
  display: block;
  width: 100%;
  background-color: #009cde;
  color: #fff;
  text-align: center;
  padding: 1.25rem;
  border-radius: 4px;
  text-decoration: none;
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 500;
  font-family: "Mulish", sans-serif;
  transition: background-color 0.25s ease;
}

dialog.ha-popup--template-split .ha-popup__primary:hover {
  background-color: #0080b3;
}

@media (max-width: 1199.98px) {
  body:has(section[name="communities-single"]) .ha-banner {
    margin-top: 76px;
  }
}

@media (max-width: 768px) {
  dialog.ha-popup--template-split {
    width: calc(100vw - 2rem);
    max-width: calc(100vw - 2rem);
    margin: auto;
    max-height: 90vh;
  }

  dialog.ha-popup--template-split[open] .ha-popup__inner {
    flex-direction: column;
    height: auto;
    max-height: 90vh;
    overflow-y: auto;
  }

  .ha-popup__panel {
    flex: none;
    width: 100%;
  }

  .ha-popup__panel--right {
    order: -1;
    height: 200px;
  }

  .ha-popup__panel-image {
    position: absolute;
  }
}