/* M&S – Cookie Notice */

.msc {
	--msc-color: #1c7350;
	--msc-bg: #ffffff;
	--msc-text: #1f2a25;
	--msc-muted: #5b6862;
	--msc-line: #dfe5e2;
	--msc-radius: 14px;
	box-sizing: border-box;
	font-family: inherit;
	color: var(--msc-text);
	line-height: 1.5;
}

.msc *,
.msc *::before,
.msc *::after {
	box-sizing: border-box;
}

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

html.msc-lock {
	overflow: hidden;
}

/* ---------- Botones ---------- */
.msc .msc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	margin: 0;
	padding: 10px 20px;
	border: 2px solid var(--msc-color);
	border-radius: 999px;
	background: var(--msc-color);
	color: #fff;
	font: inherit;
	font-size: 15px;
	font-weight: 650;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
	cursor: pointer;
	transition: filter .2s, background-color .2s, color .2s;
}

.msc .msc-btn:hover {
	filter: brightness(.9);
}

.msc .msc-btn--outline {
	background: transparent;
	color: var(--msc-color);
}

.msc .msc-btn--outline:hover {
	background: var(--msc-color);
	color: #fff;
	filter: none;
}

.msc .msc-btn--link {
	padding-inline: 8px;
	border-color: transparent;
	background: transparent;
	color: var(--msc-text);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.msc .msc-btn--link:hover {
	filter: none;
	color: var(--msc-color);
}

.msc .msc-btn:focus-visible,
.msc a:focus-visible,
.msc input:focus-visible + .msc-switch__track,
.msc-prefs__close:focus-visible {
	outline: 3px solid var(--msc-color);
	outline-offset: 2px;
}

/* ---------- Aviso ---------- */
.msc-banner {
	position: fixed;
	z-index: 2147483000;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 16px;
	pointer-events: none;
	opacity: 0;
	transform: translateY(24px);
	transition: opacity .3s ease, transform .3s ease;
}

.msc-banner.is-visible {
	opacity: 1;
	transform: none;
}

.msc-banner__inner {
	display: flex;
	align-items: center;
	gap: 24px;
	max-width: 1180px;
	margin: 0 auto;
	padding: 20px 24px;
	border: 1px solid var(--msc-line);
	border-radius: var(--msc-radius);
	background: var(--msc-bg);
	box-shadow: 0 12px 40px rgba(0, 0, 0, .16);
	pointer-events: auto;
}

.msc-banner__content {
	flex: 1;
	min-width: 0;
}

.msc .msc-banner__title {
	margin: 0 0 4px;
	font-size: 17px;
	font-weight: 700;
	color: var(--msc-text);
}

.msc .msc-banner__text {
	margin: 0;
	font-size: 14.5px;
	color: var(--msc-text);
}

.msc .msc-banner__links {
	margin: 6px 0 0;
	font-size: 13px;
	color: var(--msc-muted);
}

.msc .msc-banner__links a {
	color: var(--msc-color);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.msc-banner__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 8px;
	flex-shrink: 0;
}

/* Caja en la esquina */
.msc-banner--box {
	right: auto;
	max-width: 440px;
}

.msc-banner--box .msc-banner__inner {
	flex-direction: column;
	align-items: stretch;
	gap: 16px;
}

.msc-banner--box .msc-banner__actions {
	justify-content: stretch;
}

.msc-banner--box .msc-btn:not(.msc-btn--link) {
	flex: 1 1 140px;
}

@media (max-width: 760px) {
	.msc-banner {
		padding: 10px;
	}

	.msc-banner__inner {
		flex-direction: column;
		align-items: stretch;
		gap: 14px;
		padding: 16px;
	}

	.msc-banner__actions {
		justify-content: stretch;
	}

	.msc-banner__actions .msc-btn:not(.msc-btn--link) {
		flex: 1 1 140px;
	}

	.msc-banner__actions .msc-btn--link {
		order: 3;
		flex-basis: 100%;
	}
}

/* ---------- Panel de preferencias ---------- */
.msc-prefs {
	position: fixed;
	z-index: 2147483001;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.msc-prefs__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(10, 20, 15, .55);
}

.msc-prefs__dialog {
	position: relative;
	width: 100%;
	max-width: 560px;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	padding: 28px;
	border-radius: var(--msc-radius);
	background: var(--msc-bg);
	box-shadow: 0 24px 64px rgba(0, 0, 0, .25);
}

.msc-prefs__dialog:focus {
	outline: none;
}

.msc .msc-prefs__title {
	margin: 0 32px 8px 0;
	font-size: 22px;
	line-height: 1.25;
	color: var(--msc-text);
}

.msc .msc-prefs__intro {
	margin: 0 0 18px;
	font-size: 14.5px;
	color: var(--msc-muted);
}

.msc .msc-prefs__close {
	position: absolute;
	top: 16px;
	right: 16px;
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #f1f4f2;
	color: var(--msc-text);
	cursor: pointer;
}

.msc .msc-cats {
	margin: 0 0 20px;
	padding: 0;
	list-style: none;
}

.msc .msc-cat {
	margin: 0;
	padding: 14px 0;
	border-top: 1px solid var(--msc-line);
}

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

.msc .msc-cat__name {
	font-weight: 650;
	font-size: 15.5px;
	cursor: pointer;
}

.msc .msc-cat__always {
	font-size: 13px;
	font-weight: 650;
	color: var(--msc-color);
	white-space: nowrap;
}

.msc .msc-cat__desc {
	margin: 4px 0 0;
	font-size: 13.5px;
	color: var(--msc-muted);
}

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

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

.msc-switch__track {
	position: absolute;
	inset: 0;
	border-radius: 999px;
	background: #c5cec9;
	transition: background-color .2s;
}

.msc-switch__track::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
	transition: transform .2s;
}

.msc-switch input:checked + .msc-switch__track {
	background: var(--msc-color);
}

.msc-switch input:checked + .msc-switch__track::after {
	transform: translateX(20px);
}

.msc-prefs__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.msc-prefs__actions .msc-btn {
	flex: 1 1 150px;
}

/* ---------- Botón flotante ---------- */
.msc-float {
	position: fixed;
	z-index: 2147482999;
	left: 16px;
	bottom: 16px;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid var(--msc-line);
	border-radius: 50%;
	background: var(--msc-bg);
	color: var(--msc-color);
	box-shadow: 0 4px 16px rgba(0, 0, 0, .14);
	cursor: pointer;
}

/* ---------- Contenido externo bloqueado ---------- */
.msc-placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	max-width: 100%;
	padding: 24px;
	border: 1px dashed var(--msc-line);
	border-radius: var(--msc-radius);
	background: #f5f7f6;
	text-align: center;
}

.msc .msc-placeholder p {
	margin: 0;
	max-width: 46ch;
	font-size: 14px;
	color: var(--msc-muted);
}

@media (prefers-reduced-motion: reduce) {
	.msc-banner,
	.msc-switch__track,
	.msc-switch__track::after {
		transition: none;
	}
}

@media print {
	.msc-banner,
	.msc-prefs,
	.msc-float {
		display: none !important;
	}
}
