/**
 * SignalRift Lead Capture — WhatsApp-style chat widget.
 * All selectors are .srlc-* prefixed so nothing collides with the theme.
 */

/**
 * The `hidden` attribute must beat the `display` declarations below. A bare
 * [hidden] comes from the UA stylesheet, so ANY author rule setting display
 * silently overrides it — which paints the empty chat panel on page load.
 * Matching the class + attribute outranks the class alone.
 */
.srlc-chat[hidden],
.srlc-overlay[hidden] { display: none; }

.srlc-fab {
	position: fixed;
	/* Shorthand pins all four edges, so a theme rule setting top/left can't
	   drag the button off-screen. */
	inset: auto 20px 20px auto;
	z-index: 99998;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #25d366;
	color: #fff;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
	transition: transform 0.15s ease;
}
.srlc-fab:hover { transform: scale(1.06); }
.srlc-fab:focus-visible { outline: 3px solid #128c7e; outline-offset: 3px; }

.srlc-overlay {
	position: fixed;
	inset: 0;
	z-index: 99998;
	background: rgba(0, 0, 0, 0.45);
}

body.srlc-locked { overflow: hidden; }

.srlc-chat {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 99999;
	display: flex;
	flex-direction: column;
	width: 380px;
	max-width: calc(100vw - 40px);
	height: 620px;
	max-height: calc(100vh - 40px);
	overflow: hidden;
	border-radius: 14px;
	background: #ece5dd;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 15px;
	line-height: 1.45;
}

/* Full-screen on phones — a floating panel is unusable at that width. */
@media (max-width: 600px) {
	.srlc-chat {
		right: 0;
		bottom: 0;
		width: 100vw;
		max-width: 100vw;
		height: 100dvh;
		max-height: 100dvh;
		border-radius: 0;
	}
	.srlc-fab { inset: auto 16px 16px auto; }
}

/* Header */
.srlc-head {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 0 0 auto;
	padding: 10px 14px;
	background: #008069;
	color: #fff;
}
.srlc-back {
	padding: 0 4px;
	border: 0;
	background: none;
	color: #fff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}
.srlc-avatar {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.25);
	font-weight: 700;
}
.srlc-who { display: flex; flex-direction: column; min-width: 0; }
.srlc-who strong { font-size: 15px; font-weight: 600; }
.srlc-who span { font-size: 12px; opacity: 0.85; }

/* Message area */
.srlc-body {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 14px 12px;
	background-color: #ece5dd;
	/* Subtle paper texture, echoing the WhatsApp chat backdrop. */
	background-image: radial-gradient(rgba(0, 0, 0, 0.035) 1px, transparent 1px);
	background-size: 18px 18px;
}

.srlc-msg {
	position: relative;
	max-width: 82%;
	margin-bottom: 9px;
	padding: 7px 11px;
	border-radius: 9px;
	color: #111b21;
	word-wrap: break-word;
	box-shadow: 0 1px 1px rgba(0, 0, 0, 0.13);
}
.srlc-them { background: #fff; border-top-left-radius: 2px; margin-right: auto; }
.srlc-me { background: #d9fdd3; border-top-right-radius: 2px; margin-left: auto; }
.srlc-err { background: #fde2e1; color: #7a1c15; }
.srlc-muted { opacity: 0.6; font-style: italic; }

/* Typing indicator */
.srlc-typing { display: flex; gap: 4px; width: 52px; padding: 11px; }
.srlc-typing span {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #9aa5ab;
	animation: srlc-bounce 1.2s infinite;
}
.srlc-typing span:nth-child(2) { animation-delay: 0.18s; }
.srlc-typing span:nth-child(3) { animation-delay: 0.36s; }
@keyframes srlc-bounce {
	0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
	30% { transform: translateY(-4px); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
	.srlc-typing span { animation: none; }
	.srlc-fab { transition: none; }
}

/* Input bar */
.srlc-bar {
	flex: 0 0 auto;
	padding: 10px;
	background: #f0f2f5;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
}
.srlc-input { display: flex; gap: 8px; align-items: center; }
.srlc-input input {
	flex: 1 1 auto;
	min-width: 0;
	padding: 10px 14px;
	border: 0;
	border-radius: 20px;
	background: #fff;
	/* 16px keeps iOS Safari from zooming the viewport on focus. */
	font-size: 16px;
	outline: none;
}
.srlc-send {
	flex: 0 0 auto;
	width: 42px;
	height: 42px;
	border: 0;
	border-radius: 50%;
	background: #008069;
	color: #fff;
	font-size: 17px;
	cursor: pointer;
}
.srlc-skip {
	flex: 0 0 auto;
	padding: 9px 14px;
	border: 0;
	border-radius: 20px;
	background: #e3e6e8;
	color: #3b4a54;
	cursor: pointer;
}

.srlc-choices { display: flex; flex-wrap: wrap; gap: 7px; }
.srlc-chip {
	padding: 8px 13px;
	border: 1px solid #008069;
	border-radius: 18px;
	background: #fff;
	color: #008069;
	font-size: 14px;
	cursor: pointer;
}
.srlc-chip:hover { background: #008069; color: #fff; }

.srlc-primary {
	display: block;
	width: 100%;
	padding: 13px;
	border: 0;
	border-radius: 22px;
	background: #25d366;
	color: #fff;
	font-size: 16px;
	font-weight: 600;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
}
.srlc-primary[disabled] { opacity: 0.6; cursor: default; }

/* -------------------------------------------------------------------------
 * Plain contact-page form ([signalrift_form])
 * ---------------------------------------------------------------------- */

.srlc-form { max-width: 560px; }
.srlc-field { margin-bottom: 15px; }
.srlc-field label { display: block; margin-bottom: 5px; font-weight: 600; font-size: 14px; }
.srlc-field label em { font-weight: 400; opacity: 0.6; }
.srlc-field input,
.srlc-field select,
.srlc-field textarea {
	box-sizing: border-box;
	width: 100%;
	padding: 11px 13px;
	border: 1px solid rgba(0, 0, 0, 0.2);
	border-radius: 8px;
	font-size: 16px;
	font-family: inherit;
}
.srlc-field input:focus,
.srlc-field select:focus,
.srlc-field textarea:focus {
	border-color: #008069;
	outline: 2px solid rgba(0, 128, 105, 0.25);
}

/* Honeypot: off-screen rather than display:none — some bots skip hidden fields. */
.srlc-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.srlc-submit {
	padding: 13px 26px;
	border: 0;
	border-radius: 8px;
	background: #008069;
	color: #fff;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
}
.srlc-submit[disabled] { opacity: 0.6; cursor: default; }

.srlc-error {
	margin-bottom: 12px;
	padding: 10px 13px;
	border-radius: 8px;
	background: #fde2e1;
	color: #7a1c15;
	font-size: 14px;
}
.srlc-done {
	padding: 13px;
	border-radius: 8px;
	background: #d9fdd3;
	color: #0b3d2c;
}
