/* Alé Location — styles for ale-ui.js (replaces jScrollPane, checkboxtree, stupidtable, jQuery UI datepicker, carouFredSel) */

/* ---------- photo rows: native horizontal scrollbar (was jScrollPane) ---------- */
.scroll-pane {
	overflow-x: auto;
	overflow-y: hidden;
	scrollbar-width: thin;
	scrollbar-color: #fba504 #222;
}
.scroll-pane::-webkit-scrollbar { height: 10px; }
.scroll-pane::-webkit-scrollbar-track { background: #222; border-radius: 5px; }
.scroll-pane::-webkit-scrollbar-thumb { background: #fba504; border-radius: 5px; }
.scroll-pane::-webkit-scrollbar-thumb:hover { background: #ffc04a; }

/* ---------- category trees (was jquery.checkboxtree.css) ---------- */
ul.checkboxTree {
	font-family: verdana, arial, sans-serif;
	padding-left: 5px;
	margin-bottom: 4px;
}
ul.checkboxTree li {
	list-style-type: none;
	position: relative;
	margin-left: -20px;
	color: black;
	font-weight: bold;
	padding-bottom: 5px;
}
ul.checkboxTree li li { margin-left: -45px; font-weight: normal; }
ul.checkboxTree li li li { margin-left: -25px; font-weight: normal; }
ul.checkboxTree li input { display: inline; }
ul.checkboxTree li.collapsed > ul { display: none; }
ul.checkboxTree li.expanded > ul { display: block; }
ul.checkboxTree .ale-tree-toggle {
	position: absolute;
	top: 0;
	left: -16px;
	width: 14px;
	text-align: center;
	cursor: pointer;
	user-select: none;
}
ul.checkboxTree .ale-tree-toggle:hover,
ul.checkboxTree .ale-tree-toggle:focus-visible { color: #fff; outline: none; }

/* ---------- sortable tables (was stupidtable) ---------- */
th[data-sort] { cursor: pointer; }
th[aria-sort="ascending"]::after { content: " \25B2"; font-size: .8em; }
th[aria-sort="descending"]::after { content: " \25BC"; font-size: .8em; }

/* ---------- date fields (was jQuery UI datepicker) ---------- */
input[type="date"] { font: inherit; color-scheme: dark; }

/* ---------- header slideshow (was the carouFredSel plugin) ---------- */
.ale-slideshow {
	position: relative;
	width: 1098px;
}
.ale-slides-viewport { overflow: hidden; }
.ale-slides {
	display: flex;
	will-change: transform;
}
.ale-slide {
	flex: 0 0 100%;
	margin: 0;
	text-align: center;
}
.ale-slide img {
	display: block;
	width: 100%;
	height: auto;
	border: 0;
}
.ale-slide figcaption {
	margin: 13px 0;
	color: #fff;
	font: 13px/1.4 'Open Sans', sans-serif;
}
.ale-slideshow-prev,
.ale-slideshow-next {
	position: absolute;
	top: 90px;
	padding: 0;
	border: 0;
	background: none;
	color: #fff;
	font: 25px/1.3 'Open Sans', sans-serif;
	cursor: pointer;
}
.ale-slideshow-prev { left: -30px; }
.ale-slideshow-next { left: 1120px; }
.ale-slideshow-prev:hover, .ale-slideshow-next:hover,
.ale-slideshow-prev:focus-visible, .ale-slideshow-next:focus-visible { color: #fba504; outline: none; }
@media (prefers-reduced-motion: reduce) { .ale-slides { transition: none !important; } }

/* tablets (760–1119px): the banner scales with the page, the arrows sit on the picture */
@media (max-width: 1119px) {
	.ale-slideshow { width: 100%; }
	.ale-slideshow-prev, .ale-slideshow-next { top: 0; height: calc(100% - 44px); width: 44px; background: linear-gradient(90deg, rgba(0,0,0,.35), transparent); }
	.ale-slideshow-prev { left: 0; }
	.ale-slideshow-next { left: auto; right: 0; background: linear-gradient(270deg, rgba(0,0,0,.35), transparent); }
}

/* phones (below 760px): the photos of each banner one by one (.ale-carosello, inc/ale-slideshow.php) */
.ale-carosello { display: none; }
@media (max-width: 759px) {
	.ale-slideshow { display: none; }
	.ale-carosello { display: block; margin: 0 calc(var(--ale-margine, 12px) * -1); } /* edge to edge */
	.ale-car-track { display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
		scrollbar-width: none; -webkit-overflow-scrolling: touch; transition: opacity .25s ease; outline: none; }
	.ale-car-track::-webkit-scrollbar { display: none; }
	.ale-car-track.is-ritorno { opacity: 0; }
	.ale-car-slide { flex: 0 0 100%; margin: 0; aspect-ratio: 3 / 2; max-height: 70vh; scroll-snap-align: center; scroll-snap-stop: always; background: #262626; } /* 70vh: phones held sideways */
	.ale-car-slide img { display: block; width: 100%; height: 100%; object-fit: cover; }
	.ale-car-info { display: flex; align-items: center; gap: 12px; padding: 9px 12px 0; font: 13px/1.4 'Open Sans', sans-serif; color: #fff; }
	.ale-car-codice { min-width: 3.5em; letter-spacing: .04em; }
	.ale-car-barra { flex: 1; height: 2px; background: #4a4a4a; border-radius: 2px; overflow: hidden; }
	.ale-car-barra i { display: block; height: 100%; width: 0; background: #fba504; transition: width .3s ease; }
}

/* ---------- location rows (inc/ale-righe.php), shared by all result / composition pages ---------- */
.location_row { background-color: black; height: 155px; width: 1100px; clear: both; }
.location_row_images { float: left; width: 990px; height: 150px; white-space: nowrap; border: 0; }
.location_row_images img { max-width: 160px; max-height: 120px; border: 0; margin-right: 5px; margin-top: 15px; vertical-align: middle; }
.location_row_images img:not([src]) { width: 160px; height: 107px; background: #1a1a1a; } /* placeholder until the thumbnail loads */
.location_row_menu {
	/* buttons column: max 6 items (code, INFO, ALL PHOTOS, PDF LOCATION, PDF GALLERY, PLAN) always fit in the 150px row */
	float: right; width: 96px; height: 150px; margin: 0 4px 0 0; padding: 10px 0 0; box-sizing: border-box;
	display: flex; flex-direction: column; align-items: flex-end; gap: 7px;
	font: 600 11px/1.2 'Open Sans', Arial, sans-serif; letter-spacing: .03em; text-align: right; white-space: nowrap;
}
.location_row_menu .idLocation { font-size: 13px; line-height: 1.2; margin-bottom: 2px; }
.location_row_menu a,
.location_row_menu .ale-pdf-gallery,
.location_row_menu .pdf_gallery { color: #fff; text-decoration: none; transition: color .15s ease; }
.location_row_menu a:hover, .location_row_menu a:focus-visible,
.location_row_menu .ale-pdf-gallery:hover, .location_row_menu .ale-pdf-gallery:focus-visible { color: #fba504; outline: none; }
.location_row .ale-casella { margin-right: 18px; }
.location_row .ale-pdf-gallery { -webkit-appearance: none; appearance: none; margin: 0; padding: 0; border: 0; background: none; font: inherit; letter-spacing: inherit; line-height: inherit; cursor: pointer; }
.ale-riga-inclusa { border-top: 5px solid green; } /* Modifica: photos of this location were in the saved composition */
.ale-riga-esclusa { border-top: 5px solid red; }

/* ---- composition name field (inc/ale-composizioni.php → ale_comp_campo_nome) ---- */
.ale-nome-comp { max-width: 560px; margin: 28px 0 22px; font-family: 'Open Sans', Arial, sans-serif; }
.ale-nome-comp label { display: block; margin-bottom: 7px; }
.ale-nome-comp input { display: block; width: 100%; box-sizing: border-box; padding: 10px 12px; border-radius: 8px; border: 1px solid #555;
	background: #1e1e1e; color: #fff; font: 14px/1.3 'Open Sans', Arial, sans-serif; }
.ale-nome-comp input::placeholder { color: #777; }
.ale-nome-comp input:focus { outline: none; border-color: #fba504; box-shadow: 0 0 0 3px rgba(251, 165, 4, .18); }
.ale-nome-comp.is-doppio input { border-color: #ef6b5f; box-shadow: 0 0 0 3px rgba(239, 107, 95, .18); }
.ale-nome-consiglio { margin: 7px 0 0; font-size: 12px; line-height: 1.5; color: #a8a8a8; }
.ale-nome-stato { margin: 6px 0 0; font-size: 12px; line-height: 1.5; }
.ale-nome-stato:empty { display: none; }
.ale-nome-stato.is-errore { color: #ff9a90; }
.ale-nome-stato.is-avviso { color: #f0b429; }
.ale-nome-rifiuto { max-width: 560px; margin: 30px 0; }
.ale-nome-rifiuto p { line-height: 1.5; }

/* two-button question inside AlePopup.message (used by the name checks and by the composition list) */
.ale-conferma p { margin: 0; line-height: 1.5; }
.ale-conferma-azioni { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.ale-conferma-azioni button { padding: 9px 16px; border-radius: 8px; border: 1px solid #555; background: transparent; color: #eee; font: 600 12px 'Open Sans', Arial, sans-serif; cursor: pointer; }
.ale-conferma-azioni button:hover, .ale-conferma-azioni button:focus-visible { border-color: #aaa; color: #fff; outline: none; }
.ale-conferma-azioni .is-primario { background: #fba504; border-color: #fba504; color: #1c1c1c; }
.ale-conferma-azioni .is-primario:hover, .ale-conferma-azioni .is-primario:focus-visible { background: #ffb933; border-color: #ffb933; color: #1c1c1c; }
.ale-popup-dialog.is-message .ale-conferma + .ale-popup-ok { display: none; }

/* ---- location picker AleUI.codici() (assets/ale-ui.js; markup: inc/ale-scelta.php → ale_codici_campo) ---- */
.ale-codici { clear: both; margin: 0 0 34px; padding: 18px 20px 20px; border: 1px solid #3a3a3a; border-radius: 12px; background: #262626;
	font-family: 'Open Sans', Arial, sans-serif; color: #eee; box-sizing: border-box; }
.ale-codici * { box-sizing: border-box; }
.ale-codici-titolo { font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 4px; }
.ale-codici-aiuto { margin: 0 0 12px; font-size: 12px; line-height: 1.5; color: #a8a8a8; }
.ale-codici-campo { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 48px; padding: 6px;
	border: 1px solid #555; border-radius: 10px; background: #1e1e1e; cursor: text; transition: border-color .15s ease, box-shadow .15s ease; }
.ale-codici-campo:focus-within { border-color: #fba504; box-shadow: 0 0 0 3px rgba(251,165,4,.18); }
.ale-codici-chips { display: contents; list-style: none; margin: 0; padding: 0; }
.ale-codici-chip { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 4px 0 3px; border-radius: 8px;
	background: #333; border: 1px solid #454545; color: #fff; font-size: 12px; cursor: grab; user-select: none; max-width: 260px;
	transition: background-color .15s ease, border-color .15s ease, opacity .15s ease, transform .15s ease; }
.ale-codici-chip:hover { background: #3a3a3a; border-color: #5a5a5a; }
.ale-codici-chip:focus-visible { outline: 2px solid #fba504; outline-offset: 1px; }
.ale-codici-chip img, .ale-codici-chip .no-foto { flex: none; width: 40px; height: 26px; border-radius: 5px; object-fit: cover; background: #222; }
.ale-codici-chip .num { font-weight: 700; color: #fba504; font-variant-numeric: tabular-nums; }
.ale-codici-chip .pos { flex: none; min-width: 16px; font-size: 10px; color: #8a8a8a; text-align: right; }
.ale-codici-chip .desc { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #bbb; }
.ale-codici-chip button { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin: 0; padding: 0;
	border: 0; border-radius: 6px; background: transparent; color: #999; font-size: 16px; line-height: 1; cursor: pointer; }
.ale-codici-chip button:hover, .ale-codici-chip button:focus-visible { background: rgba(239,107,95,.18); color: #ff9a90; outline: none; }
.ale-codici-chip.is-trascinata { opacity: .35; }
.ale-codici-chip.is-prima { box-shadow: inset 3px 0 0 #fba504; }
.ale-codici-chip.is-dopo { box-shadow: inset -3px 0 0 #fba504; }
.ale-codici-chip.is-nuova { animation: ale-codici-pop .35s ease; }
@keyframes ale-codici-pop { from { transform: scale(.85); background: #5a4312; } to { transform: none; } }
.ale-codici-campo input[type="text"] { flex: 1 1 180px; min-width: 150px; height: 34px; margin: 0; padding: 0 8px; border: 0; background: transparent;
	color: #fff; font: 14px 'Open Sans', Arial, sans-serif; outline: none; }
.ale-codici-campo input::placeholder { color: #777; }
.ale-codici-sugg { position: absolute; left: -1px; right: -1px; top: calc(100% + 6px); z-index: 50; max-height: 420px; overflow: auto; padding: 6px;
	border: 1px solid #444; border-radius: 10px; background: #1b1b1b; box-shadow: 0 16px 40px rgba(0,0,0,.55); }
.ale-codici-sugg[hidden] { display: none; }
.ale-codici-opz { display: flex; align-items: center; gap: 12px; padding: 7px 8px; border-radius: 8px; cursor: pointer; }
.ale-codici-opz img, .ale-codici-opz .no-foto { flex: none; width: 96px; height: 64px; border-radius: 6px; object-fit: cover; background: #2a2a2a; }
.ale-codici-opz .testo { min-width: 0; line-height: 1.35; }
.ale-codici-opz .num { font-size: 15px; font-weight: 700; color: #fba504; font-variant-numeric: tabular-nums; }
.ale-codici-opz .desc { display: block; font-size: 13px; color: #eee; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ale-codici-opz .citta { display: block; font-size: 11px; color: #999; }
.ale-codici-opz .gia { margin-left: auto; flex: none; font-size: 11px; color: #45c486; }
.ale-codici-opz[aria-selected="true"] { background: #2e2e2e; box-shadow: inset 3px 0 0 #fba504; }
.ale-codici-opz.is-gia { opacity: .55; }
.ale-codici-vuoto { padding: 12px 10px; font-size: 13px; color: #a8a8a8; }
.ale-codici-msg { min-height: 18px; margin: 6px 0 0; font-size: 12px; color: #a8a8a8; }
.ale-codici-msg.is-errore { color: #ff9a90; }
.ale-codici-azioni { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.ale-codici-conta { flex: 1; font-size: 12px; color: #a8a8a8; }
.ale-codici-conta strong { color: #fba504; }
.ale-codici-svuota { padding: 9px 14px; border-radius: 8px; border: 1px solid #555; background: transparent; color: #ddd; font: 600 12px 'Open Sans', Arial, sans-serif; cursor: pointer; }
.ale-codici-svuota:hover, .ale-codici-svuota:focus-visible { border-color: #aaa; color: #fff; outline: none; }
.ale-codici-vai { padding: 10px 18px; border-radius: 9px; border: 1px solid #fba504; background: #fba504; color: #1c1c1c; font: 700 13px 'Open Sans', Arial, sans-serif; cursor: pointer; }
.ale-codici-vai:hover, .ale-codici-vai:focus-visible { background: #ffb933; border-color: #ffb933; outline: none; }
@media (prefers-reduced-motion: reduce) { .ale-codici-chip.is-nuova { animation: none; } }
