/* Sviluppato da Ing. Giuseppe Strano */
/* XConsent — banner consensi cookie */

.xc-root {
	position: fixed;
	z-index: 99999;
	inset: auto 0 0 0;
	display: flex;
	justify-content: center;
	padding: 1rem;
	font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
	font-size: 15px;
	line-height: 1.5;
}

.xc-root.xc-center {
	inset: 0;
	align-items: center;
	background: rgba(0, 0, 0, .5);
}

.xc-panel {
	position: relative;
	width: 100%;
	max-width: 46rem;
	background: #fff;
	color: #1a202c;
	border-radius: .75rem;
	box-shadow: 0 10px 40px rgba(0, 0, 0, .25);
	padding: 1.5rem 1.75rem;
}

.xc-panel h2 { margin: 0 0 .5rem; font-size: 1.15rem; }
.xc-body { margin: 0 0 1rem; }
.xc-link { color: var(--xc-accent, #2b6cb0); }

.xc-actions { display: flex; flex-wrap: wrap; gap: .6rem; }

.xc-btn {
	flex: 1 1 12rem;
	padding: .65rem 1.1rem;
	border: 1px solid var(--xc-accent, #2b6cb0);
	border-radius: .4rem;
	background: transparent;
	color: var(--xc-accent, #2b6cb0);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.xc-btn-primary { background: var(--xc-accent, #2b6cb0); color: #fff; }
.xc-btn:hover { filter: brightness(1.1); }
.xc-btn:focus-visible { outline: 3px solid var(--xc-accent, #2b6cb0); outline-offset: 2px; }

.xc-close {
	position: absolute;
	top: .5rem; right: .6rem;
	width: 2rem; height: 2rem;
	border: 0; background: transparent;
	font-size: 1.5rem; line-height: 1;
	color: #718096; cursor: pointer;
}

.xc-cats { display: grid; gap: .75rem; margin-bottom: 1.25rem; }

.xc-cat {
	display: flex; gap: .75rem; align-items: flex-start;
	padding: .75rem; border: 1px solid #e2e8f0; border-radius: .5rem;
}

.xc-cat input { margin-top: .3rem; width: 1.1rem; height: 1.1rem; flex: 0 0 auto; }
.xc-cat small { display: block; color: #4a5568; font-size: .85rem; }

.xc-reopen {
	position: fixed;
	left: 1rem; bottom: 1rem;
	z-index: 99998;
	padding: .5rem .9rem;
	border: 1px solid var(--xc-accent, #2b6cb0);
	border-radius: 2rem;
	background: #fff;
	color: var(--xc-accent, #2b6cb0);
	font: inherit; font-size: 13px;
	cursor: pointer;
	opacity: .85;
}

.xc-reopen:hover { opacity: 1; }

.xc-blocked {
	display: flex; flex-direction: column;
	align-items: center; justify-content: center;
	gap: .75rem;
	min-height: 12rem;
	padding: 1.5rem;
	background: #f7fafc;
	border: 1px dashed #cbd5e0;
	border-radius: .5rem;
	text-align: center;
	color: #4a5568;
}

.xc-blocked p { margin: 0; }
.xc-blocked .xc-btn { flex: 0 0 auto; }

@media (prefers-color-scheme: dark) {
	.xc-panel { background: #1a202c; color: #e2e8f0; }
	.xc-cat { border-color: #2d3748; }
	.xc-cat small { color: #a0aec0; }
	.xc-reopen { background: #1a202c; }
	.xc-blocked { background: #1a202c; border-color: #2d3748; color: #a0aec0; }
}

@media (max-width: 40rem) {
	.xc-btn { flex: 1 1 100%; }
}
