/*!
 * Over Store Locator - stile del front-end
 * Aspetto pensato per somigliare al widget a elenco + mappa che sostituisce.
 */

/* Montserrat (licenza SIL OFL 1.1) servito dal sito, senza richieste a Google */
@font-face {
	font-family: 'OSL Montserrat';
	font-style: normal;
	font-weight: 400 800;
	font-display: swap;
	src: url('../vendor/montserrat/montserrat-latin-ext.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: 'OSL Montserrat';
	font-style: normal;
	font-weight: 400 800;
	font-display: swap;
	src: url('../vendor/montserrat/montserrat-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


.osl,
.osl *,
.osl *::before,
.osl *::after {
	box-sizing: border-box;
}

.osl [hidden] {
	display: none !important;
}

.osl {
	--osl-h: 733px;
	--osl-accent: #99af52;
	--osl-marker: #315c34;
	--osl-text: #111111;
	--osl-muted: rgba(17, 17, 17, 0.5);
	--osl-line: rgba(17, 17, 17, 0.1);
	--osl-open: #0e8b25;
	--osl-soon: #ff7800;
	--osl-closed: #b82d2d;

	display: grid;
	grid-template-columns: 400px minmax(0, 1fr);
	width: 100%;
	max-width: 100%;
	height: var(--osl-h);
	margin: 0 auto;
	background: #fff;
	color: var(--osl-text);
	border: 1px solid var(--osl-line);
	font-family: 'OSL Montserrat', Montserrat, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	font-size: 14px;
	line-height: 1.3;
	text-align: left;
	letter-spacing: 0;
	text-transform: none;
}

.osl.osl--font-theme {
	font-family: inherit;
}

/* ---------- Pannello con elenco ---------- */

.osl .osl__panel {
	display: flex;
	flex-direction: column;
	min-width: 0;
	min-height: 0;
	background: #fff;
}

.osl .osl__head {
	flex: 0 0 auto;
	padding: 24px 12px 12px;
	border-bottom: 1px solid var(--osl-line);
}

.osl .osl__title {
	margin: 0;
	padding: 0;
	font-family: inherit;
	font-size: 32px;
	line-height: 40px;
	font-weight: 700;
	letter-spacing: -0.01em;
	text-transform: none;
	color: var(--osl-text);
}

.osl .osl__scroll {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 0 12px;
	scrollbar-width: thin;
	scrollbar-color: rgba(17, 17, 17, 0.3) transparent;
	outline: none;
}

.osl .osl__scroll::-webkit-scrollbar {
	width: 6px;
}

.osl .osl__scroll::-webkit-scrollbar-thumb {
	background: rgba(17, 17, 17, 0.28);
	border-radius: 3px;
}

.osl .osl__count {
	margin: 12px 0 8px;
	padding: 0;
	font-size: 14px;
	line-height: 18px;
	color: var(--osl-muted);
}

.osl .osl__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.osl .osl__card {
	display: flex;
	gap: 12px;
	margin: 0;
	padding: 12px 8px 12px 0;
	border-bottom: 1px solid var(--osl-line);
	list-style: none;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.osl .osl__card::marker {
	content: '';
}

.osl .osl__card:last-child {
	border-bottom: 0;
}

.osl .osl__card:hover {
	background: rgba(17, 17, 17, 0.025);
}

.osl .osl__card:focus-visible {
	outline: 2px solid var(--osl-marker);
	outline-offset: -2px;
}

.osl .osl__card.is-active {
	background: rgba(153, 175, 82, 0.16);
	box-shadow: inset 3px 0 0 var(--osl-accent);
	padding-left: 6px;
	margin-left: -6px;
	padding-right: 8px;
}

.osl .osl__thumb {
	flex: 0 0 90px;
	width: 90px;
	height: 120px;
	margin: 0;
	border-radius: 12px;
	overflow: hidden;
	background: #eceae4;
}

.osl .osl__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	object-fit: cover;
	box-shadow: none;
}

.osl .osl__body {
	flex: 1 1 auto;
	min-width: 0;
}

.osl .osl__name {
	margin: 0 0 4px;
	padding: 0;
	font-family: inherit;
	font-size: 18px;
	line-height: 24px;
	font-weight: 700;
	letter-spacing: 0;
	text-transform: none;
	color: var(--osl-text);
}

.osl .osl__badge {
	display: inline-block;
	margin-left: 4px;
	padding: 1px 8px;
	border-radius: 10px;
	background: var(--osl-accent);
	color: #fff;
	font-size: 11px;
	line-height: 16px;
	font-weight: 700;
	vertical-align: middle;
}

.osl .osl__status {
	margin: 0 0 8px;
	padding: 0;
	font-size: 14px;
	line-height: 18px;
	font-weight: 700;
}

.osl .osl__status--open .osl__state {
	color: var(--osl-open);
}

.osl .osl__status--soon .osl__state {
	color: var(--osl-soon);
}

.osl .osl__status--closed .osl__state {
	color: var(--osl-closed);
}

.osl .osl__when {
	color: var(--osl-muted);
	font-weight: 600;
}

.osl .osl__addr {
	margin: 0 0 4px;
	padding: 0;
	font-size: 13px;
	line-height: 16px;
	color: var(--osl-text);
}

.osl .osl__line {
	margin: 0;
	padding: 0;
	font-size: 16px;
	line-height: 24px;
}

.osl .osl__line a {
	color: var(--osl-text);
	text-decoration: none;
	box-shadow: none;
	border: 0;
}

.osl .osl__line a:hover,
.osl .osl__line a:focus-visible {
	text-decoration: underline;
}

.osl .osl__web a {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* ---------- Mappa e segnaposto ---------- */

.osl .osl__map {
	position: relative;
	min-width: 0;
	min-height: 0;
	overflow: hidden;
	background: #cfe3ef;
}

.osl .osl__placeholder,
.osl .osl__canvas {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
}

.osl .osl__placeholder {
	background:
		radial-gradient(ellipse at 50% 40%, #dcebf3 0%, #cfe3ef 60%, #c3dae8 100%);
}

.osl .osl__italy {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: block;
}

.osl .osl__land {
	fill: #f5f2e9;
	stroke: #bcb7a3;
	stroke-width: 1.2;
	stroke-linejoin: round;
}

.osl .osl__pin {
	cursor: pointer;
}

.osl .osl__pin path {
	fill: var(--osl-marker);
	stroke: #fff;
	stroke-width: 1.4;
	stroke-linejoin: round;
}

.osl .osl__pin circle {
	fill: #fff;
}

.osl .osl__pin:hover path {
	fill: #1f3d22;
}

.osl .osl__pin.is-active path {
	fill: var(--osl-accent);
}

.osl .osl__tip {
	position: absolute;
	z-index: 2;
	max-width: 240px;
	padding: 4px 9px;
	overflow: hidden;
	transform: translate(-50%, -100%);
	background: #111;
	color: #fff;
	border-radius: 6px;
	font-size: 12px;
	line-height: 16px;
	font-weight: 600;
	text-overflow: ellipsis;
	white-space: nowrap;
	pointer-events: none;
}

.osl .osl__ask {
	position: absolute;
	left: 16px;
	bottom: 24px;
	z-index: 3;
	width: min(340px, calc(100% - 32px));
	padding: 16px;
	background: #fff;
	border: 1px solid var(--osl-line);
	border-radius: 12px;
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.14);
	text-align: center;
}

.osl .osl__load {
	display: inline-block;
	margin: 0;
	padding: 10px 18px;
	border: 0;
	border-radius: 8px;
	background: var(--osl-marker);
	color: #fff;
	font-family: inherit;
	font-size: 14px;
	line-height: 18px;
	font-weight: 700;
	letter-spacing: 0;
	text-transform: none;
	cursor: pointer;
	box-shadow: none;
}

.osl .osl__load:hover,
.osl .osl__load:focus-visible {
	filter: brightness(1.12);
}

.osl.is-loading .osl__load {
	opacity: 0.6;
	pointer-events: none;
}

.osl .osl__notice {
	margin: 10px 0 0;
	padding: 0;
	font-size: 12px;
	line-height: 16px;
	color: var(--osl-muted);
}

/* ---------- Leaflet ---------- */

.osl .leaflet-container {
	width: 100%;
	height: 100%;
	background: #cfe3ef;
	font-family: inherit;
	font-size: 14px;
}

.osl .leaflet-bar {
	border: 0;
	border-radius: 6px;
	overflow: hidden;
	box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}

.osl .leaflet-bar a,
.osl .leaflet-bar a:hover {
	width: 34px;
	height: 34px;
	line-height: 34px;
	background: #fff;
	color: var(--osl-text);
	font-size: 22px;
	font-weight: 700;
	border-bottom: 1px solid var(--osl-line);
}

.osl .leaflet-bar a:last-child {
	border-bottom: 0;
}

.osl .leaflet-control-attribution {
	font-size: 11px;
}

.osl .osl-pin {
	background: none;
	border: 0;
	color: var(--osl-marker);
}

.osl .osl-pin svg {
	display: block;
	transform: scale(0.9);
	transform-origin: center bottom;
	transition: transform 0.15s ease;
	filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

.osl .osl-pin:hover svg,
.osl .osl-pin:focus svg {
	transform: scale(1.25);
}

.osl .osl-pin.is-active {
	color: var(--osl-accent);
}

.osl .osl-pin.is-active svg {
	transform: scale(1.25);
}

.osl .osl-reset {
	opacity: 0;
	transform: scale(0.85);
	pointer-events: none;
	transition: opacity 0.18s ease, transform 0.18s ease;
}

.osl .osl-reset.is-on {
	opacity: 1;
	transform: none;
	pointer-events: auto;
}

.osl .leaflet-bar.osl-reset {
	border-radius: 20px;
	box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}

.osl .leaflet-bar.osl-reset a,
.osl .leaflet-bar.osl-reset a:hover {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: auto;
	height: 36px;
	padding: 0 16px 0 12px;
	border-bottom: 0;
	border-radius: 20px;
	color: var(--osl-text);
	font-family: inherit;
	font-size: 13px;
	line-height: 36px;
	font-weight: 700;
	letter-spacing: 0;
	text-decoration: none;
	white-space: nowrap;
}

.osl .leaflet-bar.osl-reset a:hover,
.osl .leaflet-bar.osl-reset a:focus-visible {
	background: #f4f4f2;
}

.osl .osl-reset svg {
	display: block;
	flex: 0 0 auto;
	color: var(--osl-marker);
}

.osl .osl-reset__txt {
	display: block;
}

/* ---------- Scheda sulla mappa ---------- */

.osl .osl-popup .leaflet-popup-content-wrapper {
	padding: 0;
	overflow: hidden;
	border-radius: 12px;
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.24);
	color: var(--osl-text);
}

.osl .osl-popup .leaflet-popup-content {
	max-height: 520px;
	margin: 0;
	overflow-y: auto;
	font-size: 14px;
	line-height: 1.35;
}

.osl .osl-popup a.leaflet-popup-close-button {
	top: 8px;
	right: 8px;
	width: 28px;
	height: 28px;
	padding: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.92);
	color: var(--osl-text);
	font-size: 20px;
	line-height: 27px;
	text-align: center;
}

.osl .osl-pop__img {
	display: block;
	width: 100%;
	height: 160px;
	max-width: none;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	object-fit: cover;
}

.osl .osl-pop__body {
	padding: 14px 16px 16px;
}

.osl .osl-pop__name {
	margin: 0 0 6px;
	padding: 0;
	font-family: inherit;
	font-size: 18px;
	line-height: 24px;
	font-weight: 700;
	letter-spacing: 0;
	text-transform: none;
	color: var(--osl-text);
}

.osl .osl-pop__addr {
	margin: 0 0 6px;
	padding: 0;
	font-size: 13px;
	line-height: 17px;
}

.osl .osl-pop .osl__line {
	font-size: 15px;
	line-height: 22px;
}

.osl .osl-pop__hours {
	margin: 10px 0 0;
	padding: 8px 0 0;
	border-top: 1px solid var(--osl-line);
}

.osl .osl-pop__hours summary {
	cursor: pointer;
	font-size: 13px;
	line-height: 18px;
	font-weight: 700;
}

.osl .osl-pop__hours table {
	width: 100%;
	margin: 6px 0 0;
	border: 0;
	border-collapse: collapse;
	font-size: 13px;
	line-height: 18px;
}

.osl .osl-pop__hours th,
.osl .osl-pop__hours td {
	padding: 2px 0;
	border: 0;
	background: none;
	text-align: left;
	vertical-align: top;
	font-weight: 400;
	color: var(--osl-text);
}

.osl .osl-pop__hours th {
	width: 42%;
	padding-right: 8px;
	font-weight: 600;
	text-transform: capitalize;
}

.osl .osl-pop__hours tr.is-today th,
.osl .osl-pop__hours tr.is-today td {
	font-weight: 700;
}

.osl .osl-pop__cta {
	margin: 12px 0 0;
}

.osl .osl-pop__btn {
	display: inline-block;
	padding: 8px 16px;
	border-radius: 8px;
	background: var(--osl-marker);
	color: #fff !important;
	font-size: 13px;
	line-height: 18px;
	font-weight: 700;
	text-decoration: none !important;
}

.osl .osl-pop__btn:hover,
.osl .osl-pop__btn:focus-visible {
	filter: brightness(1.12);
}

/* ---------- Schermi stretti ---------- */

@media (max-width: 900px) {
	.osl {
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: 400px auto;
		height: auto;
	}

	.osl .osl__map {
		order: -1;
		height: 400px;
	}

	.osl .osl__panel {
		height: auto;
	}

	.osl .osl__scroll {
		max-height: 560px;
	}

	.osl .osl__title {
		font-size: 26px;
		line-height: 32px;
	}

	.osl .osl-pop__img {
		height: 110px;
	}

	.osl .osl__ask {
		left: 8px;
		right: 8px;
		bottom: 8px;
		width: auto;
		padding: 10px 12px;
	}

	.osl .osl__load {
		padding: 8px 14px;
	}

	.osl .osl__notice {
		margin-top: 6px;
		font-size: 11px;
		line-height: 14px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.osl .osl-pin svg,
	.osl .osl-reset,
	.osl .osl__card {
		transition: none;
	}
}
