/* Refuge461 Connect — frontend styles
   Brand: deep navy #122a4b, warm gold #d9a441, parchment #f5f3ee */

:root {
	--r461-navy: #122a4b;
	--r461-navy-deep: #0c1e37;
	--r461-gold: #d9a441;
	--r461-gold-soft: #e8c37a;
	--r461-parchment: #f5f3ee;
	--r461-ink: #26303d;
	--r461-radius: 10px;
}

/* ---------- Shared card & fields ---------- */

.r461-card {
	background: #fff;
	border: 1px solid #e5e1d8;
	border-top: 4px solid var(--r461-gold);
	border-radius: var(--r461-radius);
	padding: 28px;
	max-width: 560px;
	box-shadow: 0 6px 24px rgba(18, 42, 75, 0.08);
}

.r461-field { margin: 0 0 16px; }

.r461-field label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--r461-navy);
	margin-bottom: 6px;
}

.r461-field input[type="text"],
.r461-field input[type="email"],
.r461-field select,
.r461-field textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 11px 13px;
	border: 1.5px solid #d8d3c6;
	border-radius: 6px;
	background: var(--r461-parchment);
	color: var(--r461-ink);
	font-size: 15px;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.r461-field input:focus,
.r461-field select:focus,
.r461-field textarea:focus {
	outline: none;
	border-color: var(--r461-gold);
	box-shadow: 0 0 0 3px rgba(217, 164, 65, 0.25);
	background: #fff;
}

/* ---------- Frequency choice ---------- */

.r461-frequency {
	border: none;
	margin: 0 0 18px;
	padding: 0;
}

.r461-frequency legend {
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--r461-navy);
	margin-bottom: 8px;
	padding: 0;
}

.r461-choice {
	display: inline-flex;
	align-items: flex-start;
	gap: 8px;
	width: calc(50% - 6px);
	box-sizing: border-box;
	padding: 12px;
	border: 1.5px solid #d8d3c6;
	border-radius: 6px;
	cursor: pointer;
	vertical-align: top;
	transition: border-color 0.15s, background 0.15s;
}

.r461-choice + .r461-choice { margin-left: 8px; }

.r461-choice:hover { border-color: var(--r461-gold-soft); }

.r461-choice:has(input:checked) {
	border-color: var(--r461-gold);
	background: rgba(217, 164, 65, 0.08);
}

.r461-choice input { margin-top: 3px; accent-color: var(--r461-gold); }
.r461-choice strong { color: var(--r461-navy); }
.r461-choice small { color: #6b7280; }

/* ---------- Buttons ---------- */

.r461-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: var(--r461-navy);
	color: #fff;
	border: none;
	border-radius: 6px;
	padding: 12px 26px;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.02em;
	cursor: pointer;
	transition: background 0.15s, transform 0.1s;
}

.r461-btn:hover { background: var(--r461-navy-deep); }
.r461-btn:active { transform: translateY(1px); }
.r461-btn:disabled { opacity: 0.6; cursor: wait; }

.r461-btn-outline {
	background: transparent;
	color: var(--r461-navy);
	border: 1.5px solid var(--r461-navy);
}

.r461-btn-outline:hover { background: rgba(18, 42, 75, 0.06); }

/* ---------- Status messages ---------- */

.r461-msg { min-height: 1.2em; margin: 12px 0 0; font-size: 14px; }
.r461-msg-ok { color: #1a7a3c; }
.r461-msg-err { color: #b3261e; }

/* ---------- Recorder ---------- */

.r461-recorder {
	margin: 4px 0 18px;
	padding: 14px;
	border: 1.5px dashed #d8d3c6;
	border-radius: 6px;
	background: var(--r461-parchment);
}

.r461-rec-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #b3261e;
	display: inline-block;
}

.r461-record-btn.r461-recording .r461-rec-dot {
	animation: r461-pulse 1s infinite;
}

@keyframes r461-pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.25; }
}

.r461-rec-timer {
	margin-left: 10px;
	font-variant-numeric: tabular-nums;
	font-weight: 600;
	color: var(--r461-navy);
}

.r461-rec-preview { display: block; width: 100%; margin-top: 10px; }

.r461-rec-discard {
	background: none;
	border: none;
	color: #b3261e;
	font-size: 13px;
	cursor: pointer;
	padding: 6px 0 0;
	text-decoration: underline;
}

.r461-rec-hint { margin: 8px 0 0; font-size: 12px; color: #6b7280; }

/* ---------- Popup ---------- */

.r461-popup {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.r461-popup-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(12, 30, 55, 0.62);
	backdrop-filter: blur(2px);
	opacity: 0;
	transition: opacity 0.25s;
}

.r461-popup-card {
	position: relative;
	background: #fff;
	border-radius: var(--r461-radius);
	padding: 34px 30px 28px;
	max-width: 480px;
	width: 100%;
	box-shadow: 0 24px 60px rgba(12, 30, 55, 0.35);
	transform: translateY(14px);
	opacity: 0;
	transition: transform 0.25s, opacity 0.25s;
	max-height: 90vh;
	overflow-y: auto;
}

.r461-popup.r461-open .r461-popup-backdrop { opacity: 1; }
.r461-popup.r461-open .r461-popup-card { transform: translateY(0); opacity: 1; }

.r461-popup-band {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 5px;
	border-radius: var(--r461-radius) var(--r461-radius) 0 0;
	background: linear-gradient(90deg, var(--r461-gold), var(--r461-gold-soft), var(--r461-gold));
}

.r461-popup-card h2 {
	margin: 0 0 6px;
	font-size: 24px;
	color: var(--r461-navy);
	line-height: 1.25;
}

.r461-popup-sub { margin: 0 0 20px; color: #55606e; font-size: 15px; }

.r461-popup-close {
	position: absolute;
	top: 10px;
	right: 12px;
	background: none;
	border: none;
	font-size: 26px;
	line-height: 1;
	color: #98a2b3;
	cursor: pointer;
	padding: 4px 8px;
}

.r461-popup-close:hover { color: var(--r461-navy); }

@media (prefers-reduced-motion: reduce) {
	.r461-popup-backdrop,
	.r461-popup-card,
	.r461-btn { transition: none; }
	.r461-record-btn.r461-recording .r461-rec-dot { animation: none; }
}

@media (max-width: 480px) {
	.r461-choice { width: 100%; }
	.r461-choice + .r461-choice { margin-left: 0; margin-top: 8px; }
	.r461-card { padding: 20px; }
}

/* ---------- Honeypot (hidden from humans, visible to bots) ---------- */
.r461-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
