html.shyita-perfex-lead-popup-open,
body.shyita-perfex-lead-popup-open {
    overflow: hidden !important;
}

.shyita-perfex-lead-popup {
    --shyita-perfex-frame-height: 650px;

    box-sizing: border-box;
    width: calc(100vw - 2rem);
    max-width: 680px;
    max-height: calc(100vh - 2rem);
    margin: auto;
    padding: 0;
    overflow: visible;
    color: inherit;
    border: 0;
    background: transparent;
}

.shyita-perfex-lead-popup:not([open]),
.shyita-perfex-lead-popup[data-open="false"] {
    display: none;
}

.shyita-perfex-lead-popup::backdrop {
    background: rgb(0 0 0 / 68%);
}

.shyita-perfex-lead-popup__dialog {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    overflow: hidden;
    border-radius: 3px;
    background: #fff;
    box-shadow: 0 18px 60px rgb(0 0 0 / 34%);
}

/*
 * Fixed-position fallback for browsers without HTMLDialogElement.showModal().
 * The same node stays in its original DOM position in both code paths.
 */
.shyita-perfex-lead-popup[data-shyita-native-dialog="false"][data-open="true"] {
    position: fixed;
    z-index: 100000;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: auto;
    max-width: none;
    height: auto;
    max-height: none;
    margin: 0;
    padding: 1rem;
    overflow: auto;
    overscroll-behavior: contain;
    background: rgb(0 0 0 / 68%);
}

.shyita-perfex-lead-popup[data-shyita-native-dialog="false"] .shyita-perfex-lead-popup__dialog {
    width: min(680px, calc(100vw - 2rem));
}

.shyita-perfex-lead-popup:focus {
    outline: none;
}

.shyita-perfex-lead-popup__focus-sentinel {
    position: fixed;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.shyita-perfex-lead-popup__viewport {
    position: relative;
    height: var(--shyita-perfex-frame-height);
    min-height: min(200px, calc(100vh - 2rem));
    max-height: calc(100vh - 2rem);
    background: #fff;
}

.shyita-perfex-lead-popup__frame {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 100%;
    border: 0;
    background: #fff;
    opacity: 0;
    transition: opacity 160ms ease-in;
}

.shyita-perfex-lead-popup[data-state="ready"] .shyita-perfex-lead-popup__frame {
    opacity: 1;
}

.shyita-perfex-lead-popup__loading,
.shyita-perfex-lead-popup__error {
    position: absolute;
    z-index: 1;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
    box-sizing: border-box;
    padding: 2rem;
    text-align: center;
    background: #fff;
}

.shyita-perfex-lead-popup__loading[hidden],
.shyita-perfex-lead-popup__error[hidden] {
    display: none !important;
}

.shyita-perfex-lead-popup__error p {
    max-width: 34rem;
    margin: 0;
}

.shyita-perfex-lead-popup__error a {
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.shyita-perfex-lead-popup__spinner {
    width: 2rem;
    height: 2rem;
    border: 3px solid rgb(27 108 168 / 22%);
    border-top-color: #1b6ca8;
    border-radius: 50%;
    animation: shyita-perfex-lead-popup-spin 750ms linear infinite;
}

@keyframes shyita-perfex-lead-popup-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 549px) {
    .shyita-perfex-lead-popup {
        width: calc(100vw - 1rem);
        max-height: calc(100vh - 1rem);
    }

    .shyita-perfex-lead-popup[data-shyita-native-dialog="false"][data-open="true"] {
        padding: 0.5rem;
    }

    .shyita-perfex-lead-popup[data-shyita-native-dialog="false"] .shyita-perfex-lead-popup__dialog {
        width: calc(100vw - 1rem);
    }

    .shyita-perfex-lead-popup__viewport {
        min-height: min(200px, calc(100vh - 1rem));
        max-height: calc(100vh - 1rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    .shyita-perfex-lead-popup__frame {
        transition: none;
    }

    .shyita-perfex-lead-popup__spinner {
        animation-duration: 1.8s;
    }
}
