.engagement-runtime-item {
    --engagement-accent: var(--web-primary, #145fcd);
    color: #172033;
    font-family: inherit;
}

.engagement-runtime-item[hidden] {
    display: none !important;
}

.engagement-runtime-popup {
    --engagement-popup-gutter: clamp(12px, 4vw, 32px);
    --engagement-popup-gutter-double: clamp(24px, 8vw, 64px);
    --engagement-popup-ratio-gutter: clamp(18px, 6vw, 48px);
    align-items: center;
    background: rgba(15, 23, 42, .54);
    box-sizing: border-box;
    display: flex;
    inset: 0;
    justify-content: center;
    overflow: auto;
    padding: var(--engagement-popup-gutter);
    position: fixed;
    z-index: 1085;
}

.engagement-runtime-popup,
.engagement-runtime-popup .engagement-runtime-card {
    scrollbar-width: none;
}

.engagement-runtime-popup::-webkit-scrollbar,
.engagement-runtime-popup .engagement-runtime-card::-webkit-scrollbar {
    display: none;
}

.engagement-runtime-popup-shell {
    max-height: calc(100vh - var(--engagement-popup-gutter-double));
    max-height: calc(100dvh - var(--engagement-popup-gutter-double));
    max-width: 460px;
    position: relative;
    width: 100%;
}

.engagement-runtime-card {
    background: #fff;
    border: 1px solid rgba(20, 95, 205, .14);
    border-radius: 12px;
    box-shadow: 0 22px 65px rgba(15, 23, 42, .22);
    max-height: calc(100vh - var(--engagement-popup-gutter-double));
    max-height: calc(100dvh - var(--engagement-popup-gutter-double));
    max-width: 460px;
    overflow: visible;
    padding: 28px;
    position: relative;
    text-align: start;
    width: 100%;
}

.engagement-runtime-popup .engagement-runtime-card {
    max-height: inherit;
    max-width: none;
}

.engagement-runtime-popup:not(.engagement-runtime-image-only) .engagement-runtime-card {
    overflow: auto;
    padding: 0;
    text-align: center;
}

.engagement-runtime-popup.engagement-runtime-image-only:not(.engagement-runtime-image-display-original-ratio) .engagement-runtime-popup-shell {
    aspect-ratio: 3 / 4;
    max-width: none;
    width: min(600px, 100%, calc(75vh - var(--engagement-popup-ratio-gutter)));
    width: min(600px, 100%, calc(75dvh - var(--engagement-popup-ratio-gutter)));
}

.engagement-runtime-popup.engagement-runtime-image-only:not(.engagement-runtime-image-display-original-ratio) .engagement-runtime-card {
    aspect-ratio: 3 / 4;
}

.engagement-runtime-banner {
    background: #fff;
    border-bottom: 3px solid var(--engagement-accent);
    box-shadow: 0 8px 30px rgba(15, 23, 42, .14);
    inset-inline: 0;
    padding: 16px max(20px, calc((100vw - 1180px) / 2));
    position: fixed;
    top: 0;
    z-index: 1080;
}

.engagement-runtime-snackbar {
    background: #fff;
    border-inline-start: 4px solid var(--engagement-accent);
    border-radius: 12px;
    bottom: 24px;
    box-shadow: 0 14px 40px rgba(15, 23, 42, .28);
    color: #1f2528;
    inset-inline-end: 24px;
    max-width: min(420px, calc(100vw - 32px));
    padding: 18px;
    position: fixed;
    width: 100%;
    z-index: 1080;
}

.engagement-runtime-content {
    align-items: center;
    display: flex;
    gap: 18px;
}

.engagement-runtime-copy {
    flex: 1 1 auto;
    min-width: 0;
}

.engagement-runtime-image {
    border-radius: 12px;
    height: 96px;
    object-fit: cover;
    width: 96px;
}

.engagement-runtime-popup .engagement-runtime-image {
    aspect-ratio: 3 / 2;
    border-radius: 12px;
    display: block;
    height: auto;
    margin-bottom: 18px;
    object-fit: cover;
    width: 100%;
}

.engagement-runtime-visual-stage {
    background: linear-gradient(135deg, rgba(20, 95, 205, .14), rgba(124, 58, 237, .17));
    border-radius: 12px 12px 0 0;
    display: grid;
    min-height: 150px;
    overflow: hidden;
    padding: 28px;
    place-items: center;
    width: 100%;
}

.engagement-runtime-visual-stage.has-image {
    padding: 0;
}

.engagement-runtime-visual-stage .engagement-runtime-image {
    border-radius: 0;
    margin: 0;
}

.engagement-runtime-visual {
    background: #f3f6fb;
    border-radius: 14px;
    color: var(--engagement-accent);
    display: grid;
    font-size: 32px;
    height: 64px;
    line-height: 1;
    margin: 0;
    place-items: center;
    width: 64px;
}

.engagement-runtime-visual > i {
    display: block;
    line-height: 1;
}

.engagement-runtime-popup.engagement-runtime-image-display-original-ratio .engagement-runtime-image {
    max-height: calc(100vh - var(--engagement-popup-gutter-double));
    max-height: calc(100dvh - var(--engagement-popup-gutter-double));
}

.engagement-runtime-image-only .engagement-runtime-card {
    background: transparent;
    border: 0;
    padding: 0;
}

.engagement-runtime-image-only .engagement-runtime-image {
    aspect-ratio: 3 / 4;
    border-radius: 12px;
    display: block;
    height: auto;
    margin: 0;
    object-fit: contain;
    width: 100%;
}

.engagement-runtime-image-display-contain .engagement-runtime-image {
    background: #f4f5f7;
    object-fit: contain;
}

.engagement-runtime-image-display-cover .engagement-runtime-image {
    object-fit: cover;
}

.engagement-runtime-image-display-original-ratio .engagement-runtime-image {
    aspect-ratio: auto;
    background: transparent;
    height: auto;
    object-fit: contain;
}

.engagement-runtime-image-action {
    background: transparent;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    display: block;
    padding: 0;
    width: 100%;
}

.engagement-runtime-image-only .engagement-runtime-copy {
    bottom: 20px;
    inset-inline: 20px;
    pointer-events: none;
    position: absolute;
}

.engagement-runtime-image-only .engagement-runtime-actions {
    justify-content: center;
    margin: 0;
}

.engagement-runtime-image-only .engagement-runtime-cta.is-floating {
    box-shadow: 0 10px 28px rgba(15, 23, 42, .3);
    pointer-events: auto;
}

.engagement-runtime-banner.engagement-runtime-image-only,
.engagement-runtime-snackbar.engagement-runtime-image-only {
    padding: 0;
}

.engagement-runtime-banner.engagement-runtime-image-only .engagement-runtime-content,
.engagement-runtime-snackbar.engagement-runtime-image-only .engagement-runtime-content {
    display: block;
    margin-inline: auto;
    max-width: 720px;
    position: relative;
    width: 100%;
}

.engagement-runtime-title {
    color: inherit;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 8px;
}

.engagement-runtime-popup:not(.engagement-runtime-image-only) .engagement-runtime-copy {
    padding: 26px 28px 28px;
    text-align: center;
}

.engagement-runtime-body {
    color: inherit;
    line-height: 1.65;
    margin: 0;
    opacity: .84;
    white-space: pre-line;
}

.engagement-runtime-snackbar .engagement-runtime-body {
    opacity: 1;
}

.engagement-runtime-interest-choices {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 18px;
}

.engagement-runtime-interest-choice {
    background: #f5f7fa;
    border: 1px solid #dbe1e8;
    border-radius: 999px;
    color: #374151;
    cursor: pointer;
    font: inherit;
    padding: 8px 14px;
    transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}

.engagement-runtime-interest-choice.is-selected {
    background: #eaf2ff;
    border-color: #1455ac;
    color: #1455ac;
    font-weight: 700;
}

.engagement-runtime-interest-choice:focus-visible {
    outline: 2px solid #1455ac;
    outline-offset: 2px;
}

.engagement-runtime-interest-count {
    align-self: center;
    color: #6b7280;
    font-size: .78rem;
    min-width: 36px;
}

.engagement-runtime-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.engagement-runtime-popup .engagement-runtime-actions {
    justify-content: center;
}

.engagement-runtime-cta,
.engagement-runtime-dismiss {
    border-radius: 9px;
    cursor: pointer;
    font: inherit;
    min-height: 40px;
    padding: 9px 16px;
}

.engagement-runtime-store-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 400px;
    margin-inline: auto;
}

