/* Mappa delle Escursioni - CAI Caserta (solo ASCII) */

.ae-intro { margin-bottom: 1.5em; }

/* elenco statico (visibile senza JavaScript) */
.ae-indice { line-height: 2em; }
.ae-indice a { margin-right: 0.8em; white-space: nowrap; }

/* barra filtri */
.ae-barra {
	position: -webkit-sticky;
	position: sticky;
	top: 0;
	z-index: 5;
	background: #ffffff;
	padding: 1em 0 0.5em 0;
	border-bottom: solid 1px #e5e5e5;
}
.ae-riga { margin-bottom: 0.75em; }
.ae-filtri { display: flex; flex-wrap: wrap; gap: 0.75em; align-items: center; }
.ae-filtri select { flex: 1 1 14em; width: auto; min-width: 0; }

#ae-app input.ae-q {
	height: 3em;
	padding-left: 2.6em;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4-4'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: 0.85em center;
}

.ae-gruppo { display: inline-flex; border: solid 1px #c9c9c9; border-radius: 4px; overflow: hidden; flex: 0 0 auto; }
.ae-gruppo button,
.ae-anni button {
	-webkit-appearance: none;
	appearance: none;
	box-shadow: none;
	background: #ffffff;
	color: #585858;
	border: 0;
	border-radius: 0;
	height: auto;
	line-height: 1.4;
	padding: 0.55em 1em;
	font-size: 0.8em;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: none;
	cursor: pointer;
}
.ae-gruppo button + button { border-left: solid 1px #c9c9c9; }
.ae-gruppo button.on { background: #005ADC; color: #ffffff; }

.ae-anni {
	display: flex;
	gap: 0.4em;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	padding-bottom: 0.4em;
	scrollbar-width: thin;
}
.ae-anni button { border: solid 1px #c9c9c9; border-radius: 2em; padding: 0.35em 0.9em; white-space: nowrap; flex: 0 0 auto; }
.ae-anni button small { font-weight: 400; color: #999999; margin-left: 0.2em; }
.ae-anni button.on { background: #07821D; border-color: #07821D; color: #ffffff; }
.ae-anni button.on small { color: #d6f0db; }
.ae-anni button:disabled { opacity: 0.35; cursor: default; }
.ae-gruppo button:focus, .ae-anni button:focus { outline: 2px solid #005ADC; outline-offset: -2px; }

.ae-stato { margin: 1em 0 0 0; font-size: 0.9em; color: #777777; }
.ae-vuoto { padding: 2em 0; color: #777777; text-align: center; }

/* gruppi */
.ae-sez { margin-top: 2em; }
h2.ae-titolo-sez {
	font-size: 1.4em;
	letter-spacing: 0.05em;
	margin: 0 0 0.5em 0;
	padding-bottom: 0.4em;
	border-bottom: solid 2px #07821D;
}
h2.ae-titolo-sez span { font-size: 0.6em; font-weight: 400; letter-spacing: 0; color: #888888; margin-left: 0.4em; }

/* voci */
ul.ae-lista { list-style: none; padding: 0; margin: 0 0 1em 0; }
ul.ae-lista li.ae-voce {
	display: flex;
	align-items: center;
	gap: 1em;
	padding: 0.8em 0.5em;
	border-bottom: solid 1px #ececec;
}
ul.ae-lista li.ae-voce:hover { background: #f7f9fc; }

.ae-quando {
	flex: 0 0 3.6em;
	text-align: center;
	line-height: 1.1;
	border: solid 1px #dcdcdc;
	border-radius: 6px;
	padding: 0.35em 0.2em;
	background: #ffffff;
}
.ae-g { display: block; font-size: 1.25em; font-weight: 900; color: #333333; }
.ae-m { display: block; font-size: 0.7em; text-transform: uppercase; letter-spacing: 0.1em; color: #07821D; font-weight: 700; }
.ae-a { display: block; font-size: 0.65em; color: #999999; }

.ae-cosa { flex: 1 1 auto; min-width: 0; }
a.ae-titolo { font-weight: 700; color: #333333; border-bottom: 0; line-height: 1.35; display: inline-block; }
a.ae-titolo:hover { color: #005ADC; }
.ae-dove { font-size: 0.85em; color: #777777; margin-top: 0.15em; }
.ae-tags { margin-top: 0.3em; }
.ae-tag, a.ae-all {
	display: inline-block;
	font-size: 0.7em;
	line-height: 1.6;
	padding: 0 0.6em;
	margin: 0 0.4em 0.2em 0;
	border-radius: 2em;
	background: #f0f0f0;
	color: #666666;
	border: 0;
	white-space: nowrap;
}
.ae-tag-trek { background: #e6f3e8; color: #07821D; }
.ae-tag-prog { background: #fff1d6; color: #9a6200; }
a.ae-all { background: #eaf1fc; color: #005ADC; }

a.ae-pdf {
	flex: 0 0 auto;
	font-size: 0.75em;
	font-weight: 700;
	letter-spacing: 0.08em;
	color: #005ADC;
	border: solid 1px #005ADC;
	border-radius: 4px;
	padding: 0.3em 0.7em;
}
a.ae-pdf:hover { background: #005ADC; color: #ffffff; }

@media screen and (max-width: 480px) {
	.ae-gruppo { width: 100%; }
	.ae-gruppo button { flex: 1 1 50%; }
	ul.ae-lista li.ae-voce { gap: 0.75em; padding: 0.75em 0.25em; align-items: flex-start; }
	.ae-quando { flex-basis: 3.2em; }
	a.ae-pdf { display: none; }
}

/* adattamenti al template (main.css forza colori e stili di input/pulsanti) */
#ae-app input.ae-q {
	-webkit-appearance: none;
	appearance: none;
	display: block;
	width: 100%;
	box-sizing: border-box;
	border: solid 1px #c9c9c9;
	border-radius: 4px;
	background-color: #ffffff;
	color: inherit;
	font-size: 1em;
	outline: 0;
}
#ae-app input.ae-q:focus { border-color: #07821D; box-shadow: 0 0 0 1px #07821D; }

#ae-app select {
	height: 2.6em;
	border: solid 1px #c9c9c9;
	border-radius: 4px;
	padding: 0 2.2em 0 0.8em;
	background-color: #ffffff;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23777' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.8em center;
	cursor: pointer;
}
#ae-app select:focus { border-color: #07821D; box-shadow: 0 0 0 1px #07821D; }

#ae-app .ae-gruppo button, #ae-app .ae-anni button { color: #585858 !important; box-shadow: none; }
#ae-app .ae-gruppo button { height: 2.6em; line-height: 2.6em; padding: 0 1em; }
#ae-app .ae-gruppo button:hover, #ae-app .ae-anni button:hover:enabled { color: #07821D !important; box-shadow: none; }
#ae-app .ae-gruppo button.on, #ae-app .ae-gruppo button.on:hover { color: #ffffff !important; }
#ae-app .ae-anni button.on, #ae-app .ae-anni button.on:hover { color: #ffffff !important; }

/* su schermi bassi la barra fissa occuperebbe troppo spazio */
@media screen and (max-width: 736px), screen and (max-height: 600px) {
	.ae-barra { position: static; }
}

.ae-errore {
	border: solid 1px #d9534f;
	background: #fdf0ef;
	color: #8a2a26;
	border-radius: 4px;
	padding: 1em 1.25em;
}

/* ---------- mappa ---------- */
.ae-mappa {
	position: relative;
	z-index: 0;
	height: 65vh;
	min-height: 380px;
	max-height: 680px;
	margin-top: 1.25em;
	border: solid 1px #dcdcdc;
	border-radius: 6px;
	background: #e9eef2;
}
.ae-mappa a { border-bottom: 0; }
.ae-legenda { font-size: 0.8em; color: #777777; margin: 0.6em 0 0 0; line-height: 2; }
.ae-pallino {
	display: inline-block;
	width: 11px;
	height: 11px;
	padding: 0;
	border-radius: 50%;
	vertical-align: -1px;
	margin: 0 0.35em 0 0.9em;
}
.ae-legenda .ae-pallino:first-child { margin-left: 0; }
.ae-p-esc { background: #07821D; }
.ae-p-trek { background: #005ADC; }
.ae-p-att { background: #888888; }
.ae-p-appr { background: rgba(7, 130, 29, 0.4); box-shadow: inset 0 0 0 1px #07821D; }

/* popup */
.ae-popup { font-family: inherit; font-size: 13px; line-height: 1.4; }
.ae-popup-data { color: #07821D; font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; }
.ae-mappa a.ae-popup-titolo { display: block; font-weight: 700; color: #333333; margin: 0.2em 0; font-size: 14px; }
.ae-mappa a.ae-popup-titolo:hover { color: #005ADC; }
.ae-popup-dove { color: #777777; }
.ae-popup-nota { color: #9a6200; font-size: 11px; margin-top: 0.3em; }
.ae-mappa a.ae-popup-pdf { display: inline-block; margin-top: 0.5em; color: #005ADC; font-weight: 700; }

/* azioni nelle voci dell'elenco */
.ae-azioni { flex: 0 0 auto; display: flex; gap: 0.4em; align-items: center; }
#ae-app button.ae-vai {
	-webkit-appearance: none;
	appearance: none;
	height: auto;
	line-height: 1.4;
	padding: 0.3em 0.7em;
	font-size: 0.75em;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #07821D !important;
	background: #ffffff;
	box-shadow: none;
	border: solid 1px #07821D;
	border-radius: 4px;
}
#ae-app button.ae-vai:hover { background: #07821D; color: #ffffff !important; }

@media screen and (max-width: 480px) {
	.ae-mappa { height: 55vh; min-height: 300px; }
	.ae-azioni { flex-direction: column; }
	.ae-azioni a.ae-pdf { display: none; }
}
