.tpn-section {
    width: min(1180px, calc(100% - 32px));
    margin: clamp(34px, 5vw, 58px) auto;
}

.tpn-inner {
    display: grid;
    grid-template-columns: 1fr minmax(320px, 460px);
    gap: clamp(22px, 4vw, 54px);
    align-items: center;
    background:
        radial-gradient(circle at top right, rgba(196,154,90,.20), transparent 28rem),
        #111;
    color: #fff;
    border-radius: 34px;
    padding: clamp(28px, 5vw, 58px);
    box-shadow: 0 24px 70px rgba(17,17,17,.16);
    overflow: hidden;
}

.tpn-copy h2 {
    font-size: clamp(2rem, 5vw, 4.4rem);
    line-height: .95;
    letter-spacing: -.06em;
    margin: 0 0 14px;
}

.tpn-copy p:not(.tmv-kicker) {
    color: rgba(255,255,255,.78);
    font-size: 1.08rem;
    line-height: 1.6;
    margin: 0;
}

.tpn-kicker {
    color: #c49a5a !important;
}

.tpn-form-card {
    background: rgba(255,255,255,.94);
    color: #111;
    border-radius: 26px;
    padding: 22px;
    box-shadow: 0 20px 60px rgba(0,0,0,.18);
}

.tpn-message {
    border-radius: 14px;
    padding: 11px 13px;
    margin-bottom: 14px;
    font-weight: 800;
    background: #f6f7f7;
}

.tpn-message-success {
    background: #edf7ed;
}

.tpn-message-invalid,
.tpn-message-consent,
.tpn-message-spam,
.tpn-message-rate_limit,
.tpn-message-nonce {
    background: #fff0f0;
}

.tpn-form {
    display: grid;
    gap: 12px;
}

.tpn-form input[type="email"] {
    width: 100%;
    min-height: 52px;
    border: 1px solid rgba(17,17,17,.14);
    border-radius: 999px;
    padding: 0 18px;
    font-size: 1rem;
}

.tpn-form button {
    min-height: 52px;
    border: 0;
    border-radius: 999px;
    padding: 0 20px;
    background: #111;
    color: #fff;
    font-weight: 900;
    cursor: pointer;
}

.tpn-consent {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 9px;
    font-size: .86rem;
    line-height: 1.4;
    color: rgba(17,17,17,.70);
}

.tpn-consent input {
    margin-top: 2px;
}

.tpn-hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
}

@media (max-width: 820px) {
    .tpn-inner {
        grid-template-columns: 1fr;
    }
}


