/**
 * Mousehouse CMP — CSS minimale, zero dipendenze.
 * Allineato a dark (#0b0b0c) / zinc del footer.
 */

.mh-consent {
	--mh-c-bg: #0b0b0c;
	--mh-c-panel: #171718;
	--mh-c-border: rgba(255, 255, 255, 0.12);
	--mh-c-text: #f0f0f0;
	--mh-c-muted: #a1a1aa;
	--mh-c-solid: #f0f0f0;
	--mh-c-solid-fg: #0b0b0c;
	--mh-c-focus: #ff2d5e;
	--mh-c-on: #22c55e;
	font-family: Involve, ui-sans-serif, system-ui, sans-serif;
	font-size: 0.875rem;
	line-height: 1.5;
	color: var(--mh-c-text);
	z-index: 100000;
}

.mh-consent[hidden],
.mh-consent__banner[hidden],
.mh-consent__modal[hidden] {
	display: none !important;
}

.mh-consent__banner {
	position: fixed;
	inset-inline: 0;
	bottom: 0;
	z-index: 100000;
	padding: 1rem;
	padding-bottom: max(1rem, env(safe-area-inset-bottom));
	pointer-events: none;
}

.mh-consent__banner-inner {
	pointer-events: auto;
	max-width: 72rem;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: 1rem;
	padding: 1.25rem 1.5rem;
	background: var(--mh-c-bg);
	border: 1px solid var(--mh-c-border);
	border-radius: 0.75rem;
	box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.35);
}

@media (min-width: 768px) {
	.mh-consent__banner-inner {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		gap: 1.5rem;
	}
}

.mh-consent__title {
	margin: 0 0 0.35rem;
	font-size: 0.95rem;
	font-weight: 600;
	letter-spacing: -0.02em;
}

.mh-consent__text {
	margin: 0;
	color: var(--mh-c-muted);
	max-width: 42rem;
}

.mh-consent__link {
	color: var(--mh-c-text);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.mh-consent__link:hover {
	opacity: 0.85;
}

.mh-consent__actions,
.mh-consent__panel-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	flex-shrink: 0;
}

.mh-consent__btn {
	appearance: none;
	border: 1px solid transparent;
	border-radius: 999px;
	padding: 0.55rem 1.15rem;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	min-width: 7.5rem;
	text-align: center;
	transition: opacity 0.15s ease;
}

.mh-consent__btn:hover {
	opacity: 0.9;
}

.mh-consent__btn:focus-visible {
	outline: 2px solid var(--mh-c-focus);
	outline-offset: 2px;
}

.mh-consent__btn--ghost {
	background: transparent;
	border-color: rgba(255, 255, 255, 0.28);
	color: var(--mh-c-text);
}

.mh-consent__btn--solid {
	background: var(--mh-c-solid);
	color: var(--mh-c-solid-fg);
}

.mh-consent__modal {
	position: fixed;
	inset: 0;
	z-index: 100001;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	padding: 1rem;
	padding-bottom: max(1rem, env(safe-area-inset-bottom));
}

@media (min-width: 640px) {
	.mh-consent__modal {
		align-items: center;
	}
}

.mh-consent__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
}

.mh-consent__panel {
	position: relative;
	z-index: 1;
	width: min(100%, 28rem);
	max-height: min(90vh, 36rem);
	overflow: auto;
	background: var(--mh-c-panel);
	border: 1px solid var(--mh-c-border);
	border-radius: 0.75rem;
	padding: 1.25rem 1.35rem 1.35rem;
	box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

.mh-consent__panel-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 0.5rem;
}

.mh-consent__panel-title {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 600;
	letter-spacing: -0.02em;
}

.mh-consent__panel-desc {
	margin: 0 0 1.25rem;
	color: var(--mh-c-muted);
}

.mh-consent__icon-btn {
	appearance: none;
	border: 0;
	background: transparent;
	color: var(--mh-c-muted);
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	padding: 0.15rem 0.35rem;
	border-radius: 0.35rem;
}

.mh-consent__icon-btn:hover {
	color: var(--mh-c-text);
}

.mh-consent__icon-btn:focus-visible {
	outline: 2px solid var(--mh-c-focus);
	outline-offset: 2px;
}

.mh-consent__cats {
	list-style: none;
	margin: 0 0 1.25rem;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.mh-consent__cat {
	border: 1px solid var(--mh-c-border);
	border-radius: 0.6rem;
	padding: 0.85rem 1rem;
	background: rgba(255, 255, 255, 0.03);
}

.mh-consent__cat--locked {
	opacity: 0.92;
}

.mh-consent__cat-row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
}

.mh-consent__cat-name {
	margin: 0 0 0.25rem;
	font-weight: 600;
}

.mh-consent__cat-desc {
	margin: 0;
	color: var(--mh-c-muted);
	font-size: 0.8125rem;
}

.mh-consent__badge {
	flex-shrink: 0;
	font-size: 0.7rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--mh-c-muted);
	border: 1px solid var(--mh-c-border);
	border-radius: 999px;
	padding: 0.35rem 0.65rem;
	white-space: nowrap;
}

.mh-consent__switch {
	position: relative;
	display: inline-flex;
	align-items: center;
	flex-shrink: 0;
	cursor: pointer;
	width: 2.75rem;
	height: 1.5rem;
}

.mh-consent__switch input {
	position: absolute;
	inset: 0;
	z-index: 1;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}

.mh-consent__switch-ui {
	display: block;
	width: 2.75rem;
	height: 1.5rem;
	border-radius: 999px;
	background: #3f3f46;
	border: 1px solid rgba(255, 255, 255, 0.15);
	transition: background 0.15s ease;
	position: relative;
	pointer-events: none;
}

.mh-consent__switch-ui::after {
	content: '';
	position: absolute;
	top: 2px;
	left: 2px;
	width: 1.1rem;
	height: 1.1rem;
	border-radius: 999px;
	background: #fff;
	transition: transform 0.15s ease;
}

.mh-consent__switch input:checked + .mh-consent__switch-ui {
	background: var(--mh-c-on);
	border-color: transparent;
}

.mh-consent__switch input:checked + .mh-consent__switch-ui::after {
	transform: translateX(1.2rem);
}

.mh-consent__switch input:focus-visible + .mh-consent__switch-ui {
	outline: 2px solid var(--mh-c-focus);
	outline-offset: 2px;
}

html.mh-consent-open {
	overflow: hidden;
}

/* Link footer “Gestisci cookie” */
.mh-consent-manage {
	appearance: none;
	border: 0;
	background: none;
	padding: 0;
	margin: 0;
	font: inherit;
	font-size: 0.75rem;
	line-height: inherit;
	color: #71717a;
	cursor: pointer;
	text-decoration: none;
	transition: color 0.2s;
}

.mh-consent-manage:hover {
	color: #e4e4e7;
}

.mh-consent-manage:focus-visible {
	outline: 2px solid var(--mh-c-focus, #ff2d5e);
	outline-offset: 2px;
	border-radius: 2px;
}
