.mzp-wrap { position: relative; z-index: 0; width: 100%; max-width: var(--mzp-w, none); margin-left: auto; margin-right: auto; display: flex; align-items: stretch; }
.mzp-wrap--left { margin-left: 0; }
.mzp-wrap--right { margin-right: 0; }
.mzp-map { height: var(--mzp-h, 600px); flex: 1; min-width: 0; border-radius: 0 8px 8px 0; }
.mzp-map:first-child { border-radius: 8px; }

/* Przycisk "+" */
.mzp-add {
	position: absolute; right: 16px; bottom: 28px; z-index: 1000;
	width: 56px; height: 56px; padding: 0; border: 0; border-radius: 50%;
	background: #2271b1; color: #fff; font-size: 34px; line-height: 56px; text-align: center;
	box-shadow: 0 3px 10px rgba(0,0,0,.35); cursor: pointer; text-decoration: none;
}
.mzp-add:hover { background: #135e96; color: #fff; }
.mzp-add--login { width: auto; height: auto; padding: 12px 18px; border-radius: 28px; font-size: 15px; line-height: 1.2; }

/* Pasek podczas rysowania */
.mzp-bar {
	position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 1000;
	display: flex; gap: 12px; align-items: center; max-width: 92%;
	background: #1d2327; color: #fff; padding: 8px 12px; border-radius: 8px; font-size: 14px;
	box-shadow: 0 2px 8px rgba(0,0,0,.4);
}
.mzp-bar[hidden] { display: none; }
.mzp-bar button { background: #fff; color: #1d2327; border: 0; border-radius: 6px; padding: 5px 12px; cursor: pointer; }

/* Filtr kategorii */
.mzp-filter {
	position: absolute; top: 10px; right: 10px; z-index: 1000; max-width: 220px; max-height: 60%; overflow: auto;
	background: #fff; border-radius: 8px; padding: 8px 12px; font-size: 14px; box-shadow: 0 1px 6px rgba(0,0,0,.3);
}
.mzp-filter summary { cursor: pointer; font-weight: 600; }
.mzp-filter label { display: flex; align-items: center; gap: 6px; margin: 6px 0 0; cursor: pointer; }
.mzp-filter img { width: 20px; height: 20px; object-fit: contain; }
.mzp-filter i, .mzp-popup__cat i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }

/* Pin bez ikony */
.mzp-pin span {
	display: block; width: 28px; height: 28px; border-radius: 50% 50% 50% 0;
	transform: rotate(-45deg); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.45); box-sizing: border-box; position: relative;
}
.mzp-pin span::after { content: ""; position: absolute; width: 8px; height: 8px; left: 50%; top: 50%; margin: -4px 0 0 -4px; background: #fff; border-radius: 50%; }

/* Popup punktu */
.mzp-popup { font-size: 14px; line-height: 1.45; }
.mzp-popup h4 { margin: 4px 0 6px; font-size: 16px; }
.mzp-popup__cat { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #50575e; text-transform: uppercase; letter-spacing: .03em; }
.mzp-popup__cat img { width: 18px; height: 18px; object-fit: contain; }
.mzp-popup__text p { margin: 0 0 8px; }
/* Galeria: zdjęcie główne na całą szerokość (proporcjonalnie) + miniatury pod spodem */
.mzp-gal { margin: 8px 0; }
.mzp-gal__main { display: block; overflow: hidden; border-radius: 6px; background: #f0f0f1; cursor: zoom-in; }
.mzp-gal__main img { display: block; width: 100%; height: auto; max-height: 260px; object-fit: contain; margin: 0 auto; }
.mzp-gal__thumbs { display: flex; gap: 5px; margin-top: 5px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.mzp-gal__t { flex: 0 0 auto; width: 54px; height: 54px; margin: 0; padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; background: #f0f0f1; cursor: pointer; opacity: .7; transition: opacity .15s, border-color .15s; }
.mzp-gal__t:hover, .mzp-gal__t:focus-visible { opacity: 1; }
.mzp-gal__t.is-on { border-color: #7c3aed; opacity: 1; }
.mzp-gal__t img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mzp-popup__video { margin-top: 8px; }
.mzp-popup__video iframe, .mzp-popup__video video { width: 100%; max-width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 4px; display: block; }

/* Lightbox */
.mzp-lb { position: fixed; inset: 0; z-index: 100010; background: rgba(0,0,0,.88); display: flex; align-items: center; justify-content: center; }
.mzp-lb[hidden] { display: none; }
.mzp-lb img { max-width: 90vw; max-height: 88vh; border-radius: 4px; }
.mzp-lb button { position: absolute; background: rgba(255,255,255,.15); color: #fff; border: 0; cursor: pointer; border-radius: 50%; width: 44px; height: 44px; font-size: 28px; line-height: 1; }
.mzp-lb__x { top: 16px; right: 16px; }
.mzp-lb__prev { left: 12px; top: 50%; }
.mzp-lb__next { right: 12px; top: 50%; }
.mzp-lb--single .mzp-lb__nav { display: none; }

/* Okno dodawania */
body.mzp-lock { overflow: hidden; }
.mzp-modal { position: fixed; inset: 0; z-index: 100000; background: rgba(0,0,0,.3); display: flex; justify-content: flex-end; align-items: stretch; }
.mzp-modal[hidden] { display: none; }
.mzp-modal__box {
	position: relative; box-sizing: border-box; width: 420px; max-width: 100%; height: 100%; overflow-y: auto;
	background: #fff; color: #1d2327; padding: 22px 20px 28px; box-shadow: -4px 0 18px rgba(0,0,0,.25); font-size: 15px;
}
.mzp-modal__box h3 { margin: 0 0 14px; font-size: 20px; }
.mzp-modal__x { position: absolute; top: 8px; right: 12px; background: none; border: 0; font-size: 30px; line-height: 1; cursor: pointer; color: #50575e; }
.mzp-form label { display: block; margin: 0 0 12px; font-weight: 600; font-size: 14px; }
.mzp-form input[type=text], .mzp-form input[type=url], .mzp-form input[type=search], .mzp-form textarea, .mzp-form select {
	display: block; width: 100%; box-sizing: border-box; margin-top: 4px; padding: 8px 10px;
	border: 1px solid #8c8f94; border-radius: 6px; font: inherit; font-weight: 400; background: #fff; color: #1d2327;
}
.mzp-form input[type=file] { display: block; margin-top: 4px; font-weight: 400; max-width: 100%; }
.mzp-types { display: flex; gap: 8px; margin-bottom: 12px; }
.mzp-types label { flex: 1; margin: 0; }
.mzp-types input { position: absolute; opacity: 0; pointer-events: none; }
.mzp-types span { display: block; text-align: center; padding: 9px 4px; border: 2px solid #c3c4c7; border-radius: 8px; cursor: pointer; font-weight: 600; }
.mzp-types input:checked + span { border-color: #2271b1; background: #f0f6fc; color: #135e96; }
.mzp-geo { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.mzp-geo__status { font-size: 13px; color: #8a2424; }
.mzp-geo__status.is-ok { color: #1a7f37; font-weight: 600; }
.mzp-previews { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 12px; }
.mzp-previews img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; }
.mzp-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.mzp-msg { min-height: 20px; margin-bottom: 8px; font-size: 14px; }
.mzp-msg--err { color: #b32d2e; }
.mzp-actions { display: flex; justify-content: flex-end; gap: 8px; }
.mzp-btn { border: 1px solid transparent; border-radius: 6px; padding: 9px 16px; font: inherit; font-weight: 600; cursor: pointer; }
.mzp-btn--primary { background: #2271b1; color: #fff; }
.mzp-btn--primary:hover { background: #135e96; }
.mzp-btn--primary:disabled { opacity: .6; cursor: wait; }
.mzp-btn--ghost { background: #fff; color: #2271b1; border-color: #2271b1; }

@media (max-width: 640px) {
	.mzp-modal { align-items: flex-end; }
	.mzp-modal__box { width: 100%; height: auto; max-height: 92vh; border-radius: 14px 14px 0 0; }
	.mzp-filter { max-width: 160px; }
}

/* Mini mapa wyboru punktu */
.mzp-pick__tools { display: flex; gap: 6px; margin-bottom: 8px; }
.mzp-pick__tools input[type=search] { flex: 1; min-width: 0; margin-top: 0 !important; }
.mzp-pick__tools .mzp-btn { padding: 8px 12px; }
.mzp-mini { position: relative; z-index: 0; height: 270px; border: 1px solid #8c8f94; border-radius: 8px; margin-bottom: 8px; cursor: crosshair; }
.mzp-pick__bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.mzp-pick__bar .mzp-geo__status { flex: 1; min-width: 120px; }
.mzp-pick__bar .mzp-btn { padding: 5px 12px; font-size: 13px; }
.mzp-hint { font-size: 13px; color: #50575e; margin-bottom: 16px; }
.mzp-btn[hidden] { display: none; }
.mzp-modal__box { width: 460px; }

/* Lewy panel kategorii */
.mzp-side {
	flex: 0 0 260px; box-sizing: border-box; max-height: var(--mzp-h, 600px); overflow-y: auto;
	background: #fff; color: #1d2327; border: 1px solid #dcdcde; border-right: 0; border-radius: 8px 0 0 8px; font-size: 14px;
}
.mzp-side__head {
	display: flex; justify-content: space-between; align-items: center; width: 100%; box-sizing: border-box;
	background: #f6f7f7; border: 0; border-bottom: 1px solid #dcdcde; padding: 12px 14px;
	font: inherit; font-weight: 700; font-size: 15px; color: #1d2327; text-align: left; cursor: default;
}
.mzp-side__arrow { display: none; }
.mzp-side__tools { display: flex; gap: 6px; flex-wrap: wrap; padding: 8px 12px; border-bottom: 1px solid #f0f0f1; }
.mzp-side__tools button { background: #fff; border: 1px solid #c3c4c7; border-radius: 6px; padding: 3px 10px; font-size: 12px; cursor: pointer; color: #2271b1; }
.mzp-row { display: flex; align-items: center; justify-content: space-between; padding: 0 12px; }
.mzp-row label { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; margin: 0; padding: 7px 0; cursor: pointer; }
.mzp-row__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mzp-row__n { font-size: 12px; color: #646970; background: #f0f0f1; border-radius: 10px; padding: 0 7px; }
.mzp-row img { width: 24px; height: 24px; object-fit: contain; }
.mzp-row i { display: inline-block; width: 14px; height: 14px; border-radius: 50%; flex: none; }
.mzp-only { background: none; border: 0; color: #2271b1; font-size: 12px; cursor: pointer; opacity: 0; padding: 4px; }
.mzp-row:hover .mzp-only, .mzp-only:focus { opacity: 1; }
.mzp-row.is-empty { opacity: .5; }
@media (hover: none) { .mzp-only { opacity: 1; } }

/* Zwijanie panelu kategorii w lewo (desktop) */
.mzp-side { transition: flex-basis .25s ease; }
.mzp-side__head, .mzp-side__body { min-width: 258px; }
.mzp-tab {
	position: absolute; top: 130px; left: 260px; z-index: 1001;
	display: flex; align-items: center; gap: 6px; padding: 10px 9px;
	background: #fff; color: #1d2327; border: 1px solid #c3c4c7; border-left: 0; border-radius: 0 8px 8px 0;
	box-shadow: 2px 1px 6px rgba(0,0,0,.25); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
	transition: left .25s ease;
}
.mzp-tab:hover { background: #f0f6fc; color: #135e96; }
.mzp-wrap--collapsed .mzp-tab { left: 0; }
@media (min-width: 701px) {
	.mzp-wrap--collapsed .mzp-side { flex-basis: 0; border-width: 0; overflow: hidden; }
}

/* Telefon: panel kategorii wjeżdża NAD mapą po kliknięciu zakładki */
@media (max-width: 700px) {
	.mzp-side {
		position: absolute; z-index: 1002; top: 0; bottom: 0; left: 0; flex: none;
		width: min(78%, 280px); max-height: none;
		border-right: 1px solid #dcdcde; border-radius: 8px 0 0 8px;
		box-shadow: 3px 0 12px rgba(0,0,0,.3);
		transition: transform .25s ease, visibility 0s;
	}
	.mzp-wrap--collapsed .mzp-side {
		transform: translateX(-105%); box-shadow: none; visibility: hidden;
		transition: transform .25s ease, visibility 0s .25s;
	}
	.mzp-side__head { cursor: pointer; }
	.mzp-side__arrow { display: inline; }
	.mzp-map, .mzp-map:first-child { flex: 1; width: 100%; border-radius: 8px; }
	.mzp-tab { left: min(78%, 280px); }
	.mzp-wrap--collapsed .mzp-tab { left: 0; }
}

/* Przycisk przesuwania mapy */
.mzp-map { user-select: none; -webkit-user-select: none; }
.mzp-pan__btn { font-size: 16px; text-decoration: none; text-align: center; }
.mzp-map--locked.leaflet-grab, .mzp-map--locked .leaflet-grab { cursor: default; }

/* Licznik wieku punktu w popupie */
.mzp-popup__age {
	margin-top: 10px; padding: 8px 10px; border-radius: 6px; background: #f6f7f7;
	border-left: 4px solid var(--mzp-age, #50575e); display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline;
}
.mzp-age__n { font-weight: 700; color: var(--mzp-age, #1d2327); }

.mzp-age__d { flex-basis: 100%; font-size: 12px; color: #646970; }

.mzp-popup__more { display: inline-block; margin-top: 8px; font-weight: 600; text-decoration: none; }

/* ---- Strona punktu (artykuł) ---- */
.mzp-article { margin-top: 24px; }
.mzp-article__meta { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-bottom: 16px; font-size: 14px; }
.mzp-article__cat { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.mzp-article__cat img { width: 22px; height: 22px; object-fit: contain; }
.mzp-article__cat i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }
.mzp-article__date { color: #646970; }
.mzp-article__badge { padding: 3px 10px; border-radius: 12px; background: #f6f7f7; border: 1px solid var(--mzp-age, #c3c4c7); color: var(--mzp-age, #1d2327); font-weight: 700; }

/* galeria na stronie punktu */
.mzp-gal--page { margin: 16px 0; }
.mzp-gal--page .mzp-gal__main { border-radius: 10px; }
.mzp-gal--page .mzp-gal__main img { max-height: 75vh; }
.mzp-gal--page .mzp-gal__thumbs { gap: 8px; margin-top: 8px; }
.mzp-gal--page .mzp-gal__t { width: 84px; height: 84px; border-width: 3px; border-radius: 8px; }
.mzp-article__video { margin: 16px 0; }
.mzp-article__video iframe, .mzp-article__video video { width: 100%; max-width: 720px; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 8px; display: block; }
.mzp-article__h { margin: 28px 0 10px; }
.mzp-single-map { position: relative; z-index: 0; height: 320px; max-width: 100%; border-radius: 8px; border: 1px solid #c3c4c7; }
.mzp-article__link { display: inline-block; text-decoration: none; }

.mzp-msg--ok { color: #1a7f37; font-weight: 600; }

/* ---- Regulamin ---- */
.mzp-terms { display: flex; gap: 8px; align-items: flex-start; font-weight: 400 !important; margin: 4px 0 12px !important; }
.mzp-terms input { margin-top: 4px; }
.mzp-terms-modal { position: fixed; inset: 0; z-index: 100020; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.mzp-terms-modal[hidden] { display: none; }
.mzp-terms-modal__box { background: #fff; color: #1d2327; width: 560px; max-width: 100%; max-height: 90vh; display: flex; flex-direction: column; border-radius: 12px; padding: 20px; box-shadow: 0 8px 30px rgba(0,0,0,.4); }
.mzp-terms-modal__box h3 { margin: 0 0 10px; }
.mzp-terms-modal__text { overflow-y: auto; font-size: 14px; line-height: 1.55; margin-bottom: 14px; padding-right: 4px; }
.mzp-terms-modal__text p { margin: 0 0 10px; }

/* ---- ID punktu ---- */
.mzp-popup__uid { margin-top: 8px; font-size: 11px; color: #8c8f94; letter-spacing: .03em; text-align: right; }
.mzp-article__uid { margin-top: 28px; padding-top: 10px; border-top: 1px solid #dcdcde; font-size: 13px; color: #646970; letter-spacing: .03em; }

/* ---- Osobna strona dodawania punktu ---- */
.mzp-addpage { max-width: 680px; margin: 0 auto; }
.mzp-addpage .mzp-mini { height: 360px; }
.mzp-addpage__note { padding: 14px 16px; border-radius: 8px; background: #f6f7f7; border-left: 4px solid #2271b1; }
.mzp-done { padding: 20px; border-radius: 8px; background: #e6f4ea; border-left: 4px solid #1a7f37; }
.mzp-done h3 { margin: 0 0 8px; }
.mzp-done .mzp-btn { display: inline-block; margin: 4px 6px 4px 0; text-decoration: none; }

/* ---- Wyszukiwarka na mapie ---- */
.mzp-search { position: absolute; top: 10px; right: 10px; z-index: 1000; width: 300px; max-width: calc(100% - 70px); }
.mzp-search__row { display: flex; overflow: hidden; border-radius: 8px; background: #fff; box-shadow: 0 1px 6px rgba(0,0,0,.3); }
.mzp-search__row input { flex: 1; min-width: 0; border: 0; padding: 10px 12px; font: inherit; font-size: 14px; outline: none; background: #fff; color: #1d2327; box-shadow: none; }
.mzp-search__row button { border: 0; background: #2271b1; color: #fff; padding: 0 14px; font-size: 16px; cursor: pointer; }
.mzp-search__results { list-style: none; margin: 6px 0 0; padding: 4px; max-height: 260px; overflow-y: auto; background: #fff; border-radius: 8px; box-shadow: 0 1px 6px rgba(0,0,0,.3); }
.mzp-search__results[hidden] { display: none; }
.mzp-search__results li { margin: 0; padding: 0; }
.mzp-search__results button { display: block; width: 100%; text-align: left; border: 0; border-radius: 6px; background: none; padding: 8px 10px; font: inherit; font-size: 13px; line-height: 1.35; color: #1d2327; cursor: pointer; white-space: normal; }
.mzp-search__results button:hover { background: #f0f6fc; }
.mzp-search__note { padding: 8px 10px; font-size: 13px; color: #646970; }
.mzp-searchpin span { display: block; width: 18px; height: 18px; border-radius: 50%; background: #2271b1; border: 3px solid #fff; box-shadow: 0 0 0 2px #2271b1, 0 1px 5px rgba(0,0,0,.5); box-sizing: border-box; }

/* ---- Podgląd istniejących punktów w formularzu ---- */
.mzp-dup-opt { display: flex; align-items: center; gap: 8px; margin: 6px 0 !important; font-size: 13px; font-weight: 400 !important; }
.mzp-dupnote { margin: 2px 0 8px; font-size: 13px; color: #50575e; }
.mzp-dupnear { margin: 4px 0 10px; padding: 8px 10px; border-left: 4px solid #dba617; border-radius: 6px; background: #fff8e5; font-size: 13px; }
.mzp-dupnote[hidden], .mzp-dupnear[hidden] { display: none; }

/* Własna szerokość (shortcode width=) nie dotyczy telefonu */
@media (max-width: 700px) {
	.mzp-wrap { max-width: none; margin-left: 0; margin-right: 0; }
}

/* Link zewnętrzny na stronie punktu */
.mzp-article__ext { margin: 0 0 16px; }
.mzp-article__ext .mzp-btn { display: inline-block; text-decoration: none; }
