/**
 * ACL Carte.
 *
 * Brand colours come from the theme's theme.json presets where available, with
 * literal fallbacks so the plugin still looks right if it's ever used outside
 * this theme.
 *
 * Selectors are two classes deep wherever they style a link or a list, because
 * Kadence's `.single-content a` / `.entry-content ul` rules are two-class and
 * beat anything shorter regardless of load order — the trap this project keeps
 * running into.
 */

.acl-carte {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 20px;
	/* Kadence renders .wp-block-column as display:flex, which makes this a
	   flex item with flex-basis:auto — i.e. sized by its content. The map is a
	   width:100% div and contributes no intrinsic width, so without this the
	   whole thing collapsed to 0 and Leaflet drew a sliver: 2 tiles instead of
	   8, in a box that looked empty. It only appeared to work while a row of
	   text underneath happened to give the box a width. */
	width: 100%;
}

/* ---- Venue list (server-rendered; works with JS off) ---- */

.acl-carte .acl-carte-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 14px;
}

.acl-carte .acl-carte-venue {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	margin: 0;
}

.acl-carte .acl-carte-pin {
	flex: 0 0 auto;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--wp--preset--color--navy, #001d48);
	color: var(--wp--preset--color--gold, #debb19);
	font-family: var(--wp--preset--font-family--barlow-condensed, inherit);
	font-weight: 700;
	font-size: 15px;
	line-height: 26px;
	text-align: center;
}

.acl-carte .acl-carte-venue-body {
	display: grid;
	gap: 2px;
}

.acl-carte .acl-carte-venue-name {
	font-family: var(--wp--preset--font-family--barlow-condensed, inherit);
	font-weight: 700;
	font-size: 17px;
	line-height: 1.2;
	text-transform: uppercase;
	letter-spacing: .01em;
	color: var(--wp--preset--color--navy, #001d48);
}

.acl-carte .acl-carte-venue-addr {
	font-size: 14px;
	line-height: 1.45;
	color: #4a5260;
}

.acl-carte .acl-carte-venue-details {
	display: grid;
	margin-top: 4px;
	font-size: 13px;
	line-height: 1.45;
	color: #6b7280;
}

.acl-carte .acl-carte-venue-link {
	justify-self: start;
	margin-top: 2px;
	font-family: var(--wp--preset--font-family--barlow-condensed, inherit);
	font-weight: 700;
	font-size: 13px;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--wp--preset--color--blue, #0267c7);
	text-decoration: none;
	border-bottom: 2px solid transparent;
}

.acl-carte .acl-carte-venue-link:hover,
.acl-carte .acl-carte-venue-link:focus-visible {
	border-bottom-color: var(--wp--preset--color--gold, #debb19);
}

/* ---- Map ---- */

.acl-carte .acl-carte-map-wrap {
	border-radius: 14px;
	overflow: hidden; /* clips the tiles to the rounded corners */
	box-shadow: 0 1px 3px rgba(0, 29, 72, .14);
}

.acl-carte .acl-carte-map {
	width: 100%;
	/* Leaflet needs a stacking context it controls; without this the map's
	   panes can end up above sticky site chrome when scrolling. */
	z-index: 0;
	background: #e8e6df; /* shown while tiles load, instead of white flash */
}

/* ---- Compact links row (shown when the venue list is suppressed) ---- */

.acl-carte .acl-carte-links {
	margin: 10px 0 0;
	display: flex;
	flex-wrap: wrap;
	gap: 6px 14px;
	align-items: baseline;
	font-size: 13px;
	line-height: 1.4;
}

.acl-carte .acl-carte-links-label {
	font-family: var(--wp--preset--font-family--barlow-condensed, inherit);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: #4a5260;
}

.acl-carte .acl-carte-links-item {
	color: var(--wp--preset--color--blue, #0267c7);
	text-decoration: none;
	border-bottom: 1px solid rgba(2, 103, 199, .35);
}

.acl-carte .acl-carte-links-item:hover,
.acl-carte .acl-carte-links-item:focus-visible {
	border-bottom-color: var(--wp--preset--color--gold, #debb19);
}

/* ---- Markers ---- */

.acl-carte-marker .acl-carte-marker-dot {
	display: block;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: var(--wp--preset--color--navy, #001d48);
	color: var(--wp--preset--color--gold, #debb19);
	border: 3px solid #fff;
	box-sizing: border-box;
	font-family: var(--wp--preset--font-family--barlow-condensed, sans-serif);
	font-weight: 700;
	font-size: 15px;
	line-height: 24px;
	text-align: center;
	box-shadow: 0 1px 4px rgba(0, 0, 0, .35);
}

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

.acl-carte-popup {
	display: grid;
	gap: 3px;
	min-width: 180px;
}

.acl-carte-popup strong {
	font-family: var(--wp--preset--font-family--barlow-condensed, inherit);
	font-size: 16px;
	text-transform: uppercase;
	color: var(--wp--preset--color--navy, #001d48);
}

.acl-carte-popup a {
	margin-top: 4px;
	font-weight: 700;
	font-size: 13px;
	color: var(--wp--preset--color--blue, #0267c7);
}

/* Two columns once there's room: list left, map right. Matches the mockup's
   .acl-grid-2 breakpoint so the section doesn't reflow at a different width
   from everything around it. */
@media (min-width: 861px) {
	.acl-carte {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
		gap: 28px;
		align-items: center;
	}

	/* One child only: the two-column rule would put it in the narrow track with
	   dead space beside it. Applies to both single-part modes. */
	.acl-carte.acl-carte--map-only,
	.acl-carte.acl-carte--list-only {
		grid-template-columns: minmax(0, 1fr);
	}
}
