/* =========================================================
 * SINGLE LISTING - CRONOLOGIA AVVISTAMENTI
 * ========================================================= */

.mps-lost-pets-sightings {
	margin-top: 18px;
	margin-bottom: 22px;
	max-width: 760px;
}

.mps-lost-pets-sightings__header {
	margin-bottom: 8px;
}

.mps-lost-pets-sightings__title {
	margin: 0;
	font-size: 24px;
	font-weight: 700;
	line-height: 1.25;
}

.mps-lost-pets-sightings__count {
	margin-top: 4px;
	font-size: 13px;
	opacity: 0.7;
}


/* Timeline */

.mps-lost-pets-sightings__list {
	position: relative;
	margin-top: 8px;
	padding-left: 28px;
}

/* Linea verticale */
.mps-lost-pets-sightings__list::before {
	content: "";
	position: absolute;
	top: 8px;
	bottom: 8px;
	left: 7px;
	width: 2px;
	background: rgba(0, 0, 0, 0.12);
}


/* Singolo avvistamento */

.mps-lost-pets-sighting {
	position: relative;
	margin: 0 0 16px;
	padding: 12px 14px;
	background: rgba(255, 255, 255, 0.92);
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 12px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.mps-lost-pets-sighting:last-child {
	margin-bottom: 0;
}

/* Punto della timeline */
.mps-lost-pets-sighting::before {
	content: "";
	position: absolute;
	top: 20px;
	left: -27px;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: #9c27b0;
	border: 3px solid #fff;
	box-sizing: border-box;
}


/* Data */

.mps-lost-pets-sighting__date {
	margin-bottom: 7px;
	font-size: 14px;
	font-weight: 700;
}


/* Luogo */

.mps-lost-pets-sighting__address {
	display: flex;
	align-items: flex-start;
	gap: 6px;
	margin-bottom: 8px;
	font-size: 14px;
	line-height: 1.4;
}


/* Descrizione */

.mps-lost-pets-sighting__details {
	margin-top: 8px;
	font-size: 14px;
	line-height: 1.5;
	font-style: italic;
}


/* Foto */

.mps-lost-pets-sighting__media {
	margin-bottom: 12px;
}

.mps-lost-pets-sighting__image {
	display: block;
	width: 100%;
	max-width: 360px;
	height: auto;
	border-radius: 10px;
}


/* Nessun avvistamento */

.mps-lost-pets-sightings__empty {
	margin-top: 12px;
	padding: 14px 16px;
	background: rgba(255, 255, 255, 0.7);
	border-radius: 10px;
	font-size: 14px;
}


/* Mobile */

@media (max-width: 600px) {

	.mps-lost-pets-sightings {
		margin-top: 8px;
	}

	.mps-lost-pets-sightings__title {
		font-size: 21px;
	}

	.mps-lost-pets-sightings__list {
		padding-left: 24px;
	}

	.mps-lost-pets-sighting {
		padding: 10px;
		margin-bottom: 8px;
	}

	.mps-lost-pets-sighting::before {
		left: -23px;
	}
}

/* SINGLE LISTING - CTA AVVISTAMENTO */

.mps-lost-pets-single-action {
	margin: 12px 0 16px;
}

.mps-lost-pets-single-sighting-button {
	display: inline-flex;
	align-items: center;
	gap: 10px;

	padding: 11px 17px;

	border: 0;
	border-radius: 10px;

	background: #ef3340;
	color: #fff;

	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;

	cursor: pointer;

	box-shadow: 0 3px 9px rgba(0, 0, 0, 0.10);

	transition:
		background 0.18s ease,
		transform 0.18s ease,
		box-shadow 0.18s ease;
}

.mps-lost-pets-single-sighting-button::before {
	content: "";

	width: 21px;
	height: 21px;
	flex: 0 0 21px;

	background-color: currentColor;

	-webkit-mask:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 5c-5.5 0-9.5 5-9.5 7s4 7 9.5 7 9.5-5 9.5-7S17.5 5 12 5zm0 12c-3.9 0-6.9-3.3-7.5-5 .6-1.7 3.6-5 7.5-5s6.9 3.3 7.5 5c-.6 1.7-3.6 5-7.5 5zm0-8a3 3 0 1 0 0 6 3 3 0 0 0 0-6z'/%3E%3C/svg%3E")
		center / contain no-repeat;

	mask:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 5c-5.5 0-9.5 5-9.5 7s4 7 9.5 7 9.5-5 9.5-7S17.5 5 12 5zm0 12c-3.9 0-6.9-3.3-7.5-5 .6-1.7 3.6-5 7.5-5s6.9 3.3 7.5 5c-.6 1.7-3.6 5-7.5 5zm0-8a3 3 0 1 0 0 6 3 3 0 0 0 0-6z'/%3E%3C/svg%3E")
		center / contain no-repeat;
}

.mps-lost-pets-single-sighting-button:hover {
	background: #d92735;
	color: #fff;
	transform: translateY(-1px);
	box-shadow: 0 5px 12px rgba(0, 0, 0, 0.14);
}

.mps-lost-pets-single-sighting-button:focus-visible {
	outline: 3px solid rgba(239, 51, 64, 0.28);
	outline-offset: 3px;
}

/* Icona posizione */

.mps-lost-pets-sighting__location-icon {
	width: 17px;
	height: 17px;
	flex: 0 0 17px;
	margin-top: 1px;

	background-color: #ef3340;

	-webkit-mask:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a7 7 0 0 0-7 7c0 5.25 7 13 7 13s7-7.75 7-13a7 7 0 0 0-7-7zm0 9.5A2.5 2.5 0 1 1 12 6a2.5 2.5 0 0 1 0 5.5z'/%3E%3C/svg%3E")
		center / contain no-repeat;

	mask:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a7 7 0 0 0-7 7c0 5.25 7 13 7 13s7-7.75 7-13a7 7 0 0 0-7-7zm0 9.5A2.5 2.5 0 1 1 12 6a2.5 2.5 0 0 1 0 5.5z'/%3E%3C/svg%3E")
		center / contain no-repeat;
}

.mps-lost-pets-sighting__date {
	display: flex;
	align-items: center;
	gap: 7px;
}

.mps-lost-pets-sighting__date::before {
	content: "";

	width: 16px;
	height: 16px;
	flex: 0 0 16px;

	background-color: #6b7280;

	-webkit-mask:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 4h-1V2h-2v2H8V2H6v2H5a3 3 0 0 0-3 3v12a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3V7a3 3 0 0 0-3-3zm1 15a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-8h16v8zM4 9V7a1 1 0 0 1 1-1h1v2h2V6h8v2h2V6h1a1 1 0 0 1 1 1v2H4z'/%3E%3C/svg%3E")
		center / contain no-repeat;

	mask:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 4h-1V2h-2v2H8V2H6v2H5a3 3 0 0 0-3 3v12a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3V7a3 3 0 0 0-3-3zm1 15a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-8h16v8zM4 9V7a1 1 0 0 1 1-1h1v2h2V6h8v2h2V6h1a1 1 0 0 1 1 1v2H4z'/%3E%3C/svg%3E")
		center / contain no-repeat;
}

/* =========================================================
   LOST PETS - GALLERY AVVISTAMENTO
   ========================================================= */

.mps-lost-pets-sighting__media {
	width: 110px;
	height: 110px;
	border-radius: 10px;
	overflow: hidden;

	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	grid-template-rows: repeat(2, minmax(0, 1fr));
	gap: 2px;
}

.mps-lost-pets-sighting__media-item {
	min-width: 0;
	min-height: 0;
	overflow: hidden;
	cursor: pointer;
}

.mps-lost-pets-sighting__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Una sola foto: occupa tutto il riquadro */
.mps-lost-pets-sighting__media-item:only-child {
	grid-column: 1 / -1;
	grid-row: 1 / -1;
}

/* Due foto: una accanto all'altra, altezza piena */
.mps-lost-pets-sighting__media:has(
	.mps-lost-pets-sighting__media-item:nth-child(2):last-child
) {
	grid-template-rows: 1fr;
}

/* Tre foto:
   la prima grande a sinistra,
   le altre due sovrapposte a destra */
.mps-lost-pets-sighting__media:has(
	.mps-lost-pets-sighting__media-item:nth-child(3):last-child
)
.mps-lost-pets-sighting__media-item:first-child {
	grid-row: 1 / -1;
}

/* =========================================================
   LOST PETS - CONTENUTO E AZIONI AVVISTAMENTO
   ========================================================= */

.mps-lost-pets-sighting__content {
	min-width: 0;

	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	grid-template-rows: auto auto 1fr;
	column-gap: 14px;
}

/* Testi nella colonna sinistra */
.mps-lost-pets-sighting__date,
.mps-lost-pets-sighting__address,
.mps-lost-pets-sighting__details {
	grid-column: 1;
}

.mps-lost-pets-sighting__date {
	grid-row: 1;
	font-weight: 600;
	margin-bottom: 5px;
}

.mps-lost-pets-sighting__address {
	grid-row: 2;
	margin-bottom: 5px;
}

.mps-lost-pets-sighting__details {
	grid-row: 3;
	line-height: 1.45;
}

/* Pulsanti: colonna destra dell'intera area contenuto */
.mps-lost-pets-sighting__actions {
	grid-column: 2;
	grid-row: 1 / -1;

	display: flex;
	flex-direction: column;
	align-items: stretch;
	justify-content: flex-start;
	gap: 6px;
}

.mps-lost-pets-sighting__actions button {
	width: 170px;
	margin: 0;
	text-align: center;
}

.mps-lost-pets-thank-reporter.is-thanked {
	background: #f3f4f6;
	border-color: #d1d5db;
	color: #9ca3af;
	font-style: italic;
	box-shadow: none;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {

	.mps-lost-pets-sighting__content {
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: auto;
	}

	.mps-lost-pets-sighting__date,
	.mps-lost-pets-sighting__address,
	.mps-lost-pets-sighting__details {
		grid-column: 1;
		grid-row: auto;
	}

	.mps-lost-pets-sighting__actions {
		grid-column: 1;
		grid-row: auto;

		flex-direction: row;
		justify-content: flex-end;
		align-items: center;

		width: 100%;
		margin-top: 7px;
		gap: 6px;
	}

	.mps-lost-pets-sighting__actions button {
		width: auto;
		padding: 5px 8px;
		font-size: 12px;
		line-height: 1.2;
		white-space: nowrap;
	}
}

/* =========================================================
 * MATCHES - "Potrebbe essere uno di questi?"
 * ======================================================= */

.mps-lost-pets-matches {
	margin: 20px 0;
	padding: 16px;
	border: 1px solid #e5e7eb;
	border-radius: 16px;
	background: #fff;
}

.mps-lost-pets-matches__title {
	margin-bottom: 6px;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
}

.mps-lost-pets-matches__intro {
	margin-bottom: 14px;
	font-size: 14px;
	line-height: 1.5;
	color: #6b7280;
}

.mps-lost-pets-matches__results {
	display: flex;
	gap: 12px;
	overflow-x: auto;
	padding-bottom: 6px;
	scroll-snap-type: x proximity;
	-webkit-overflow-scrolling: touch;
}

.mps-lost-pets-match-card {
	flex: 0 0 260px;
	overflow: hidden;
	border: 1px solid #e5e7eb;
	border-radius: 14px;
	background: #fff;
	scroll-snap-align: start;
}

.mps-lost-pets-match-card__image {
	display: block;
	width: 100%;
	height: 150px;
	object-fit: cover;
}

.mps-lost-pets-match-card__content {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 12px;
	font-size: 14px;
	line-height: 1.4;
}

.mps-lost-pets-match-card__title {
	font-size: 16px;
	line-height: 1.3;
}

.mps-lost-pets-match-card__actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-top: 6px;
}

.mps-lost-pets-match-card__actions a,
.mps-lost-pets-this-one {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 38px;
	padding: 8px 12px;
	border-radius: 9px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
}

.mps-lost-pets-match-card__actions a {
	border: 1px solid #d1d5db;
	background: #fff;
	color: #374151;
}

.mps-lost-pets-this-one {
	border: 0;
	background: #9C27B0;
	color: #fff;
}

.mps-lost-pets-matches__results::-webkit-scrollbar {
	height: 6px;
}

.mps-lost-pets-matches__results::-webkit-scrollbar-thumb {
	border-radius: 999px;
	background: #d1d5db;
}

/* =========================================================
 * FORM AVVISTAMENTO COLLEGATO
 * ========================================================= */

.mps-lost-pets-sighting-form {
	margin: 20px 0 28px;
	padding: 20px;
	max-width: 720px;

	background: rgba(255, 255, 255, 0.96);
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 16px;

	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.mps-lost-pets-sighting-form__title {
	margin-bottom: 18px;

	font-size: 22px;
	font-weight: 700;
	line-height: 1.25;
}

.mps-lost-pets-sighting-form label {
	display: block;
	margin-bottom: 16px;

	font-size: 14px;
	font-weight: 600;
}

.mps-lost-pets-sighting-form input[type="date"],
.mps-lost-pets-sighting-form input[type="time"],
.mps-lost-pets-sighting-form input[type="text"],
.mps-lost-pets-sighting-form input[type="file"],
.mps-lost-pets-sighting-form textarea {
	width: 100%;
	margin-top: 7px;
	padding: 10px 12px;

	border: 1px solid rgba(0, 0, 0, 0.14);
	border-radius: 10px;

	background: #fff;
	color: #222;

	font: inherit;
	box-sizing: border-box;
}

.mps-lost-pets-sighting-form textarea {
	resize: vertical;
	min-height: 95px;
}

.mps-lost-pets-sighting-form input:focus,
.mps-lost-pets-sighting-form textarea:focus {
	outline: none;
	border-color: #9c27b0;
	box-shadow: 0 0 0 3px rgba(156, 39, 176, 0.12);
}


/* Posizione */

.mps-lost-pets-sighting-form__location {
	margin-bottom: 16px;
	padding: 14px 16px;

	background: #f8f8f8;
	border-radius: 12px;
}

.mps-lost-pets-sighting-form__location > strong {
	display: block;
	margin-bottom: 6px;

	font-size: 14px;
}

.mps-lost-pets-sighting-form__address {
	font-size: 14px;
	line-height: 1.45;
}

.mps-lost-pets-sighting-form__location-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 12px;
}

.mps-lost-pets-use-location,
.mps-lost-pets-edit-location {
	border: 0;
	border-radius: 999px;
	padding: 8px 13px;

	font-size: 13px;
	font-weight: 600;

	cursor: pointer;
}

.mps-lost-pets-use-location {
	background: #ef3340;
	color: #fff;
}

.mps-lost-pets-edit-location {
	background: #ececec;
	color: #333;
}


/* Posizione manuale */

.mps-lost-pets-manual-location {
	margin: -4px 0 18px;
	padding: 14px 16px;

	background: #fafafa;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 12px;
}

.mps-lost-pets-manual-location__hint {
	margin-top: 6px;
	font-size: 12px;
	opacity: 0.7;
}


/* Data + ora */

.mps-lost-pets-sighting-form__row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}