.engagement-runtime-item .engagement-runtime-store-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    border-radius: 6px;
    padding: 12px;
    height: 72px;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    cursor: pointer;
}

.engagement-runtime-store-cta img {
    display: block;
    width: auto;
    height: 48px;
    max-width: 100%;
    object-fit: contain;
}

.engagement-runtime-item .engagement-runtime-store-cta[data-store="google_play"] {
    padding: 0;
}

.engagement-runtime-store-cta[data-store="google_play"] img {
    height: 72px;
}

.engagement-runtime-item .engagement-runtime-store-cta:disabled {
    opacity: 1;
    cursor: wait;
}

.engagement-runtime-store-cta[aria-busy="true"] {
    outline: 2px solid #145fcd;
    outline-offset: 2px;
}

.engagement-runtime-store-status {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 12px;
    color: #64748b;
}

.engagement-runtime-snackbar[data-experience-code="app_download"] .engagement-runtime-store-status {
    color: #1f2528;
}

.engagement-runtime-banner[data-experience-code="app_download"] .engagement-runtime-store-actions,
.engagement-runtime-snackbar[data-experience-code="app_download"] .engagement-runtime-store-actions {
    margin-top: 0;
    row-gap: 4px;
}

.engagement-runtime-banner[data-experience-code="app_download"] .engagement-runtime-title,
.engagement-runtime-snackbar[data-experience-code="app_download"] .engagement-runtime-title {
    margin-bottom: 3px;
}

