/*
 * Djerba interactive map — visual styles for [evd_djerba_map].
 * Layout: map full-width on top, POI chips wrap below.
 */

.evd-djerba-map {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 32px 0;
	font-family: 'Josefin Sans', sans-serif;
}

.evd-djerba-map__viewport {
	background: rgba(255, 255, 255, 0.04);
	border-radius: 12px;
	overflow: hidden;
	min-height: 360px;
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
}

/* Toolbar above the chips: reset button on the right */
.evd-djerba-map__toolbar {
	display: flex;
	justify-content: flex-end;
}

.evd-djerba-map__reset {
	background: #ffffff;
	border: 1px solid #836f53;
	color: #836f53;
	padding: 7px 14px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}
.evd-djerba-map__reset:hover,
.evd-djerba-map__reset:focus-visible {
	background: #836f53;
	color: #ffffff;
	outline: none;
}

/* Category tabs — filters the chip list below. */
.evd-djerba-map__tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 4px;
	padding-bottom: 6px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.evd-djerba-map__tab {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.10);
	color: rgba(255, 255, 255, 0.70);
	padding: 6px 12px;
	border-radius: 999px;
	font: 600 12px/1 'Josefin Sans', sans-serif;
	letter-spacing: 0.04em;
	cursor: pointer;
	transition: background 0.18s, color 0.18s, border-color 0.18s;
}
.evd-djerba-map__tab:hover,
.evd-djerba-map__tab:focus-visible {
	background: rgba(185, 157, 117, 0.10);
	color: #ffffff;
	border-color: rgba(185, 157, 117, 0.45);
	outline: none;
}
.evd-djerba-map__tab.is-active {
	background: #b99d75;
	color: #1e3750;
	border-color: #b99d75;
}
.evd-djerba-map__tab-dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #d2351f;
}
.evd-djerba-map__tab-dot[data-category="beach"]     { background: #5fb3d4; }
.evd-djerba-map__tab-dot[data-category="monument"]  { background: #c27a00; }
.evd-djerba-map__tab-dot[data-category="religious"] { background: #9b7fbf; }
.evd-djerba-map__tab-dot[data-category="transport"] { background: #0d7c66; }
.evd-djerba-map__tab-dot[data-category="village"]   { background: #d2351f; }
.evd-djerba-map__tab-count {
	font-size: 11px;
	opacity: 0.65;
	font-weight: 500;
}
.evd-djerba-map__tab.is-active .evd-djerba-map__tab-count { opacity: 0.85; }

[data-pp-theme="light"] .evd-djerba-map__tab {
	border-color: rgba(30, 55, 80, 0.18);
	color: rgba(30, 55, 80, 0.70);
}
[data-pp-theme="light"] .evd-djerba-map__tab:hover {
	background: rgba(185, 157, 117, 0.15);
	color: #1e3750;
}
[data-pp-theme="light"] .evd-djerba-map__tab.is-active {
	background: #836f53;
	border-color: #836f53;
	color: #ffffff;
}

/* Chip list — flat wrap, filtered by active tab via JS. Centered so a
 * short category (3 chips) doesn't sit lop-sided against the left edge. */
.evd-djerba-map__legend {
	list-style: none;
	padding: 4px 0;
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
}
.evd-djerba-map__legend > li[hidden] { display: none; }

.evd-djerba-map__chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.12);
	color: rgba(255, 255, 255, 0.85);
	padding: 8px 14px;
	border-radius: 999px;
	font-size: 13px;
	font-family: inherit;
	cursor: pointer;
	transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.12s ease;
}
.evd-djerba-map__chip:hover,
.evd-djerba-map__chip:focus-visible,
.evd-djerba-map__chip.is-active {
	background: rgba(185, 157, 117, 0.18);
	border-color: rgba(185, 157, 117, 0.55);
	color: #ffffff;
	outline: none;
}
.evd-djerba-map__chip.is-active {
	transform: translateY(-1px);
}

.evd-djerba-map__chip-dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #d2351f;
	flex: 0 0 auto;
}
.evd-djerba-map__chip-time {
	display: inline-block;
	margin-left: 4px;
	padding: 1px 7px;
	background: rgba(185, 157, 117, 0.18);
	color: #b99d75;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.02em;
}
[data-pp-theme="light"] .evd-djerba-map__chip-time {
	background: rgba(185, 157, 117, 0.20);
	color: #836f53;
}
.evd-djerba-map__chip[data-category="beach"] .evd-djerba-map__chip-dot      { background: #5fb3d4; }
.evd-djerba-map__chip[data-category="monument"] .evd-djerba-map__chip-dot   { background: #c27a00; }
.evd-djerba-map__chip[data-category="religious"] .evd-djerba-map__chip-dot  { background: #9b7fbf; }
.evd-djerba-map__chip[data-category="transport"] .evd-djerba-map__chip-dot  { background: #0d7c66; }
.evd-djerba-map__chip[data-category="village"] .evd-djerba-map__chip-dot    { background: #d2351f; }

.evd-djerba-map__caption {
	margin: 0;
	font-size: 13px;
	font-style: italic;
	color: rgba(255, 255, 255, 0.55);
	text-align: center;
}

/* Kill the forced inner scrollbar Google ships on InfoWindow content */
.evd-djerba-map__viewport .gm-style-iw-d {
	overflow: visible !important;
	max-height: none !important;
}
.evd-djerba-map__viewport .gm-style-iw-c {
	max-height: none !important;
}

/* Shrink Google's default InfoWindow close button — its 40×40 hit-area
 * dwarfs our compact popup content. Target the wrapper button + the
 * inner SVG/img Google ships. */
.evd-djerba-map__viewport .gm-style-iw button.gm-ui-hover-effect {
	width: 22px !important;
	height: 22px !important;
	top: 4px !important;
	right: 4px !important;
	opacity: 0.65;
}
.evd-djerba-map__viewport .gm-style-iw button.gm-ui-hover-effect:hover {
	opacity: 1;
}
.evd-djerba-map__viewport .gm-style-iw button.gm-ui-hover-effect > span,
.evd-djerba-map__viewport .gm-style-iw button.gm-ui-hover-effect > img {
	width: 14px !important;
	height: 14px !important;
	margin: 4px !important;
}

/* InfoWindow content (renders inside Google's own bubble, on a white bg).
 * Use !important throughout because the theme's blog typography styles
 * (color, font-weight, link colour) otherwise cascade in. */
.evd-djerba-map__pop {
	font-family: 'Josefin Sans', sans-serif !important;
	color: #1e3750 !important;
	font-size: 13px !important;
	line-height: 1.45 !important;
	max-width: 240px;
}
.evd-djerba-map__pop-img {
	display: block;
	width: 100%;
	max-width: 240px;
	height: 130px;
	object-fit: cover;
	border-radius: 6px;
	margin: 0 0 10px !important;
}
.evd-djerba-map__pop strong {
	display: block;
	font-size: 15px !important;
	color: #1e3750 !important;
	font-weight: 700 !important;
	margin: 0 0 6px !important;
}
.evd-djerba-map__pop-blurb {
	margin: 0 0 8px !important;
	color: #1e3750 !important;
	font-size: 13px !important;
}
.evd-djerba-map__pop-trip {
	margin: 0 0 8px !important;
	color: #836f53 !important;
	font-weight: 700 !important;
	font-size: 13px !important;
}
.evd-djerba-map__pop-cta {
	display: inline-block;
	margin-top: 4px;
	padding: 4px 10px;
	background: #1e3750;
	color: #ffffff !important;
	border-radius: 4px;
	font-size: 12px;
	font-weight: 600;
	text-decoration: none !important;
	transition: background 0.18s ease;
}
.evd-djerba-map__pop-cta:hover,
.evd-djerba-map__pop-cta:focus-visible {
	background: #b99d75;
	color: #1e3750 !important;
	outline: none;
}

/* Light theme overrides */
[data-pp-theme="light"] .evd-djerba-map__chip {
	border-color: rgba(30, 55, 80, 0.18);
	color: #1e3750;
}
[data-pp-theme="light"] .evd-djerba-map__chip:hover,
[data-pp-theme="light"] .evd-djerba-map__chip:focus-visible,
[data-pp-theme="light"] .evd-djerba-map__chip.is-active {
	background: rgba(185, 157, 117, 0.20);
	border-color: rgba(185, 157, 117, 0.65);
	color: #1e3750;
}
[data-pp-theme="light"] .evd-djerba-map__caption {
	color: rgba(30, 55, 80, 0.60);
}

@media (max-width: 720px) {
	.evd-djerba-map__chip {
		padding: 6px 12px;
		font-size: 12px;
	}
	.evd-djerba-map__pop-img {
		height: 110px;
	}
}
@media (max-width: 480px) {
	.evd-djerba-map__viewport {
		min-height: 340px;
	}
}