/* Azioni */

.mps-lost-pets-sighting-form__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 18px;
}

.mps-lost-pets-submit-sighting,
.mps-lost-pets-cancel-sighting {
	border: 0;
	border-radius: 10px;
	padding: 10px 16px;

	font-size: 14px;
	font-weight: 700;

	cursor: pointer;
}

.mps-lost-pets-submit-sighting {
	background: #ef3340;
	color: #fff;
}

.mps-lost-pets-submit-sighting:hover {
	background: #d92735;
}

.mps-lost-pets-cancel-sighting {
	background: #ececec;
	color: #333;
}


/* Esito */

.mps-lost-pets-sighting-success {
	padding: 16px;

	background: #f4fff7;
	border: 1px solid rgba(0, 128, 0, 0.15);
	border-radius: 12px;

	font-size: 14px;
}

.mps-lost-pets-sighting-warning {
	margin-top: 8px;
	color: #a33;
}


/* Mobile */

@media (max-width: 600px) {

	.mps-lost-pets-sighting-form {
		padding: 16px;
		border-radius: 14px;
	}

	.mps-lost-pets-sighting-form__title {
		font-size: 20px;
	}

	.mps-lost-pets-sighting-form__row {
		grid-template-columns: 1fr;
		gap: 0;
	}

	.mps-lost-pets-sighting-form__actions {
		flex-direction: column;
	}

	.mps-lost-pets-submit-sighting,
	.mps-lost-pets-cancel-sighting {
		width: 100%;
	}
}

