/*
 * Newsletter popup (ReplyResearch_Newsletter_Popup), laid out like the popup-image.png mockup:
 * a wide white card, illustration on the left, left-aligned text and a full-width button on the
 * right. Stacks on phones. Sits below the cookie banner (z-index 100000).
 */

.rr-popup {
	--rr-accent: #009cff;
	--rr-accent-dark: #0086db;
	--rr-heading: #111111;
	--rr-text: #5e5e5e;
	--rr-font-heading: "Lato", sans-serif;
	--rr-font-body: "Cabin", sans-serif;

	position: fixed;
	inset: 0;
	z-index: 99990;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.rr-popup[hidden] {
	display: none;
}

html.rr-popup-open,
html.rr-popup-open body {
	overflow: hidden;
}

.rr-popup__overlay {
	position: absolute;
	inset: 0;
	background: rgba(17, 17, 17, 0.55);
}

.rr-popup__dialog {
	position: relative;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	gap: 56px;
	width: 100%;
	max-width: 1040px;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	padding: 48px 64px 48px 32px;
	text-align: left;
	background: #ffffff;
	border-radius: 4px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
	animation: rr-popup-in 0.2s ease-out;
}

.rr-popup__dialog:focus {
	outline: none;
}

@keyframes rr-popup-in {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.rr-popup__dialog {
		animation: none;
	}
}

.rr-popup .rr-popup__close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0;
	font-family: Arial, sans-serif;
	font-size: 30px;
	font-weight: 400;
	line-height: 40px;
	color: #6f7178;
	background: transparent;
	border: 0;
	border-radius: 50%;
	box-shadow: none;
	cursor: pointer;
}

.rr-popup .rr-popup__close:hover,
.rr-popup .rr-popup__close:focus-visible {
	color: var(--rr-heading);
	background: #f1f2f4;
}

/* ---------- Columns ---------- */

.rr-popup__media {
	flex: 0 0 46%;
}

.rr-popup__content {
	flex: 1 1 auto;
	min-width: 0;
}

.rr-popup__image {
	margin: 0;
}

.rr-popup__image img {
	display: block;
	width: 100%;
	height: auto;
}

/* ---------- Text ---------- */

.rr-popup__eyebrow {
	margin: 0 0 10px;
	font-family: var(--rr-font-body);
	font-size: 14px;
	font-weight: 500;
	line-height: 1.3;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--rr-accent);
}

.rr-popup .rr-popup__title {
	margin: 0 0 18px;
	font-family: var(--rr-font-heading);
	font-size: 40px;
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.01em;
	color: var(--rr-heading);
}

.rr-popup__text {
	margin: 0 0 34px;
	font-family: var(--rr-font-body);
	font-size: 19px;
	line-height: 1.7;
	color: var(--rr-text);
}

.rr-popup .rr-popup__button {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 100%;
	height: 64px;
	padding: 0 24px;
	font-family: var(--rr-font-body);
	font-size: 19px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: #ffffff;
	text-decoration: none;
	background: var(--rr-accent);
	border-radius: 4px;
	transition: background-color 0.15s ease;
}

.rr-popup .rr-popup__button:hover,
.rr-popup .rr-popup__button:focus {
	color: #ffffff;
	background: var(--rr-accent-dark);
}

.rr-popup .rr-popup__button:focus-visible {
	outline: 3px solid rgba(0, 156, 255, 0.35);
	outline-offset: 2px;
}

.rr-popup__login {
	margin: 26px 0 0;
	font-family: var(--rr-font-body);
	font-size: 16px;
	line-height: 1.6;
	color: #6f7178;
}

.rr-popup__login a {
	color: var(--rr-accent);
}

/* ---------- Smaller laptops and tablets ---------- */

@media (max-width: 960px), (max-height: 720px) {
	.rr-popup__dialog {
		gap: 36px;
		max-width: 860px;
		padding: 36px 48px 36px 24px;
	}

	.rr-popup .rr-popup__title {
		font-size: 32px;
	}

	.rr-popup__text {
		margin-bottom: 26px;
		font-size: 17px;
	}

	.rr-popup .rr-popup__button {
		height: 56px;
		font-size: 17px;
	}
}

/* ---------- Phones: stack, illustration on top ---------- */

@media (max-width: 720px) {
	.rr-popup__dialog {
		flex-direction: column;
		align-items: stretch;
		gap: 16px;
		max-width: 480px;
		padding: 32px 20px 24px;
	}

	.rr-popup__media {
		flex: 0 0 auto;
	}

	.rr-popup__image {
		max-width: 220px;
		margin: 0 auto;
	}

	.rr-popup .rr-popup__title {
		font-size: 26px;
	}

	.rr-popup__text {
		margin-bottom: 22px;
		font-size: 16px;
	}

	.rr-popup__login {
		margin-top: 16px;
		text-align: center;
	}
}

/* Short phone screens: smaller illustration so the button stays in view. */
@media (max-width: 720px) and (max-height: 760px) {
	.rr-popup__image {
		max-width: 160px;
	}
}
