/* Protected-location gate form */
.mlm-protected-form {
	max-width: 420px;
	margin: 2rem auto;
	text-align: center
}

/* ──────────────────────────────────────────
   Card system
   ────────────────────────────────────────── */
.mlm-card {
	--mlm-strip: #2faa66;
	position: relative;
	overflow: hidden;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 6px 18px rgba(0,0,0,.05);
	padding: 18px;
	margin: 14px 0
}

.mlm-card::before {
	content: "";
	position: absolute;
	left: 0; top: 0; bottom: 0;
	width: 6px;
	background: var(--mlm-strip);
}

.mlm-card--warning  { --mlm-strip: #d7263d; background: rgba(215,38,61,.10); border: 1px solid rgba(215,38,61,.28); }
.mlm-card--advisory { --mlm-strip: #f4b400; background: rgba(244,180,0,.14); border: 1px solid rgba(244,180,0,.30); }
.mlm-card--warning h3  { color: #b91c1c; }
.mlm-card--advisory h3 { color: #8a6a00; }

.mlm-card--about      { --mlm-strip: #2faa66; }
.mlm-card--address    { --mlm-strip: #1f9d5c; }
.mlm-card--coords     { --mlm-strip: #1f9d5c; }
.mlm-card--contact    { --mlm-strip: #2b7bbb; }
.mlm-card--hours      { --mlm-strip: #2b7bbb; }
.mlm-card--extra      { --mlm-strip: #7a5af8; }
.mlm-card--gallery    { --mlm-strip: #ff6b00; }
.mlm-card--map        { --mlm-strip: #00a3a3; }
.mlm-card--annotations{ --mlm-strip: #00a3a3; }
.mlm-card--navigate   { --mlm-strip: #2faa66; }
.mlm-card--share      { --mlm-strip: #2faa66; }
.mlm-card--owner      { --mlm-strip: #111827; }
.mlm-card--type       { --mlm-strip: #111827; }
.mlm-card--private    { --mlm-strip: #6b21a8; }

.mlm-card h3 { margin-top: 0 }

/* ──────────────────────────────────────────
   Private section
   ────────────────────────────────────────── */
.mlm-private-lock-header {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 1rem;
}
.mlm-private-lock-header svg {
	width: 22px; height: 22px;
	fill: #6b21a8;
	flex-shrink: 0;
}
.mlm-private-pw-form {
	display: flex;
	gap: 8px;
	align-items: center;
	flex-wrap: wrap;
}
.mlm-private-pw-form input[type="password"],
.mlm-private-pw-form input[type="text"] { max-width: 260px; }
.mlm-private-pw-form button {
	background: #6b21a8;
	color: #fff;
	border: none;
	padding: 8px 18px;
	border-radius: 8px;
	cursor: pointer;
	font-weight: 600;
}
.mlm-private-pw-form button:hover { filter: brightness(.9); }
.mlm-private-error { color: #c00; margin-top: 6px; font-size: .9rem; }
.mlm-private-content-inner { animation: mlm-private-fade-in .35s ease; }
@keyframes mlm-private-fade-in {
	from { opacity: 0; transform: translateY(-8px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* ──────────────────────────────────────────
   Layout helpers
   ────────────────────────────────────────── */
.mlm-row { display: grid; gap: 16px }
.mlm-row.cols-2 { grid-template-columns: 1fr 1fr }
@media (max-width:900px) { .mlm-row.cols-2 { grid-template-columns: 1fr } }

/* ──────────────────────────────────────────
   Page title
   ────────────────────────────────────────── */
.single-mlm_location .entry-meta,
.single-mlm_location .post-meta,
.single-mlm_location .posted-on { display: none !important }

.single-mlm_location .entry-title {
	display: flex;
	align-items: center;
	gap: .5rem;
	font-size: clamp(1.4rem, 2.2vw + 1rem, 2rem);
}
.single-mlm_location .entry-title::before {
	content: "";
	width: 6px; height: 1.2em;
	background: #2faa66;
	border-radius: 3px;
	box-shadow: 0 0 0 3px rgba(47,170,102,.15);
}

/* ──────────────────────────────────────────
   Gallery
   ────────────────────────────────────────── */
.mlm-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
	gap: 12px;
}
.mlm-gallery figure {
	display: block; margin: 0; max-width: none;
	background: #fff;
	border: 1px solid #e3e3e3;
	border-radius: 10px;
	overflow: hidden;
}
.mlm-gallery a[data-mlm-popup="1"],
.mlm-gallery video { display: block; background: #111; }
.mlm-gallery img,
.mlm-gallery video { width: 100%; height: 180px; display: block; object-fit: cover; }
.mlm-gallery figcaption { padding: 8px 10px; font-size: .92rem; line-height: 1.35; }

@media (max-width:640px) {
	.mlm-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.mlm-gallery img,
	.mlm-gallery video { height: 150px; }
}

/* ──────────────────────────────────────────
   Street View badge
   ────────────────────────────────────────── */
.mlm-street-badge {
	position: absolute;
	bottom: 6px; left: 6px;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: rgba(0,0,0,.55);
	color: #fff;
	font-size: .68rem;
	font-weight: 600;
	padding: 3px 7px;
	border-radius: 20px;
	z-index: 2;
	letter-spacing: .02em;
	backdrop-filter: blur(2px);
}
.mlm-street-badge svg { width: 11px; height: 11px; fill: #fff; flex-shrink: 0; }

/* ──────────────────────────────────────────
   Image popup
   ────────────────────────────────────────── */
a[data-mlm-popup="1"] img,
a[data-mlm-popup="1"].mlm-annotation-thumb-link img { cursor: zoom-in; }
body.mlm-popup-open { overflow: hidden; }
.mlm-image-popup[hidden] { display: none !important; }
.mlm-image-popup {
	position: fixed; inset: 0; z-index: 10000;
	display: flex; align-items: center; justify-content: center;
	padding: 16px;
}
.mlm-image-popup__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.72); z-index: 0; }
.mlm-image-popup__dialog {
	position: relative; z-index: 1;
	width: auto; max-width: 96vw; max-height: 92vh;
	margin: 0; padding: 0;
	background: transparent; border-radius: 0; box-shadow: none;
	isolation: isolate;
}
.mlm-image-popup__close {
	position: absolute; top: 8px; right: 8px;
	border: 1px solid #c9c9c9; border-radius: 8px;
	background: #fff; color: #1a1a1a;
	width: 34px; height: 34px;
	line-height: 1; font-size: 24px; font-weight: 700;
	display: inline-flex; align-items: center; justify-content: center;
	padding: 0; cursor: pointer;
}
.mlm-image-popup__close:hover,
.mlm-image-popup__close:focus-visible {
	background: #f1f1f1; color: #000; border-color: #999; outline: none;
}
.mlm-image-popup__img {
	display: block; max-width: 100%; max-height: 92vh;
	margin: 0 auto; object-fit: contain;
	filter: none !important; opacity: 1 !important;
	box-shadow: none !important; backdrop-filter: none !important;
	mix-blend-mode: normal !important; transform: none !important;
	image-rendering: auto;
}

/* ──────────────────────────────────────────
   Misc section styles
   ────────────────────────────────────────── */
.mlm-location-details h3 { margin-top: 1.5rem }
.mlm-navigation { margin-top: 1rem }
.mlm-navigation .button { margin-right: .5rem }
.mlm-owner-actions { margin: 2rem 0 0 }
.mlm-latlng { font-size: 1.15rem; margin-top: .25rem }

/* ──────────────────────────────────────────
   Coordinates copy + toast
   ────────────────────────────────────────── */
.mlm-copybtn {
	margin-top: 8px;
	display: inline-flex; align-items: center; gap: 6px;
	padding: 6px 10px; border-radius: 8px;
	border: 1px solid #2faa66; background: #2faa66; color: #fff;
	cursor: pointer
}
.mlm-copybtn:hover  { filter: brightness(.95) }
.mlm-copybtn:active { transform: translateY(1px) }
#mlm-toast {
	position: fixed; left: 50%; bottom: 24px;
	transform: translateX(-50%) translateY(16px);
	background: #1f9d5c; color: #fff;
	padding: 10px 14px; border-radius: 10px;
	box-shadow: 0 10px 24px rgba(0,0,0,.2);
	opacity: 0; pointer-events: none;
	transition: .3s ease; z-index: 9999
}
#mlm-toast.show { opacity: 1; transform: translateX(-50%) translateY(0) }

/* ──────────────────────────────────────────
   Share + QR
   ────────────────────────────────────────── */
#mlm-share-card { text-align: center }
#mlm-share-card .mlm-share-lead { opacity: .9; margin: .25rem 0 1rem; font-weight: 600 }
#mlm-share-card .mlm-share-wrap { display: flex; flex-direction: column; gap: 12px; align-items: center }

/* ──────────────────────────────────────────
   Responsive: location ID badge
   ────────────────────────────────────────── */
@media (max-width:900px) {
	.mlm-location-id-badge {
		display: block !important;
		width: 100% !important;
		box-sizing: border-box;
		text-align: center;
	}
}

/* ──────────────────────────────────────────
   At-a-glance badges
   ────────────────────────────────────────── */
.mlm-badges { display: flex; flex-wrap: wrap; gap: .4rem; margin: .75rem 0 1.25rem; }
.mlm-badge {
	display: inline-flex; align-items: center; gap: .25rem;
	padding: 4px 11px; border-radius: 20px;
	font-size: .78rem; font-weight: 600; line-height: 1.4;
	white-space: normal; word-break: break-word;
}
.mlm-badge--info     { background: #eef2ff; color: #3730a3; border: 1px solid #c7d2fe; }
.mlm-badge--green    { background: #edfaf4; color: #1a7a4a; border: 1px solid #6ee7b7; }
.mlm-badge--danger   { background: #fef2f2; color: #b91c1c; border: 1px solid #fca5a5; }
.mlm-badge--advisory { background: #fffbeb; color: #92400e; border: 1px solid #fcd34d; }
.mlm-location-date { font-size: .8rem; color: #9ca3af; margin: -.25rem 0 .6rem; }
