/*
 * Jet Link Popup — front-end
 *
 * The popup is injected into whatever theme the site runs, so themes and
 * page builders (Elementor, Bootstrap, Astra) will otherwise win on
 * headings, list items and links via selectors like `.elementor-kit-7 h2`.
 * Rules are therefore scoped under .jlp-widget and the visually critical
 * properties are marked !important. Custom CSS from the settings screen is
 * appended after this file, so it can still override with !important.
 */

.jlp-widget {
	position: fixed;
	z-index: var(--jlp-z, 99999);
	display: flex;
	flex-direction: column;
	gap: 12px;
	box-sizing: border-box;
	max-width: calc(100vw - (var(--jlp-offset-x, 24px) * 2));
	margin: 0;
	padding: 0;
	font-family: inherit;
	line-height: 1.4;
	text-align: left;
}

.jlp-widget[hidden] {
	display: none !important;
}

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

/* ---------- Panel ---------- */

.jlp-widget .jlp-panel {
	position: relative;
	width: var(--jlp-width, 340px);
	max-width: 100%;
	margin: 0 !important;
	padding: 28px 22px 22px !important;
	background: var(--jlp-panel-bg, #01132b) !important;
	border: 0 !important;
	border-radius: var(--jlp-panel-radius, 4px) !important;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
	opacity: 0;
	transform: translateY(12px);
	transition: opacity 0.25s ease, transform 0.25s ease;
}

.jlp-widget .jlp-panel[hidden] {
	display: none !important;
}

.jlp-widget.is-open .jlp-panel {
	opacity: 1;
	transform: translateY(0);
}

/* ---------- Heading and subtitle ---------- */

.jlp-widget .jlp-panel .jlp-title {
	display: block !important;
	margin: 0 0 6px !important;
	padding: 0 !important;
	color: var(--jlp-title, #ffffff) !important;
	font-family: inherit !important;
	font-size: 26px !important;
	font-weight: 700 !important;
	line-height: 1.2 !important;
	letter-spacing: normal !important;
	text-align: center !important;
	text-transform: none !important;
	background: none !important;
	border: 0 !important;
}

.jlp-widget .jlp-panel .jlp-title::before,
.jlp-widget .jlp-panel .jlp-title::after,
.jlp-widget .jlp-panel .jlp-subtitle::before,
.jlp-widget .jlp-panel .jlp-subtitle::after {
	content: none !important;
}

.jlp-widget .jlp-panel .jlp-subtitle {
	display: block !important;
	margin: 0 0 18px !important;
	padding: 0 !important;
	color: var(--jlp-subtitle, #ffffff) !important;
	font-family: inherit !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	line-height: 1.4 !important;
	text-align: center !important;
	text-transform: none !important;
	background: none !important;
	opacity: 0.92;
}

/* ---------- Close button ---------- */

.jlp-widget .jlp-close {
	position: absolute;
	top: 8px;
	right: 10px;
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 26px !important;
	min-width: 0 !important;
	height: 26px !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	color: var(--jlp-close, #ffffff) !important;
	background: none !important;
	border: 0 !important;
	border-radius: 50% !important;
	box-shadow: none !important;
	cursor: pointer;
	opacity: 0.8;
	transition: opacity 0.15s ease, background-color 0.15s ease;
}

.jlp-widget .jlp-close:hover,
.jlp-widget .jlp-close:focus-visible {
	opacity: 1;
	background: rgba(255, 255, 255, 0.15) !important;
}

/* ---------- Links ---------- */

.jlp-widget .jlp-links {
	display: flex !important;
	flex-direction: column;
	gap: 10px;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

.jlp-widget .jlp-links .jlp-link-item {
	display: block !important;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
	border: 0 !important;
}

.jlp-widget .jlp-links .jlp-link-item::before,
.jlp-widget .jlp-links .jlp-link-item::after {
	content: none !important;
}

.jlp-widget .jlp-links .jlp-link-item::marker {
	content: "";
}

.jlp-widget .jlp-links .jlp-link {
	display: block !important;
	width: 100% !important;
	margin: 0 !important;
	padding: 11px 14px !important;
	color: var(--jlp-btn-text, #01132b) !important;
	font-family: inherit !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	line-height: 1.35 !important;
	letter-spacing: normal !important;
	text-align: center !important;
	text-decoration: none !important;
	text-transform: none !important;
	background: var(--jlp-btn-bg, #ffffff) !important;
	border: 1px solid var(--jlp-btn-border, #ffffff) !important;
	border-radius: var(--jlp-btn-radius, 4px) !important;
	box-shadow: none !important;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.jlp-widget .jlp-links .jlp-link:hover,
.jlp-widget .jlp-links .jlp-link:focus-visible {
	color: var(--jlp-btn-hover-text, #ffffff) !important;
	background: var(--jlp-btn-hover-bg, #ad9b81) !important;
	border-color: var(--jlp-btn-hover-border, #ad9b81) !important;
	text-decoration: none !important;
}

/* ---------- Reopen launcher ---------- */

.jlp-widget .jlp-launcher {
	display: inline-flex !important;
	align-items: center;
	gap: 8px;
	width: auto !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 11px 18px !important;
	color: var(--jlp-launcher-text, #ffffff) !important;
	font-family: inherit !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	line-height: 1.2 !important;
	text-transform: none !important;
	background: var(--jlp-launcher-bg, #ad9b81) !important;
	border: 0 !important;
	border-radius: 999px !important;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.jlp-widget .jlp-launcher[hidden] {
	display: none !important;
}

.jlp-widget .jlp-launcher:hover,
.jlp-widget .jlp-launcher:focus-visible {
	transform: translateY(-1px);
	box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
}

.jlp-widget .jlp-launcher svg,
.jlp-widget .jlp-close svg {
	flex: 0 0 auto;
	display: block;
	width: auto;
	max-width: none;
	vertical-align: middle;
}

/* ---------- Focus visibility ---------- */

.jlp-widget a:focus-visible,
.jlp-widget button:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* ---------- Small screens ---------- */

@media (max-width: 480px) {
	.jlp-widget .jlp-panel {
		width: calc(100vw - 32px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.jlp-widget .jlp-panel,
	.jlp-widget .jlp-launcher,
	.jlp-widget .jlp-links .jlp-link {
		transition: none;
	}
}