/* v1.1 gold newsletter section */
.tpn-inner {
    background:
        radial-gradient(circle at top right, rgba(255,255,255,.32), transparent 28rem),
        linear-gradient(135deg, #d5aa56 0%, #c49a5a 48%, #b98535 100%) !important;
    color: #111 !important;
    border: 1px solid rgba(17,17,17,.08);
}

.tpn-copy h2 {
    color: #111 !important;
}

.tpn-copy p:not(.tmv-kicker) {
    color: rgba(17,17,17,.72) !important;
}

.tpn-kicker {
    color: rgba(17,17,17,.72) !important;
}

.tpn-form-card {
    background: rgba(255,255,255,.88) !important;
    color: #111 !important;
    border: 1px solid rgba(17,17,17,.10);
    box-shadow: 0 20px 60px rgba(17,17,17,.16);
}

.tpn-form button {
    background: #111 !important;
    color: #fff !important;
}

.tpn-form input[type="email"] {
    background: #fff !important;
    color: #111 !important;
    border-color: rgba(17,17,17,.18) !important;
}

.tpn-form input[type="email"]::placeholder {
    color: rgba(17,17,17,.48);
}

.tpn-consent {
    color: rgba(17,17,17,.72) !important;
}


/* v1.3 plugin-owned newsletter colors */
.tpn-inner {
    background: var(--tpn-streamer-bg, #c49a5a) !important;
    color: var(--tpn-streamer-text, #111111) !important;
}

.tpn-copy h2,
.tpn-copy p,
.tpn-copy p:not(.tmv-kicker),
.tpn-kicker {
    color: var(--tpn-streamer-text, #111111) !important;
}

.tpn-consent,
.tpn-consent span {
    color: var(--tpn-consent-text, #111111) !important;
}

.tpn-consent input[type="checkbox"] {
    accent-color: var(--tpn-consent-checkbox, #111111) !important;
}

.tpn-form button {
    background: var(--tpn-button-bg, #111111) !important;
    color: var(--tpn-button-text, #ffffff) !important;
}


/* v1.4 stronger plugin-owned newsletter colors */
body .tmv-ref-newsletter-wrap .tpn-inner,
body .tmv-news-archive-newsletter .tpn-inner,
body .tpn-section .tpn-inner {
    background: var(--tpn-streamer-bg, #c49a5a) !important;
    color: var(--tpn-streamer-text, #111111) !important;
}

body .tmv-ref-newsletter-wrap .tpn-copy h2,
body .tmv-news-archive-newsletter .tpn-copy h2,
body .tpn-section .tpn-copy h2,
body .tmv-ref-newsletter-wrap .tpn-copy p,
body .tmv-news-archive-newsletter .tpn-copy p,
body .tpn-section .tpn-copy p,
body .tmv-ref-newsletter-wrap .tpn-copy p:not(.tmv-kicker),
body .tmv-news-archive-newsletter .tpn-copy p:not(.tmv-kicker),
body .tpn-section .tpn-copy p:not(.tmv-kicker),
body .tmv-ref-newsletter-wrap .tpn-kicker,
body .tmv-news-archive-newsletter .tpn-kicker,
body .tpn-section .tpn-kicker {
    color: var(--tpn-streamer-text, #111111) !important;
}

body .tmv-ref-newsletter-wrap .tpn-consent,
body .tmv-ref-newsletter-wrap .tpn-consent span,
body .tmv-news-archive-newsletter .tpn-consent,
body .tmv-news-archive-newsletter .tpn-consent span,
body .tpn-section .tpn-consent,
body .tpn-section .tpn-consent span {
    color: var(--tpn-consent-text, #111111) !important;
}

body .tmv-ref-newsletter-wrap .tpn-consent input[type="checkbox"],
body .tmv-news-archive-newsletter .tpn-consent input[type="checkbox"],
body .tpn-section .tpn-consent input[type="checkbox"] {
    accent-color: var(--tpn-consent-checkbox, #111111) !important;
}

body .tmv-ref-newsletter-wrap .tpn-form button,
body .tmv-news-archive-newsletter .tpn-form button,
body .tpn-section .tpn-form button,
body .tmv-ref-newsletter-wrap .tpn-form button:hover,
body .tmv-news-archive-newsletter .tpn-form button:hover,
body .tpn-section .tpn-form button:hover {
    background: var(--tpn-button-bg, #111111) !important;
    color: var(--tpn-button-text, #ffffff) !important;
}



/* v1.6 popup/toast confirmation */
.tpn-popup {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 99999;
    max-width: min(420px, calc(100vw - 32px));
    opacity: 0;
    transform: translateY(14px) scale(.98);
    pointer-events: none;
    transition: opacity .22s ease, transform .22s ease;
}

.tpn-popup.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.tpn-popup-inner {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 30px;
    gap: 12px;
    align-items: center;
    padding: 15px 16px;
    border-radius: 18px;
    background: #111;
    color: #fff;
    box-shadow: 0 20px 60px rgba(0,0,0,.22);
}

.tpn-popup-success .tpn-popup-inner {
    background: #123f2a;
}

.tpn-popup-invalid .tpn-popup-inner,
.tpn-popup-consent .tpn-popup-inner,
.tpn-popup-spam .tpn-popup-inner,
.tpn-popup-rate_limit .tpn-popup-inner,
.tpn-popup-nonce .tpn-popup-inner {
    background: #4a1717;
}

.tpn-popup-icon {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(255,255,255,.16);
    font-weight: 900;
}

.tpn-popup p {
    margin: 0;
    color: #fff !important;
    font-weight: 800;
    line-height: 1.35;
}

.tpn-popup-close {
    width: 30px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background: rgba(255,255,255,.12);
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.tpn-popup-close:hover,
.tpn-popup-close:focus-visible {
    background: rgba(255,255,255,.22);
    outline: none;
}

@media (max-width: 560px) {
    .tpn-popup {
        left: 16px;
        right: 16px;
        bottom: 16px;
        max-width: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tpn-popup {
        transition: none;
        transform: none;
    }
}


/* ==========================================================================
   v1.7 newsletter component colors
   Plugin-owned CSS variables. Theme should only control placement.
   ========================================================================== */

body .tpn-section .tpn-inner,
body .tmv-ref-newsletter-wrap .tpn-inner,
body .tmv-news-archive-newsletter .tpn-inner {
    background: var(--tpn-streamer-bg, #c49a5a) !important;
    color: var(--tpn-streamer-text, #111111) !important;
}

body .tpn-section .tpn-kicker,
body .tpn-section .tpn-copy h2,
body .tpn-section .tpn-copy p,
body .tpn-section .tpn-copy p:not(.tmv-kicker),
body .tmv-ref-newsletter-wrap .tpn-kicker,
body .tmv-ref-newsletter-wrap .tpn-copy h2,
body .tmv-ref-newsletter-wrap .tpn-copy p,
body .tmv-ref-newsletter-wrap .tpn-copy p:not(.tmv-kicker),
body .tmv-news-archive-newsletter .tpn-kicker,
body .tmv-news-archive-newsletter .tpn-copy h2,
body .tmv-news-archive-newsletter .tpn-copy p,
body .tmv-news-archive-newsletter .tpn-copy p:not(.tmv-kicker) {
    color: var(--tpn-streamer-text, #111111) !important;
}

body .tpn-section .tpn-consent,
body .tpn-section .tpn-consent span,
body .tpn-section .tpn-consent label,
body .tmv-ref-newsletter-wrap .tpn-consent,
body .tmv-ref-newsletter-wrap .tpn-consent span,
body .tmv-ref-newsletter-wrap .tpn-consent label,
body .tmv-news-archive-newsletter .tpn-consent,
body .tmv-news-archive-newsletter .tpn-consent span,
body .tmv-news-archive-newsletter .tpn-consent label {
    color: var(--tpn-consent-text, #111111) !important;
}

body .tpn-section .tpn-consent input[type="checkbox"],
body .tmv-ref-newsletter-wrap .tpn-consent input[type="checkbox"],
body .tmv-news-archive-newsletter .tpn-consent input[type="checkbox"] {
    accent-color: var(--tpn-consent-checkbox, #111111) !important;
}

body .tpn-section .tpn-form button,
body .tmv-ref-newsletter-wrap .tpn-form button,
body .tmv-news-archive-newsletter .tpn-form button,
body .tpn-section .tpn-form button:hover,
body .tmv-ref-newsletter-wrap .tpn-form button:hover,
body .tmv-news-archive-newsletter .tpn-form button:hover,
body .tpn-section .tpn-form button:focus-visible,
body .tmv-ref-newsletter-wrap .tpn-form button:focus-visible,
body .tmv-news-archive-newsletter .tpn-form button:focus-visible {
    background: var(--tpn-button-bg, #111111) !important;
    color: var(--tpn-button-text, #ffffff) !important;
}
