/*
 * theme.css — restyling 2026
 * Sostituisce: bootstrap.css, style.css, autocomplete-custom.css,
 * skins/*.css, cubeportfolio.min.css, flexslider.css (rimossi: nessuna
 * view del tema li utilizza piu', vedi REPORT_PULIZIA.md).
 *
 * Il layout e le view usano classi Tailwind via CDN (vedi layouts/main.php);
 * questo file copre solo cio' che Tailwind non puo' stilizzare perche'
 * generato da widget Yii/jQuery UI (autocomplete, breadcrumb) con markup
 * non modificabile via classi.
 */

/* --- jQuery UI autocomplete (ricerca prodotti header) --- */
.ui-autocomplete {
	background: #fff;
	border: 1px solid #e4e4e7;
	border-radius: 10px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
	padding: 6px;
	max-height: 420px;
	overflow-y: auto;
	z-index: 1000;
	list-style: none;
	margin: 4px 0 0;
}

.ui-autocomplete .autocomplete-item {
	list-style: none;
}

.ui-autocomplete .autocomplete-item > a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px;
	border-radius: 8px;
	text-decoration: none;
	color: inherit;
}

.ui-autocomplete .autocomplete-item > a:hover,
.ui-autocomplete .ui-state-active {
	background: #f4f4f5;
}

.ui-autocomplete .autocomplete-item img {
	border-radius: 6px;
	object-fit: contain;
	flex-shrink: 0;
	background: #fafafa;
}

.ui-autocomplete .autocomplete-item-text {
	flex: 1;
	min-width: 0;
}

.ui-autocomplete .autocomplete-item-title {
	font-weight: 600;
	font-size: 13px;
	color: #18181b;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ui-autocomplete .autocomplete-item-code {
	font-size: 11px;
	color: #a1a1aa;
}

.promolabelsmall {
	background: #00694D;
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	border-radius: 100px;
	padding: 2px 7px;
	margin-left: 6px;
	flex-shrink: 0;
}

/* --- Breadcrumb (widget CBreadcrumbs, markup fisso) --- */
.breadcrumb li {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.breadcrumb a {
	color: #71717a;
}

.breadcrumb a:hover {
	color: #00694D;
}

.breadcrumb .active {
	color: #18181b;
	font-weight: 600;
}

/* --- Alert box (widget BootAlert, markup fisso: div.alert.alert-*) --- */
.alert {
	border-radius: 10px;
	padding: 12px 16px;
	margin-bottom: 16px;
	font-size: 13.5px;
	border: 1px solid transparent;
}

.alert-success { background: #f0fdf4; border-color: #bbf7d0; color: #15803d; }
.alert-danger  { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.alert-warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.alert-info    { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }

/* --- Paginazione (widget CLinkPager, markup fisso: ul > li > a) --- */
.yiiPager, .pager, .paginations {
	list-style: none;
	padding: 0;
	margin: 0;
}

.yiiPager li, .pager li, .paginations li {
	display: inline-block;
}

.yiiPager li a, .yiiPager li span,
.pager li a, .pager li span,
.paginations li a, .paginations li span {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 10px;
	border-radius: 8px;
	border: 1px solid #e4e4e7;
	background: #fff;
	color: #3f3f46;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
}

.yiiPager li a:hover, .pager li a:hover, .paginations li a:hover {
	border-color: #9AC43C;
}

.yiiPager li.selected a, .pager li.selected a, .paginations li.selected a {
	background: #9AC43C;
	border-color: #9AC43C;
	color: #fff;
}

.yiiPager li.hidden, .pager li.hidden, .paginations li.hidden {
	display: none;
}

/* --- CListView: loading overlay durante l'AJAX update --- */
.list-view .loading {
	opacity: .4;
}

/* ==========================================================================
   DARK MODE per il markup generato dai widget Yii/jQuery UI qui sopra.
   Tailwind e' in modalita' darkMode:'class' (vedi layouts/main.php, bottone
   tema in header): quando <html> ha la classe "dark", le regole sotto
   sovrascrivono i colori chiari. Non possiamo usare i prefissi dark: di
   Tailwind qui perche' questo file sono CSS puro, non classi di utilita'.
   ========================================================================== */

html.dark .ui-autocomplete {
	background: #18181b;
	border-color: #3f3f46;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
}

html.dark .ui-autocomplete .autocomplete-item > a:hover,
html.dark .ui-autocomplete .ui-state-active {
	background: #27272a;
}

html.dark .ui-autocomplete .autocomplete-item img {
	background: #27272a;
}

html.dark .ui-autocomplete .autocomplete-item-title {
	color: #f4f4f5;
}

html.dark .ui-autocomplete .autocomplete-item-code {
	color: #71717a;
}

html.dark .breadcrumb a {
	color: #a1a1aa;
}

html.dark .breadcrumb a:hover {
	color: #9AC43C;
}

html.dark .breadcrumb .active {
	color: #f4f4f5;
}

html.dark .alert-success { background: #052e1a; border-color: #14532d; color: #86efac; }
html.dark .alert-danger  { background: #2c0b0b; border-color: #7f1d1d; color: #fca5a5; }
html.dark .alert-warning { background: #2c1c05; border-color: #78350f; color: #fcd34d; }
html.dark .alert-info    { background: #051c33; border-color: #1e3a8a; color: #93c5fd; }

html.dark .yiiPager li a, html.dark .yiiPager li span,
html.dark .pager li a, html.dark .pager li span,
html.dark .paginations li a, html.dark .paginations li span {
	border-color: #3f3f46;
	background: #18181b;
	color: #d4d4d8;
}

html.dark .yiiPager li a:hover, html.dark .pager li a:hover, html.dark .paginations li a:hover {
	border-color: #9AC43C;
}

html.dark .yiiPager li.selected a, html.dark .pager li.selected a, html.dark .paginations li.selected a {
	background: #9AC43C;
	border-color: #9AC43C;
	color: #052e1a;
}

/* --- Paginazione (widget CLinkPager, markup fisso: ul > li > a) --- */
.yiiPager, .pager, .paginations {
	display: flex !important;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	list-style: none;
	padding: 0;
	margin: 0;
}

.yiiPager li, .pager li, .paginations li {
	display: block;
}