/* =========================================================
 * TOAST
 * ========================================================= */

.mps-lost-pets-toast {
	position: fixed;
	right: 20px;
	bottom: 24px;
	z-index: 999999;

	max-width: 360px;
	padding: 13px 16px;

	border-radius: 12px;

	background: #1f2937;
	color: #fff;

	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;

	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);

	opacity: 0;
	transform: translateY(12px);

	transition:
		opacity 0.22s ease,
		transform 0.22s ease;
}

.mps-lost-pets-toast.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.mps-lost-pets-toast--success {
	background: #16803b;
}

.mps-lost-pets-toast--warning {
	background: #b76e00;
}

@media (max-width: 600px) {

	.mps-lost-pets-toast {
		left: 14px;
		right: 14px;
		bottom: 18px;
		max-width: none;
	}
}

/* =========================================================
   LOST PETS - MODALE DI CONFERMA
   ========================================================= */

.mps-lost-pets-confirm {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.mps-lost-pets-confirm__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.48);
}

.mps-lost-pets-confirm__dialog {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 460px;
	padding: 24px;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 18px 50px rgba(0, 0, 0, 0.20);
}

.mps-lost-pets-confirm__title {
	margin: 0 0 12px;
	font-size: 20px;
	line-height: 1.3;
}

.mps-lost-pets-confirm__message {
	margin-bottom: 22px;
	font-size: 15px;
	line-height: 1.55;
	white-space: pre-line;
}

