/* Restart Newsletter: popup, message window and the [rt_newsletter] form. */
.rtn, .rtn-inline {
	--rtn-navy: #0b1b3a;
	--rtn-navy-2: #12295a;
	--rtn-blue: #1d4ed8;
	--rtn-blue-dark: #1e40af;
	--rtn-yellow: #ffd23f;
	--rtn-text: #0f172a;
	--rtn-muted: #64748b;
	--rtn-line: #e2e8f0;
	font-family: "Geologica", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.rtn[hidden], .rtn [hidden], .rtn-inline [hidden] { display: none !important; }
.rtn .rt-icon, .rtn-inline .rt-icon { display: inline-block; flex: none; vertical-align: middle; }

/* Window */
.rtn { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.rtn__backdrop { position: absolute; inset: 0; background: rgba(8, 18, 40, .55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); opacity: 0; transition: opacity .3s ease; }
.rtn__dialog { position: relative; display: grid; grid-template-columns: 1fr 1.08fr; width: 100%; max-width: 820px; max-height: calc(100vh - 40px); overflow: auto; background: #fff; border-radius: 24px; box-shadow: 0 30px 80px rgba(8, 18, 40, .35); opacity: 0; transform: translateY(16px) scale(.98); transition: opacity .3s ease, transform .35s cubic-bezier(.2, .8, .2, 1); outline: none; }
.rtn.is-in .rtn__backdrop { opacity: 1; }
.rtn.is-in .rtn__dialog { opacity: 1; transform: none; }
.rtn .rtn__dialog button.rtn__close { all: unset; box-sizing: border-box; position: absolute; top: 14px; right: 14px; z-index: 3; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: transparent; color: #64748b; cursor: pointer; transition: background .15s, color .15s; }
.rtn .rtn__dialog button.rtn__close:hover, .rtn .rtn__dialog button.rtn__close:focus-visible { background: #f1f5f9; color: var(--rtn-text); }

/* Left: navy story */
.rtn__side { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 44px 36px; color: #fff; background: radial-gradient(120% 90% at 0% 0%, #1d3f86 0%, var(--rtn-navy-2) 45%, var(--rtn-navy) 100%); border-radius: 24px 0 0 24px; overflow: hidden; }
.rtn__side::after { content: ""; position: absolute; right: -110px; bottom: -110px; width: 240px; height: 240px; border-radius: 50%; border: 34px solid rgba(255, 210, 63, .08); pointer-events: none; }
.rtn__side.has-img { background: linear-gradient(180deg, rgba(11, 27, 58, .55) 0%, rgba(11, 27, 58, .92) 70%), var(--rtn-img) center / cover no-repeat; }
.rtn__side > * { position: relative; z-index: 1; margin: 0; }
.rtn__kicker { display: inline-flex; align-items: center; gap: 7px; align-self: flex-start; padding: 6px 12px; border-radius: 999px; background: rgba(255, 210, 63, .14); color: var(--rtn-yellow); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.rtn__title { font-size: 30px; line-height: 1.12; font-weight: 800; letter-spacing: -.01em; color: #fff; }
.rtn__text { font-size: 15px; line-height: 1.55; color: #cbd5e1; }
.rtn__perks { display: grid; gap: 10px; margin: 6px 0 0 !important; padding: 0; list-style: none; }
.rtn__perks li { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 14.5px; font-weight: 500; color: #e2e8f0; }
.rtn__perks li span { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 10px; background: rgba(255, 255, 255, .1); color: var(--rtn-yellow); flex: none; }

/* Right: form */
.rtn__main { display: flex; flex-direction: column; justify-content: center; padding: 44px 36px 34px; }
.rtn__form-title { margin: 0 0 16px; font-size: 22px; font-weight: 800; color: var(--rtn-text); }

.rtn-form { display: grid; gap: 14px; margin: 0; }
.rtn-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.rtn-form__field { position: relative; display: flex; align-items: center; margin: 0; }
.rtn-form__field > .rt-icon { position: absolute; left: 16px; color: var(--rtn-muted); pointer-events: none; }
.rtn-form .rtn-form__field input { width: 100%; height: 54px; margin: 0; padding: 0 16px 0 46px; border: 1.5px solid var(--rtn-line); border-radius: 14px; background: #f8fafc; color: var(--rtn-text); font: inherit; font-size: 16px; box-shadow: none; transition: border-color .15s, background .15s, box-shadow .15s; }
.rtn-form .rtn-form__field input:focus { outline: none; border-color: var(--rtn-blue); background: #fff; box-shadow: 0 0 0 4px rgba(29, 78, 216, .12); }
.rtn-form.is-bad .rtn-form__field input:invalid, .rtn-form .rtn-form__field input.is-bad { border-color: #dc2626; }
.rtn-form__agree { display: flex; align-items: flex-start; gap: 10px; margin: 0; font-size: 13px; line-height: 1.45; color: var(--rtn-muted); cursor: pointer; }
.rtn-form__agree input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--rtn-blue); cursor: pointer; }
.rtn-form__agree a { color: var(--rtn-blue); text-decoration: underline; }
.rtn-form .rtn-form__btn, .rtn-form .rtn-form__btn:focus { border: 0; }
.rtn-form .rtn-form__btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 54px; margin: 2px 0 0; padding: 14px 20px; border: 0; border-radius: 999px; background: var(--rtn-blue); color: #fff; font: inherit; font-size: 16px; font-weight: 700; line-height: 1.15; cursor: pointer; box-shadow: 0 10px 22px rgba(29, 78, 216, .28); transition: background .15s, transform .15s; }
.rtn-form .rtn-form__btn:hover, .rtn-form .rtn-form__btn:focus-visible { background: var(--rtn-blue-dark); color: #fff; transform: translateY(-1px); }
.rtn-form .rtn-form__btn[disabled] { opacity: .7; cursor: wait; transform: none; }
.rtn-form__error { margin: 0; padding: 10px 12px; border-radius: 10px; background: #fef2f2; color: #b91c1c; font-size: 13.5px; }
.rtn-form__note { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0; font-size: 12.5px; color: var(--rtn-muted); }

/* Done */
.rtn-done { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px 0; text-align: center; animation: rtn-pop .4s ease; }
.rtn-done__ic { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; margin-bottom: 6px; border-radius: 50%; background: #ecfdf5; color: #15803d; }
.rtn-done__title { margin: 0; font-size: 22px; font-weight: 800; color: var(--rtn-text); }
.rtn-done__text { margin: 0; font-size: 15px; line-height: 1.55; color: var(--rtn-muted); }
@keyframes rtn-pop { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }

/* Message window (confirm / unsubscribe) */
.rtn.is-msg .rtn__dialog { grid-template-columns: 1fr; max-width: 440px; }
.rtn.is-msg .rtn__side, .rtn.is-msg .rtn__main { display: none; }
.rtn__msg { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 46px 34px 34px; text-align: center; }
.rtn__msg-ic { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 50%; background: #eff6ff; color: var(--rtn-blue); }
.rtn__msg-ic.is-ok { background: #ecfdf5; color: #15803d; }
.rtn__msg-ic.is-bad { background: #fef2f2; color: #b91c1c; }
.rtn__msg-text { margin: 0; font-size: 18px; line-height: 1.45; font-weight: 600; color: var(--rtn-text); }
.rtn__msg-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 6px; }
.rtn .rtn__msg-actions button, .rtn .rtn__msg-actions button:focus { border: 0; box-shadow: none; }
.rtn__msg-actions button { min-height: 46px; padding: 12px 22px; border: 0; border-radius: 999px; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.rtn__msg-actions .is-main { background: var(--rtn-blue); color: #fff; }
.rtn__msg-actions .is-main:hover { background: var(--rtn-blue-dark); color: #fff; }
.rtn__msg-actions .is-soft { background: #f1f5f9; color: var(--rtn-text); }
.rtn__msg-actions .is-soft:hover { background: #e2e8f0; color: var(--rtn-text); }

html.rtn-lock, html.rtn-lock body { overflow: hidden; }

/* Mobile: a panel from the bottom */
@media (max-width: 760px) {
	.rtn { align-items: flex-end; padding: 0; }
	.rtn__dialog { grid-template-columns: 1fr; max-width: none; max-height: 92vh; border-radius: 22px 22px 0 0; transform: translateY(100%); transition: opacity .25s ease, transform .4s cubic-bezier(.2, .8, .2, 1); }
	.rtn.is-in .rtn__dialog { transform: none; }
	.rtn__side { gap: 8px; padding: 28px 22px 22px; border-radius: 22px 22px 0 0; }
	.rtn__side::after { display: none; }
	.rtn__title { font-size: 23px; padding-right: 40px; }
	.rtn__text { font-size: 14px; }
	.rtn__perks { display: none; }
	.rtn__main { padding: 22px 22px calc(22px + env(safe-area-inset-bottom)); }
	.rtn__form-title { display: none; }
	.rtn .rtn__dialog button.rtn__close { color: rgba(255, 255, 255, .8); }
	.rtn .rtn__dialog button.rtn__close:hover, .rtn .rtn__dialog button.rtn__close:focus-visible { background: rgba(255, 255, 255, .12); color: #fff; }
	.rtn.is-msg .rtn__dialog { max-width: none; }
	.rtn.is-msg .rtn__dialog button.rtn__close { color: #64748b; }
	.rtn.is-msg .rtn__dialog button.rtn__close:hover, .rtn.is-msg .rtn__dialog button.rtn__close:focus-visible { background: #f1f5f9; color: var(--rtn-text); }
}
@media (prefers-reduced-motion: reduce) {
	.rtn__backdrop, .rtn__dialog { transition: none; }
}

/* [rt_newsletter] on a page */
.rtn-inline { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center; margin: 32px 0; padding: 30px 32px; border: 1px solid var(--rtn-line); border-radius: 22px; background: linear-gradient(135deg, #eff6ff 0%, #ffffff 60%); }
.rtn-inline__head { display: flex; gap: 14px; align-items: flex-start; }
.rtn-inline__ic { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 14px; background: var(--rtn-blue); color: #fff; flex: none; }
.rtn-inline__title { margin: 0 0 4px; font-size: 22px; line-height: 1.2; font-weight: 800; color: var(--rtn-text); }
.rtn-inline__text { margin: 0; font-size: 15px; line-height: 1.5; color: var(--rtn-muted); }
.rtn-inline .rtn-form__field input { background: #fff; }
.rtn-inline--dark { background: radial-gradient(120% 120% at 0% 0%, #1d3f86 0%, var(--rtn-navy) 70%); border-color: transparent; }
.rtn-inline--dark .rtn-inline__title, .rtn-inline--dark .rtn-done__title { color: #fff; }
.rtn-inline--dark .rtn-inline__text, .rtn-inline--dark .rtn-form__agree, .rtn-inline--dark .rtn-form__note, .rtn-inline--dark .rtn-done__text { color: #cbd5e1; }
.rtn-inline--dark .rtn-inline__ic { background: var(--rtn-yellow); color: var(--rtn-navy); }
.rtn-inline--dark .rtn-form__agree a { color: var(--rtn-yellow); }
@media (max-width: 760px) {
	.rtn-inline { grid-template-columns: 1fr; gap: 18px; padding: 22px; }
}
