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

.st-engagement {
    --st-engagement-bg: #ffffff;
    --st-engagement-text: #102a34;
    --st-engagement-muted: #5d6f78;
    --st-engagement-border: rgba(15, 61, 72, 0.14);
    --st-engagement-shadow: 0 28px 80px rgba(6, 32, 42, 0.22);
    --st-engagement-radius: 24px;
    --st-engagement-accent: #1f7a8c;

    position: relative;
    z-index: 1090;
    color: var(--st-engagement-text);
}

.st-engagement__surface {
    position: relative;
    overflow: hidden;
    width: min(100%, 560px);
    border: 1px solid var(--st-engagement-border);
    border-radius: var(--st-engagement-radius);
    background: var(--st-engagement-bg);
    box-shadow: var(--st-engagement-shadow);
}

.st-engagement--compact .st-engagement__surface {
    width: min(100%, 420px);
}

.st-engagement--wide .st-engagement__surface {
    width: min(100%, 820px);
}

.st-engagement--full .st-engagement__surface {
    width: 100%;
}

.st-engagement__media {
    display: block;
    width: 100%;
}

.st-engagement__media img {
    display: block;
    width: 100%;
    max-height: 440px;
    object-fit: cover;
}

.st-engagement__media img[data-engagement-media-fit="contain"] {
    object-fit: contain;
}

.st-engagement__content {
    padding: 26px;
}

.st-engagement__title {
    margin: 0;
    font-size: clamp(1.35rem, 2.2vw, 2rem);
    line-height: 1.15;
}

.st-engagement__subtitle {
    margin: 10px 0 0;
    color: var(--st-engagement-muted);
}

.st-engagement__body {
    margin-top: 16px;
    color: var(--st-engagement-muted);
    line-height: 1.65;
}

.st-engagement__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin-top: 20px;
    padding: 10px 20px;
    border: 0;
    border-radius: 999px;
    background: var(--st-engagement-accent);
    color: #ffffff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.st-engagement__close {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: rgba(9, 30, 38, 0.72);
    color: #ffffff;
    font: inherit;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}

.st-engagement--modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(3, 23, 31, 0.68);
    backdrop-filter: blur(8px);
}

.st-engagement--modal .st-engagement__surface {
    max-height: calc(100vh - 48px);
    overflow-y: auto;
}

.st-engagement-modal-open {
    overflow: hidden;
}

.st-engagement--banner {
    width: 100%;
}

.st-engagement--banner .st-engagement__surface {
    width: 100%;
    border-radius: 0;
}

.st-engagement--toast,
.st-engagement--slide_in {
    position: fixed;
    right: 22px;
    bottom: 22px;
    width: min(calc(100vw - 44px), 420px);
}

.st-engagement--toast .st-engagement__surface,
.st-engagement--slide_in .st-engagement__surface {
    width: 100%;
}

.st-engagement--inline {
    width: 100%;
}

.st-engagement--inline .st-engagement__surface {
    margin-inline: auto;
}

.st-engagement.is-open {
    animation: st-engagement-enter 220ms ease-out both;
}

@keyframes st-engagement-enter {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 767px) {
    .st-engagement--modal {
        padding: 14px;
        align-items: flex-end;
    }

    .st-engagement--modal .st-engagement__surface {
        width: 100%;
        max-height: calc(100vh - 28px);
        border-radius: 22px;
    }

    .st-engagement__content {
        padding: 22px 18px;
    }

    .st-engagement--toast,
    .st-engagement--slide_in {
        right: 12px;
        bottom: 12px;
        width: calc(100vw - 24px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .st-engagement.is-open {
        animation: none;
    }
}

/* STENTORIAN_ENGAGEMENT_COUPON_UI_V1 */
.st-engagement__coupon {
    margin-top: 20px;
    padding: 14px 16px;
    border: 1px dashed rgba(20, 69, 111, 0.34);
    border-radius: 14px;
    background:
        linear-gradient(
            135deg,
            rgba(28, 146, 164, 0.08),
            rgba(255, 255, 255, 0.96)
        );
}

.st-engagement__coupon-label {
    display: block;
    margin-bottom: 7px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(29, 53, 78, 0.66);
}

.st-engagement__coupon-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.st-engagement__coupon-code {
    min-width: 0;
    font-size: clamp(20px, 2.2vw, 28px);
    line-height: 1;
    letter-spacing: 0.08em;
    color: #123f6b;
    overflow-wrap: anywhere;
}

.st-engagement__coupon-copy {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 9px 14px;
    border: 0;
    border-radius: 999px;
    background: #eef6f8;
    color: #176f7d;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition:
        transform 160ms ease,
        background-color 160ms ease,
        color 160ms ease;
}

.st-engagement__coupon-copy:hover {
    transform: translateY(-1px);
    background: #dff1f4;
}

.st-engagement__coupon-copy:focus-visible {
    outline: 3px solid rgba(28, 146, 164, 0.22);
    outline-offset: 2px;
}

.st-engagement__coupon-copy.is-copied {
    background: #e9f7ef;
    color: #247345;
}

@media (max-width: 575px) {
    .st-engagement__coupon-row {
        align-items: stretch;
        flex-direction: column;
    }

    .st-engagement__coupon-copy {
        width: 100%;
    }
}

/* STENTORIAN_ENGAGEMENT_COUPON_BUTTON_POLISH_V1
   Keep coupon copy control aligned with the Stentorian runtime palette.
   Native/foreign button outlines are neutralized while keyboard focus
   remains clearly visible through an accessible focus-visible ring.
*/
.st-engagement .st-engagement__coupon-copy {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid rgba(14, 126, 145, 0.28);
    outline: 0;
    box-shadow: none;
}

.st-engagement .st-engagement__coupon-copy:hover {
    border-color: rgba(14, 126, 145, 0.52);
}

.st-engagement .st-engagement__coupon-copy:focus {
    outline: 0;
}

.st-engagement .st-engagement__coupon-copy:focus-visible {
    outline: 3px solid rgba(14, 126, 145, 0.24);
    outline-offset: 3px;
    border-color: rgba(14, 126, 145, 0.68);
}

.st-engagement .st-engagement__coupon-copy.is-copied {
    border-color: rgba(14, 126, 145, 0.52);
}
