/* MS Cookie Consent */
.mscc,
.mscc * {
	box-sizing: border-box;
}

.mscc [hidden] {
	display: none !important;
}

.mscc {
	--mscc-text: #1f2328;
	--mscc-muted: #57606a;
	--mscc-bg: #ffffff;
	font-family: inherit;
	font-size: 15px;
	line-height: 1.5;
	color: var(--mscc-text);
}

/* Banner */
.mscc-banner {
	position: fixed;
	left: 16px;
	right: 16px;
	bottom: 16px;
	z-index: 1000000;
	max-width: 1080px;
	margin: 0 auto;
	padding: 20px 24px;
	background: var(--mscc-bg);
	border-radius: 8px;
	box-shadow: 0 6px 30px rgba(0, 0, 0, .22);
	display: flex;
	gap: 20px;
	align-items: center;
}

.mscc-banner__text {
	flex: 1 1 auto;
}

.mscc-banner__text p {
	margin: 0;
	padding: 0;
	color: var(--mscc-text);
}

.mscc a {
	color: var(--mscc-color, #1e3a5f);
	text-decoration: underline;
}

.mscc-banner__buttons,
.mscc-panel__buttons {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	flex: 0 0 auto;
}

/* Botones: Aceptar y Rechazar con el mismo peso visual */
.mscc-btn {
	appearance: none;
	min-width: 120px;
	padding: 10px 18px;
	border: 2px solid var(--mscc-color, #1e3a5f);
	border-radius: 4px;
	background: var(--mscc-color, #1e3a5f);
	color: #fff;
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	text-align: center;
}

.mscc-btn:hover {
	filter: brightness(1.12);
}

.mscc-btn--outline {
	background: transparent;
	color: var(--mscc-color, #1e3a5f);
}

.mscc-btn:focus-visible,
.mscc-close:focus-visible,
.mscc-switch input:focus-visible + .mscc-switch__slider {
	outline: 3px solid #f0b400;
	outline-offset: 2px;
}

/* Panel de configuración */
.mscc-overlay {
	position: fixed;
	inset: 0;
	z-index: 1000001;
	background: rgba(0, 0, 0, .5);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.mscc-panel {
	position: relative;
	width: 100%;
	max-width: 640px;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	padding: 28px;
	background: var(--mscc-bg);
	border-radius: 8px;
}

.mscc-panel__title {
	margin: 0 0 8px;
	padding: 0;
	font-size: 22px;
	line-height: 1.3;
	color: var(--mscc-text);
}

.mscc-panel__intro {
	margin: 0 0 16px;
	color: var(--mscc-muted);
}

.mscc-close {
	position: absolute;
	top: 10px;
	right: 12px;
	width: 36px;
	height: 36px;
	border: 0;
	background: transparent;
	font-size: 28px;
	line-height: 1;
	color: var(--mscc-muted);
	cursor: pointer;
}

.mscc-cat {
	padding: 14px 0;
	border-top: 1px solid #e5e7eb;
}

.mscc-cat p {
	margin: 6px 0 0;
	padding: 0;
	font-size: 14px;
	color: var(--mscc-muted);
}

.mscc-cat__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.mscc-cat__name {
	font-weight: 600;
	color: var(--mscc-text);
}

.mscc-cat__always {
	font-size: 13px;
	font-weight: 600;
	color: #1a7f37;
}

.mscc-panel__buttons {
	margin-top: 18px;
	padding-top: 18px;
	border-top: 1px solid #e5e7eb;
	justify-content: flex-end;
}

/* Interruptor */
.mscc-switch {
	position: relative;
	display: inline-block;
	width: 46px;
	height: 26px;
	flex: 0 0 auto;
}

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

.mscc-switch__slider {
	position: absolute;
	inset: 0;
	border-radius: 26px;
	background: #c4c9d0;
	transition: background .2s;
}

.mscc-switch__slider::before {
	content: "";
	position: absolute;
	left: 3px;
	top: 3px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #fff;
	transition: transform .2s;
}

.mscc-switch input:checked + .mscc-switch__slider {
	background: var(--mscc-color, #1e3a5f);
}

.mscc-switch input:checked + .mscc-switch__slider::before {
	transform: translateX(20px);
}

html.mscc-modal-open {
	overflow: hidden;
}

/* Vídeos y mapas bloqueados: mantienen el tamaño mientras no hay consentimiento */
iframe[data-mscc-src] {
	max-width: 100%;
	border: 0;
}

iframe[data-mscc-service="YouTube"],
iframe[data-mscc-service="Vimeo"] {
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
}

@media (max-width: 760px) {
	.mscc-banner {
		flex-direction: column;
		align-items: stretch;
		left: 8px;
		right: 8px;
		bottom: 8px;
		padding: 16px;
	}

	.mscc-banner__buttons,
	.mscc-panel__buttons {
		flex-direction: column;
	}

	.mscc-btn {
		width: 100%;
	}

	.mscc-panel {
		padding: 22px 18px;
	}
}

@media print {
	.mscc {
		display: none !important;
	}
}