.engagement-runtime-banner[data-experience-code="app_download"] .engagement-runtime-body,
.engagement-runtime-snackbar[data-experience-code="app_download"] .engagement-runtime-body {
    line-height: 1.45;
}

.engagement-runtime-banner[data-experience-code="app_download"],
.engagement-runtime-snackbar[data-experience-code="app_download"] {
    padding-bottom: 8px;
}

.engagement-runtime-banner .engagement-runtime-store-status:empty,
.engagement-runtime-snackbar .engagement-runtime-store-status:empty {
    display: none;
}

.engagement-runtime-smart-auth-alternative {
    background: transparent;
    border: 0;
    color: inherit;
    cursor: pointer;
    flex-basis: 100%;
    font: inherit;
    font-size: .82rem;
    opacity: .58;
    padding: 4px 8px;
    text-decoration: none;
    width: 100%;
}

.engagement-runtime-smart-auth-alternative:hover,
.engagement-runtime-smart-auth-alternative:focus-visible {
    opacity: .82;
    text-decoration: underline;
}

.engagement-runtime-cta {
    background: var(--engagement-accent);
    border: 1px solid var(--engagement-accent);
    color: #fff;
    font-weight: 700;
}

.engagement-runtime-dismiss {
    background: transparent;
    border: 1px solid currentColor;
    color: inherit;
    opacity: .74;
}

.engagement-runtime-close {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 50%;
    color: inherit;
    cursor: pointer;
    display: inline-flex;
    font-size: 24px;
    height: 36px;
    box-shadow: 0 7px 22px rgba(15, 23, 42, .2);
    inset-inline-end: -12px;
    justify-content: center;
    line-height: 1;
    position: absolute;
    top: -12px;
    width: 36px;
}

