/* Front-end popup visuals. */
html.inventive--popover-open,
html.inventive--popover-open body {
    overflow: hidden;
}

[data-inventive-popover] {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

[data-inventive-popover][hidden] {
    display: none !important;
}

.inventive-popover__close {
    position: absolute;
    top: 0.25rem;
    right: 0.5rem;
    background: none;
    border: 0;
    font-size: 1.5rem;
    line-height: 1;
    color: #000;
    cursor: pointer;
}

.inventive-popover__body {
    min-width: 0;
}

.inventive-popover__body :where(img, iframe, video, canvas, svg) {
    max-width: 100%;
}

.inventive-popover__body :where(input, textarea, select, button) {
    max-width: 100%;
    box-sizing: border-box;
}

.inventive-popover__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.3);
    z-index: 9999;
}

[data-inventive-popover][data-inventive-hover="1"] .inventive-popover__backdrop {
    display: none !important;
    pointer-events: none;
}

.inventive-popover__inner {
    position: relative;
    z-index: 10000;
    box-sizing: border-box;
    width: calc(100vw - 2rem);
    height: auto;
    max-height: calc(100vh - 2rem);
    max-height: calc(100dvh - 2rem);
    overflow: auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    background: #fff;
    color: #000;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,.3);
    padding: 1.25rem;
}

@media (max-width: 600px) {
    .inventive-popover__inner {
        width: calc(100vw - 1rem);
        max-height: calc(100vh - 1rem);
        max-height: calc(100dvh - 1rem);
        padding: 0.875rem;
        border-radius: 10px;
    }

    .inventive-popover__close {
        position: sticky;
        top: 0;
        float: right;
        z-index: 2;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.25rem;
        height: 2.25rem;
        margin: -0.5rem -0.5rem 0.25rem 0.75rem;
        background: rgba(255,255,255,.95);
        border: 1px solid rgba(0,0,0,.12);
        border-radius: 999px;
        box-shadow: 0 2px 8px rgba(0,0,0,.12);
    }

    .inventive-popover__body :where(h1, h2) {
        font-size: clamp(2rem, 10vw, 3.25rem);
        line-height: 1.05;
    }

    .inventive-popover__body :where(h3, h4) {
        font-size: clamp(1.35rem, 7vw, 2rem);
        line-height: 1.15;
    }

    .inventive-popover__body :where(p, ul, ol, .gform_validation_errors, .validation_message, .gfield_validation_message) {
        margin-top: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .inventive-popover__body :where(input, textarea, select) {
        min-height: 2.75rem;
    }
}

[data-inventive-popover]:not([hidden]) .inventive-popover__inner:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* Only show the arrow when the popup is set to hover mode. */
[data-inventive-popover][data-inventive-hover="1"] .inventive-popover__inner {
    position: fixed;
}

[data-inventive-popover][data-inventive-hover="1"] .inventive-popover__inner::after {
  content: "";
  position: absolute;
  top: -7px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid #fff;
  z-index: 1;
  pointer-events: none;
}

[data-inventive-popover][data-inventive-hover="1"] .inventive-popover__inner::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 10px solid rgba(0,0,0,0.25);
  filter: blur(0.2px);
  z-index: 0;
  pointer-events: none;
}
