/**
 * Random Form Popup - front-end styles.
 * Accent and text colours are injected as CSS variables by the plugin.
 */

.rfp-root {
	--rfp-accent: #0f172a;
	--rfp-text: #1f2937;
	position: fixed;
	inset: 0;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
}

.rfp-root[hidden] {
	display: none;
}

.rfp-overlay {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	background: rgba( 0, 0, 0, 0.6 );
}

.rfp-modal {
	position: relative;
	width: 100%;
	max-width: 460px;
	background: #fff;
	color: var( --rfp-text );
	border-radius: 6px;
	box-shadow: 0 20px 50px rgba( 0, 0, 0, 0.3 );
	padding: 40px 32px 32px;
	text-align: center;
	box-sizing: border-box;
	max-height: calc( 100vh - 40px );
	overflow-y: auto;
	animation: rfp-in 0.25s ease-out;
}

.rfp-modal[hidden] {
	display: none;
}

@keyframes rfp-in {
	from {
		opacity: 0;
		transform: translateY( 12px );
	}
	to {
		opacity: 1;
		transform: translateY( 0 );
	}
}

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

.rfp-close {
	position: absolute;
	top: 6px;
	right: 10px;
	width: 36px;
	height: 36px;
	line-height: 1;
	font-size: 28px;
	color: #6b7280;
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
}

.rfp-close:hover,
.rfp-close:focus {
	color: #111;
}

.rfp-title {
	margin: 0 0 12px;
	font-size: 26px;
	line-height: 1.25;
	color: var( --rfp-text );
}

.rfp-body {
	margin: 0 0 20px;
	font-size: 16px;
	line-height: 1.5;
}

.rfp-body p:last-child {
	margin-bottom: 0;
}

.rfp-form {
	display: block;
}

.rfp-email {
	width: 100%;
	padding: 12px 14px;
	font-size: 16px;
	line-height: 1.3;
	color: var( --rfp-text );
	border: 1px solid #cbd5e1;
	border-radius: 4px;
	box-sizing: border-box;
	margin-bottom: 12px;
	background: #fff;
}

.rfp-email:focus {
	border-color: var( --rfp-accent );
	outline: 2px solid transparent;
	box-shadow: 0 0 0 2px rgba( 0, 0, 0, 0.12 );
}

.rfp-submit {
	display: block;
	width: 100%;
	padding: 13px 20px;
	font-size: 16px;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: #fff;
	background: var( --rfp-accent );
	border: 0;
	border-radius: 4px;
	cursor: pointer;
}

.rfp-submit:hover {
	filter: brightness( 1.12 );
}

.rfp-submit[disabled] {
	opacity: 0.65;
	cursor: default;
}

.rfp-note {
	margin-top: 12px;
	font-size: 12px;
	line-height: 1.4;
	color: #6b7280;
}

.rfp-message {
	margin: 12px 0 0;
	font-size: 14px;
	min-height: 1em;
}

.rfp-message.rfp-error {
	color: #b91c1c;
}

.rfp-success {
	font-size: 17px;
	line-height: 1.5;
	font-weight: 600;
}

.rfp-success[hidden] {
	display: none;
}

/* Honeypot: hidden from people, reachable by bots. */
.rfp-hp {
	position: absolute !important;
	left: -9999px !important;
	top: auto !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

/* Screen-reader-only label (themes do not always provide this class). */
.rfp-modal .rfp-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect( 0, 0, 0, 0 );
	white-space: nowrap;
	border: 0;
}

body.rfp-no-scroll {
	overflow: hidden;
}

@media ( max-width: 480px ) {
	.rfp-modal {
		padding: 36px 20px 24px;
	}

	.rfp-title {
		font-size: 22px;
	}
}
