/* Reusable info popover: yellow background + black text.
   Intentionally lightweight and non-checkout-scoped so it can be reused across the home page.
*/

.hec-info-popover-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  overflow: visible;
}

.hec-info-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  color: #5448f0;
  cursor: pointer;
  line-height: 1;
  user-select: none;
}

.hec-info-trigger:focus-visible {
  outline: 2px solid #111827;
  outline-offset: 2px;
  border-radius: 6px;
}

.hec-info-trigger__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #5448f0;
}

.hec-info-trigger__icon i {
  color: red;
}

/* Popover bubble */
.hec-info-popover {
  position: absolute;
  left: calc(100% + 10px);
  right: auto;
  top: 50%;
  bottom: auto;
  z-index: 50;
  width: min(360px, calc(100vw - 48px));
  max-width: 360px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #facc15;
  color: #111827;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  text-align: left;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.22);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(calc(-50% + 4px));
  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    visibility 0.18s ease;
}

.hec-info-popover::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -6px;
  right: auto;
  bottom: auto;
  transform: translateY(-50%);
  border-width: 6px 6px 6px 0;
  border-style: solid;
  border-color: transparent #facc15 transparent transparent;
}

.hec-info-popover-wrap.is-open .hec-info-popover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(-50%);
}

/* Also open on hover (desktop) and focus-within (keyboard). */
@media (hover: hover) and (pointer: fine) {
  .hec-info-popover-wrap:hover .hec-info-popover {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(-50%);
  }
}

.hec-info-popover-wrap:focus-within .hec-info-popover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(-50%);
}

/* Mobile: only .is-open controls visibility (positioned by info-popover.js). */
@media (max-width: 768px) {
  .webtraffic-form .section-header,
  .webtraffic-form .section-title,
  .webtraffic-form .h5-title,
  .webtraffic-form .service-section-title,
  .webtraffic-form .service-step-section {
    overflow: visible;
  }

  .hec-info-popover,
  .hec-assist-popover {
    transition: none;
  }

  .hec-info-popover-wrap:focus-within:not(.is-open) .hec-info-popover,
  .hec-assist-popover-wrap:focus-within:not(.is-open) .hec-assist-popover {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  .hec-info-popover-wrap.is-open,
  .hec-assist-popover-wrap.is-open {
    z-index: 100001;
  }

  .hec-info-popover-wrap.is-open .hec-info-popover,
  .hec-assist-popover-wrap.is-open .hec-assist-popover {
    z-index: 100001;
    font-size: 13px;
    line-height: 1.45;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.28);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none !important;
  }

  .hec-info-popover-wrap.is-open .hec-info-popover::before,
  .hec-assist-popover-wrap.is-open .hec-assist-popover::before {
    display: none;
  }
}

/* Blue pill badge used for dynamic per-day values (e.g., 333/day). */
.hec-info-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  margin-left: 8px;
  border-radius: 999px;
  background: #2563eb;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .hec-info-popover:not([style*="position: fixed"]) {
    left: 0;
    right: auto;
    top: calc(100% + 8px);
    width: min(280px, calc(100vw - 32px));
    max-width: calc(100vw - 32px);
    transform: none;
  }
}

/* Order summary domain link: full URL popover (checkout, order received, order pay). */
.hec-website-url-popover-wrap {
  position: relative;
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: visible;
}

.hec-website-url-popover {
  position: absolute;
  right: 0;
  left: auto;
  top: calc(100% + 10px);
  bottom: auto;
  z-index: 60;
  width: max-content;
  max-width: min(360px, calc(100vw - 32px));
  padding: 10px 12px;
  border-radius: 10px;
  background: #c2b9fd;
  color: #000000;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  box-shadow: 0 10px 26px rgba(91, 75, 235, 0.18);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    visibility 0.18s ease;
}

.hec-website-url-popover::before {
  content: "";
  position: absolute;
  top: -6px;
  bottom: auto;
  right: 14px;
  left: auto;
  border-width: 0 6px 6px 6px;
  border-style: solid;
  border-color: transparent transparent #c2b9fd transparent;
}

@media (hover: hover) and (pointer: fine) {
  .hec-website-url-popover-wrap:hover .hec-website-url-popover {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }
}

.hec-website-url-popover-wrap:focus-within .hec-website-url-popover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.checkout-item-website:has(.hec-website-url-popover-wrap:hover),
.checkout-item-website:has(.hec-website-url-popover-wrap:focus-within) {
  overflow: visible;
  z-index: 5;
}

@media (max-width: 520px) {
  .hec-website-url-popover:not([style*="position: fixed"]) {
    right: auto;
    left: 0;
    width: min(360px, calc(100vw - 32px));
    max-width: calc(100vw - 32px);
  }

  .hec-website-url-popover:not([style*="position: fixed"])::before {
    right: auto;
    left: 14px;
  }
}

@media (max-width: 768px) {
  .hec-website-url-popover-wrap.is-open {
    z-index: 100001;
  }

  .hec-website-url-popover-wrap.is-open .hec-website-url-popover {
    z-index: 100001;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none !important;
    transition: none;
    box-shadow: 0 16px 40px rgba(91, 75, 235, 0.28);
  }

  .hec-website-url-popover-wrap.is-open .hec-website-url-popover::before {
    display: none;
  }

  @media (hover: none), (pointer: coarse) {
    .hec-website-url-popover-wrap:focus-within:not(.is-open)
      .hec-website-url-popover {
      opacity: 0 !important;
      visibility: hidden !important;
      pointer-events: none !important;
    }
  }
}
