/* OSM "Show on Map" widget — button + modal + Leaflet map. */

.tf-osm-widget {
	margin: 16px 0;
}

.tf-osm-widget .tf-osm-open {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	cursor: pointer;
	border: none;
	border-radius: 6px;
	padding: 16px 22px;
	font-size: 15px;
	font-weight: 400;
	line-height: 1;
	text-align: center;
	color: #fff !important;
	background: #84a93f !important;
	transition: background-color 0.3s ease;
}
.tf-osm-widget .tf-osm-open__icon {
	flex: 0 0 auto;
	display: block;
}
.tf-osm-widget .tf-osm-open:hover {
	background: #134e5a !important;
	color: #fff !important;
}
.tf-osm-widget .tf-osm-open:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* Modal */
.tf-osm-modal[hidden] {
	display: none;
}
.tf-osm-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}
.tf-osm-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(20, 31, 67, 0.55);
}
.tf-osm-modal__dialog {
	position: relative;
	width: min(1100px, 100%);
	height: min(80vh, 720px);
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}
/* High specificity + !important: theme/Tourfic button styles otherwise stretch
   this into a wide pill. */
.tf-osm-modal .tf-osm-modal__close {
	position: absolute;
	top: 10px;
	right: 12px;
	z-index: 1000;
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 36px !important;
	height: 36px !important;
	min-width: 0 !important;
	min-height: 0 !important;
	max-width: 36px !important;
	padding: 0 !important;
	margin: 0 !important;
	border: none !important;
	border-radius: 50% !important;
	background: #fff !important;
	color: #141f43 !important;
	font-size: 22px !important;
	font-weight: 400 !important;
	line-height: 1 !important;
	text-transform: none !important;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.tf-osm-modal .tf-osm-modal__close:hover {
	background: #f2f2f2 !important;
}

.tf-osm-map {
	width: 100%;
	height: 100%;
}

body.tf-osm-open-lock {
	overflow: hidden;
}

/* Marker popup card */
.tf-osm-popup__link {
	display: block;
	text-decoration: none;
	color: inherit;
}
.tf-osm-popup__thumb {
	display: block;
	width: 100%;
	height: 120px;
	object-fit: cover;
	border-radius: 6px;
	margin-bottom: 8px;
}
.tf-osm-popup__title {
	display: block;
	font-weight: 600;
	font-size: 14px;
	line-height: 1.3;
	color: #141f43;
}
.tf-osm-popup__price {
	margin-top: 6px;
	font-size: 14px;
	font-weight: 700;
	color: var(--tf-brand-dark, #0a535b);
}

/* Leaflet popup chrome tweaks */
.leaflet-popup-content {
	margin: 10px 12px;
}
.leaflet-container a.leaflet-popup-close-button {
	padding: 6px 6px 0 0;
}