.mps-lost-pets-confirm__actions {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
}

.mps-lost-pets-confirm__cancel,
.mps-lost-pets-confirm__accept {
	min-height: 42px;
	padding: 9px 18px;
	border-radius: 10px;
	cursor: pointer;
}

.mps-lost-pets-confirm__cancel {
	background: #fff;
	border: 1px solid #d7d7d7;
}

.mps-lost-pets-confirm__accept {
	border: 0;
	background: #9c27b0;
	color: #fff;
	font-weight: 600;
}

@media (max-width: 480px) {

	.mps-lost-pets-confirm {
		align-items: flex-end;
		padding: 12px;
	}

	.mps-lost-pets-confirm__dialog {
		max-width: none;
		padding: 20px;
		border-radius: 18px;
	}

	.mps-lost-pets-confirm__actions {
		flex-direction: column-reverse;
	}

	.mps-lost-pets-confirm__cancel,
	.mps-lost-pets-confirm__accept {
		width: 100%;
	}
}

.mps-lost-pets-confirm__cancel {
	background: #fff;
	border: 1px solid #d7d7d7;
	color: #333;
}

/* =========================================================
   TRACKMAP
   ========================================================= */
   
   .mps-lost-pets-trackmap__map {
	width: 100%;
	height: 480px;
	min-height: 320px;
}

@media (max-width: 480px) {
	.mps-lost-pets-trackmap__map {
		height: 65vh;
	}
}