/* Jiwye Lecture Map — frontend styles */

.jlm-root {
	position: relative;
	width: 100%;
}

/* Outer wrap: holds the map background AND the panel, overflow visible so the
   panel can overlap/spill past the bottom edge of the map, like the reference. */
.jlm-map-wrap {
	position: relative;
	max-width: 100%;
	margin: 0 auto;
	overflow: visible;
}

/* Map background image lives on its own in-flow layer (not absolutely
   positioned) so it determines the wrap's height, while border/radius/shadow
   controls target only this layer, never clipping the overlapping panel. */
.jlm-map-bg {
	position: relative;
	width: 100%;
	height: 445px;
	background-color: #ffffff;
	background-repeat: no-repeat;
	background-position: center;
	background-size: cover;
	/* Bundled placeholder map — always resolves relative to this stylesheet's
	   own URL, so it works regardless of WP subdirectory/multisite/CDN setup.
	   A custom "Map Image" upload overrides this via an inline style attribute,
	   which always wins over this external rule for the same property. */
	background-image: url('../img/world-map.png');
	pointer-events: none;
}

/* ---------- Pins ---------- */
.jlm-pin {
	position: absolute;
	transform: translate(-50%, -50%);
	border: 0 solid #fff;
	border-radius: 50%;
	background-color: #a4161a;
	padding: 0;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform .2s ease, background-color .2s ease;
	z-index: 5;
}

.jlm-pin:focus {
	outline: 2px solid #a4161a;
	outline-offset: 2px;
}

/* Pin shapes */
.jlm-pin-shape-pin {
	border-radius: 50% 50% 50% 0;
}

.jlm-pin-shape-ring {
	background-color: transparent !important;
	border-width: 3px !important;
	border-color: #a4161a;
}

/* Pulse animation */
.jlm-pulse-yes .jlm-pin::after {
	content: "";
	position: absolute;
	top: 0; left: 0; right: 0; bottom: 0;
	border-radius: inherit;
	background: inherit;
	opacity: .6;
	animation: jlm-pulse 1.8s ease-out infinite;
	z-index: -1;
}

@keyframes jlm-pulse {
	0%   { transform: scale(1);   opacity: .6; }
	100% { transform: scale(2.4); opacity: 0;  }
}

.jlm-pin-label {
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%);
	margin-top: 4px;
	white-space: nowrap;
	font-size: 11px;
	pointer-events: none;
}

/* ---------- Info panel (single, shared, position controlled via Style tab) ---------- */
.jlm-panel-holder {
	position: absolute;
	top: 52%;
	left: 12%;
	width: 58%;
	min-height: 227px;
	background-color: #ffffff;
	border: 1px solid #999999;
	border-radius: 6px;
	padding: 26px 30px;
	box-sizing: border-box;
	overflow: auto;
	z-index: 10;
}

.jlm-panel {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	padding: inherit;
	box-sizing: border-box;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition-property: opacity;
	transition-duration: .3s;
	transition-timing-function: ease;
}

.jlm-panel.is-active {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.jlm-transition-none .jlm-panel {
	transition: none;
}

.jlm-panel-top {
	display: flex;
	align-items: flex-start;
	gap: 22px;
}

.jlm-panel-image {
	width: 160px;
	height: 110px;
	object-fit: cover;
	border-radius: 2px;
	flex-shrink: 0;
	display: block;
}

.jlm-panel-title {
	font-family: Georgia, 'Times New Roman', serif;
	font-weight: 700;
	font-size: 24px;
	line-height: 1.3;
	color: #5b5b5b;
	flex: 1;
}

.jlm-panel-body {
	margin-top: 18px;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 14px;
	color: #444444;
	line-height: 1.5;
}

.jlm-panel-body p {
	margin: 0 0 4px 0;
}

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

.jlm-panel-body u,
.jlm-panel-body strong {
	text-decoration: underline;
	font-weight: 400;
}

/* ---------- Thumb nav (optional list) ---------- */
.jlm-thumb-nav {
	list-style: none;
	margin: 12px 0 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 10px 20px;
}

.jlm-thumb-nav li {
	cursor: pointer;
	opacity: .75;
	transition: opacity .2s ease, color .2s ease;
}

.jlm-thumb-nav li:hover,
.jlm-thumb-nav li.is-active {
	opacity: 1;
}

/* ---------- Responsive ---------- */
@media (max-width: 767px) {
	.jlm-panel-holder {
		position: relative;
		width: 100% !important;
		left: 0 !important;
		top: 0 !important;
		margin-top: 16px;
	}

	.jlm-panel-top {
		flex-direction: column;
	}

	.jlm-panel-image {
		width: 100%;
		height: auto;
		max-height: 180px;
	}
}
