/**
 * LawCore Intake Widget
 *
 * Everything is namespaced .lciw and sets its own box-sizing, colours and font
 * metrics. Client themes are wildly inconsistent (Flatsome, Divi, GeneratePress,
 * Elementor) and will otherwise leak padding, line-height and link colours in.
 */

.lciw,
.lciw *,
.lciw *::before,
.lciw *::after {
	box-sizing: border-box;
}

.lciw {
	position: fixed;
	bottom: 20px;
	z-index: 999998;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 15px;
	line-height: 1.45;
}

.lciw--right {
	right: 20px;
}

.lciw--left {
	left: 20px;
}

/* ---------- the bubble ---------- */

.lciw__bubble {
	position: relative;
	display: block;
	width: 88px;
	height: 88px;
	padding: 0;
	margin: 0;
	border: 3px solid #fff;
	border-radius: 50%;
	background: var(--lciw-accent, #0b335e);
	box-shadow: 0 5px 18px rgba(0, 0, 0, 0.35);
	cursor: pointer;
	overflow: hidden;
	text-transform: none;
	transition: transform 0.18s ease;
}

.lciw__bubble:hover,
.lciw__bubble:focus-visible {
	transform: scale(1.05);
}

.lciw__photo {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	object-fit: cover;
	object-position: center var(--lciw-focus, 30%);
}

.lciw__glyph {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
}

.lciw__glyph svg {
	width: 42px;
	height: 42px;
	fill: #fff;
}

.lciw__dot {
	position: absolute;
	right: 6px;
	bottom: 6px;
	width: 16px;
	height: 16px;
	border: 2px solid #fff;
	border-radius: 50%;
	background: #2ecc71;
}

/* ---------- the panel ---------- */

.lciw__panel {
	position: absolute;
	right: 0;
	bottom: 104px;
	width: 340px;
	max-height: min(80vh, 560px);
	overflow-y: auto;
	padding: 22px 20px 16px;
	border-radius: 14px;
	background: #fff;
	color: #1c1c1c;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.28);
}

.lciw--left .lciw__panel {
	right: auto;
	left: 0;
}

.lciw__panel[hidden] {
	display: none;
}

.lciw__close {
	position: absolute;
	top: 6px;
	right: 8px;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #6b7280;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
}

.lciw__close:hover {
	color: #111;
}

.lciw__greeting {
	margin: 0 0 6px;
	color: #111;
	font-size: 17px;
	font-weight: 600;
}

.lciw__subtext {
	margin: 0;
	color: #4b5563;
	font-size: 14px;
}

.lciw__choices {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 16px 0 0;
}

.lciw__choice {
	display: inline-block;
	padding: 9px 15px;
	border: 1px solid #d5d8dd;
	border-radius: 999px;
	background: #fff;
	color: #1c1c1c;
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
}

.lciw__choice:hover,
.lciw__choice:focus-visible {
	border-color: var(--lciw-accent, #0b335e);
	background: var(--lciw-accent, #0b335e);
	color: #fff;
	text-decoration: none;
}

.lciw__actions {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 18px;
}

.lciw__action {
	display: block;
	padding: 12px 14px;
	border: 1px solid #d5d8dd;
	border-radius: 10px;
	color: #1c1c1c;
	font-size: 15px;
	font-weight: 600;
	text-align: center;
	text-decoration: none;
}

.lciw__action:hover,
.lciw__action:focus-visible {
	border-color: var(--lciw-accent, #0b335e);
	text-decoration: none;
}

.lciw__action--primary {
	border-color: var(--lciw-accent, #0b335e);
	background: var(--lciw-accent, #0b335e);
	color: #fff;
}

.lciw__action--primary:hover,
.lciw__action--primary:focus-visible {
	color: #fff;
	filter: brightness(1.12);
}

.lciw__number {
	display: block;
	font-size: 13px;
	font-weight: 400;
	opacity: 0.9;
}

.lciw__credit {
	margin: 14px 0 0;
	color: #9aa1ab;
	font-size: 11px;
	text-align: center;
}

.lciw__credit a {
	color: #9aa1ab;
	text-decoration: none;
}

.lciw__credit a:hover {
	color: var(--lciw-accent, #0b335e);
	text-decoration: underline;
}

/* ---------- small screens ---------- */

@media (max-width: 500px) {
	.lciw {
		bottom: 16px;
	}

	.lciw--right {
		right: 16px;
	}

	.lciw--left {
		left: 16px;
	}

	.lciw__bubble {
		width: 72px;
		height: 72px;
	}

	.lciw__panel {
		position: fixed;
		right: 0;
		bottom: 0;
		left: 0;
		width: 100%;
		max-height: 88vh;
		border-radius: 14px 14px 0 0;
	}

	.lciw--left .lciw__panel {
		left: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.lciw__bubble {
		transition: none;
	}

	.lciw__bubble:hover,
	.lciw__bubble:focus-visible {
		transform: none;
	}
}
