:root {
    --tv-exit-ink: #10211d;
    --tv-exit-cream: #fffaf2;
    --tv-exit-sage: #7bb900;
    --tv-exit-gold: #d2a756;
    --tv-exit-shadow: rgba(14, 30, 25, 0.34);
}

.tv-exit-offer-is-open {
    overflow: hidden;
}

.tv-exit-offer[hidden] {
    display: none;
}

.tv-exit-offer {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: grid;
    place-items: center;
    box-sizing: border-box;
    width: 100%;
    min-height: 100dvh;
    padding: 20px;
    color: var(--tv-exit-ink);
    font-family: inherit;
}

.tv-exit-offer *,
.tv-exit-offer *::before,
.tv-exit-offer *::after {
    box-sizing: border-box;
}

.tv-exit-offer__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 18, 15, 0.68);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.tv-exit-offer__panel {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(220px, 0.88fr) minmax(280px, 1fr);
    width: min(920px, 100%);
    max-width: calc(100vw - 40px);
    min-height: 470px;
    max-height: calc(100dvh - 40px);
    overflow: hidden;
    border-radius: 8px;
    background: var(--tv-exit-cream);
    box-shadow: 0 30px 90px var(--tv-exit-shadow);
    animation: tvExitOfferIn 220ms ease-out both;
}

.tv-exit-offer__visual {
    min-height: 470px;
    background-color: #213b33;
    background-position: center;
    background-size: cover;
}

.tv-exit-offer__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
    padding: clamp(28px, 5vw, 56px);
    min-width: 0;
}

.tv-exit-offer__eyebrow {
    margin: 0;
    color: var(--tv-exit-sage);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.tv-exit-offer h2  {
    margin: 0;
    color: var(--tv-exit-ink);
    font-size: clamp(31px, 5vw, 43px);
    line-height: 0.98;
    letter-spacing: 0;
    display: block;
    width: 100%;
    overflow-wrap: anywhere;
}

.tv-exit-offer p {
    font-size: 16px;
    line-height: 1.58;
    overflow-wrap: anywhere;
}

.tv-exit-offer__content > p {
    margin: 0;
}

.tv-exit-offer__content strong {
    color: var(--tv-exit-sage);
}

.tv-exit-offer__code {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(100%, 330px);
    min-height: 58px;
    padding: 11px 16px;
    border: 1px dashed rgba(51, 92, 77, 0.55);
    border-radius: 8px;
    background: #ffffff;
    color: var(--tv-exit-ink);
    cursor: pointer;
    font: inherit;
    text-align: left;
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.tv-exit-offer__code:hover,
.tv-exit-offer__code:focus-visible {
    border-color: var(--tv-exit-sage);
    box-shadow: 0 10px 28px rgba(51, 92, 77, 0.14);
    outline: none;
    transform: translateY(-1px);
}

.tv-exit-offer__code:active,
.tv-exit-offer__primary:active,
.tv-exit-offer__secondary:active,
.tv-exit-offer__close:active {
    transform: translateY(1px);
}

.tv-exit-offer__code span {
    color: rgba(16, 33, 29, 0.62);
    font-size: 13px;
}

.tv-exit-offer__code strong {
    color: var(--tv-exit-ink);
    font-size: 18px;
    letter-spacing: 0.08em;
    overflow-wrap: anywhere;
}

.tv-exit-offer__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.tv-exit-offer__primary,
.tv-exit-offer__secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    transition: transform 160ms ease, background-color 160ms ease, color 160ms ease;
}

.tv-exit-offer__primary {
    border: 1px solid var(--tv-exit-sage);
    background: var(--tv-exit-sage);
    color: #ffffff;
}

.tv-exit-offer__primary:hover,
.tv-exit-offer__primary:focus-visible {
    background: #24463a;
    color: #ffffff;
    outline: none;
}

.tv-exit-offer__secondary {
    border: 1px solid transparent;
    background: transparent;
    color: rgba(16, 33, 29, 0.72);
    cursor: pointer;
    font-family: inherit;
}

.tv-exit-offer__secondary:hover,
.tv-exit-offer__secondary:focus-visible {
    color: var(--tv-exit-ink);
    outline: none;
}

.tv-exit-offer__note {
    max-width: 42ch;
    color: rgba(16, 33, 29, 0.6);
    font-size: 13px;
}

.tv-exit-offer__close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 250, 242, 0.9);
    color: var(--tv-exit-ink);
    cursor: pointer;
    font-family: Arial, sans-serif;
    font-size: 26px;
    line-height: 1;
    transition: transform 160ms ease, background-color 160ms ease;
}

.tv-exit-offer__close:hover,
.tv-exit-offer__close:focus-visible {
    background: #ffffff;
    outline: 2px solid rgba(51, 92, 77, 0.34);
    outline-offset: 2px;
}

@keyframes tvExitOfferIn {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.98);
    }

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

@media (max-width: 820px) {
    .tv-exit-offer {
        align-items: end;
        justify-items: stretch;
        padding: 12px;
        padding-bottom: max(12px, env(safe-area-inset-bottom));
    }

    .tv-exit-offer__panel {
        grid-template-columns: 1fr;
        width: 100%;
        max-width: none;
        min-height: 0;
        max-height: calc(100dvh - 24px - env(safe-area-inset-bottom));
        overflow-y: auto;
        border-radius: 12px 12px 8px 8px;
        -webkit-overflow-scrolling: touch;
    }

    .tv-exit-offer__visual {
        min-height: 0;
        aspect-ratio: 16 / 7;
        background-position: center;
    }

    .tv-exit-offer__content {
        gap: 12px;
        padding: 22px 18px 18px;
    }

    .tv-exit-offer__eyebrow {
        font-size: 11px;
        letter-spacing: 0.09em;
    }

    .tv-exit-offer h2 {
        max-width: none;
        font-size: clamp(26px, 8vw, 34px);
        line-height: 1.05;
    }

    .tv-exit-offer p {
        font-size: 15px;
        line-height: 1.45;
    }

    .tv-exit-offer__actions,
    .tv-exit-offer__primary,
    .tv-exit-offer__secondary,
    .tv-exit-offer__code {
        width: 100%;
    }

    .tv-exit-offer__actions {
        gap: 8px;
    }

    .tv-exit-offer__primary,
    .tv-exit-offer__secondary {
        min-height: 48px;
        padding-right: 14px;
        padding-left: 14px;
        text-align: center;
    }

    .tv-exit-offer__code {
        min-height: 54px;
    }

    .tv-exit-offer__close {
        top: 10px;
        right: 10px;
        width: 38px;
        height: 38px;
        font-size: 24px;
    }
}

@media (max-width: 380px), (max-height: 640px) {
    .tv-exit-offer {
        padding: 8px;
        padding-bottom: max(8px, env(safe-area-inset-bottom));
    }

    .tv-exit-offer__panel {
        max-height: calc(100dvh - 16px - env(safe-area-inset-bottom));
    }

    .tv-exit-offer__visual {
        aspect-ratio: 16 / 5;
    }

    .tv-exit-offer__content {
        gap: 10px;
        padding: 18px 16px 16px;
    }

    .tv-exit-offer h2 {
        font-size: clamp(24px, 8vw, 30px);
    }

    .tv-exit-offer__note {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tv-exit-offer__panel {
        animation: none;
    }

    .tv-exit-offer__code,
    .tv-exit-offer__primary,
    .tv-exit-offer__secondary,
    .tv-exit-offer__close {
        transition: none;
    }
}