.engagement-runtime-popup .engagement-runtime-close,
.engagement-runtime-banner .engagement-runtime-close,
.engagement-runtime-snackbar .engagement-runtime-close {
    background: transparent;
    border: 1px solid #111;
    box-shadow: 0 7px 22px rgba(15, 23, 42, .16);
    color: #111;
    display: grid;
    font-family: Arial, sans-serif;
    inset-inline-end: auto;
    left: 0;
    line-height: 1;
    padding: 0;
    place-items: center;
    text-align: center;
    top: -46px;
}

/* The banner touches the viewport top, so keep its circle inside the screen. */
.engagement-runtime-banner .engagement-runtime-close {
    left: 8px;
    top: 8px;
}

.engagement-runtime-banner .engagement-runtime-content {
    padding-left: 40px;
}

.engagement-runtime-close.is-locked {
    cursor: default;
    font-size: .82rem;
    font-weight: 700;
    opacity: 1;
}

.engagement-runtime-dismiss.is-locked {
    cursor: not-allowed;
    opacity: .35;
}

.engagement-runtime-error {
    color: #b42318;
    font-size: .82rem;
    margin: 10px 0 0;
}

.engagement-runtime-snackbar .engagement-runtime-error {
    color: #fecaca;
}

.engagement-runtime-item button:focus-visible {
    outline: 3px solid rgba(20, 95, 205, .35);
    outline-offset: 2px;
}

.engagement-runtime-item button:disabled {
    cursor: wait;
    opacity: .58;
}

.engagement-runtime-item button.is-locked:disabled {
    cursor: not-allowed;
    opacity: .35;
}

.engagement-runtime-item .engagement-runtime-close.is-locked:disabled {
    cursor: default;
    opacity: 1;
}

@media (max-width: 575px) {
    .engagement-runtime-card {
        border-radius: 12px;
    }

    .engagement-runtime-visual-stage {
        min-height: 128px;
        padding: 22px;
    }

    .engagement-runtime-popup:not(.engagement-runtime-image-only) .engagement-runtime-copy {
        padding: 22px 20px 24px;
    }

    .engagement-runtime-banner {
        padding: 16px;
    }

    .engagement-runtime-snackbar {
        bottom: 16px;
        inset-inline: 16px;
        max-width: none;
        width: auto;
    }

    .engagement-runtime-content {
        align-items: flex-start;
    }

    .engagement-runtime-image {
        height: 72px;
        width: 72px;
    }
}
.engagement-runtime-navigation {
    position: fixed;
    inset: 0;
    z-index: 1100;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    justify-content: safe center;
    gap: 10px;
    padding: 16px;
    background: rgba(15, 23, 42, .54);
    color: #fff;
    font-family: inherit;
    text-align: center;
    overflow: auto;
}

.engagement-runtime-navigation p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    max-width: 360px;
}

/* Only the centered spinner is visible while busy; keep status for screen readers. */
.engagement-runtime-navigation.is-busy p {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.engagement-runtime-navigation.is-busy { touch-action: none; }

.engagement-runtime-navigation-spinner {
    display: none;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border: 3px solid rgba(255, 255, 255, .3);
    border-top-color: #fff;
    border-right-color: #fff;
    border-radius: 50%;
}

.engagement-runtime-navigation.is-busy .engagement-runtime-navigation-spinner {
    display: block;
    animation: engagement-navigation-spin .8s linear infinite;
}

.engagement-runtime-navigation button {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 8px 16px;
    border: 1px solid #145fcd;
    border-radius: 6px;
    background: #145fcd;
    color: #fff;
    cursor: pointer;
    font: inherit;
}

.engagement-runtime-navigation .engagement-runtime-navigation-close {
    background: transparent;
    color: #fff;
    border-color: #fff;
}

.engagement-runtime-navigation button[hidden] { display: none; }
.engagement-runtime-navigation button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

@keyframes engagement-navigation-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .engagement-runtime-navigation.is-busy .engagement-runtime-navigation-spinner { animation: none; }
}
