/**
 * Mark&Leads Legal — estilos públicos.
 * Aceptar, Rechazar y Configurar comparten tamaño y peso visual.
 */

.ml-legal-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ------------------------------------------------------------------ */
/* Botones                                                             */
/* ------------------------------------------------------------------ */
.ml-legal-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	min-width: 120px;
	padding: 10px 18px;
	margin: 0;
	border: 2px solid transparent;
	border-radius: var(--ml-radius, 6px);
	font-family: var(--ml-font, inherit);
	font-size: var(--ml-font-size, 15px);
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	box-shadow: none;
	transition: filter 0.15s ease;
}

.ml-legal-btn:hover {
	filter: brightness(1.15);
}

.ml-legal-btn:focus-visible,
.ml-legal-banner a:focus-visible,
.ml-legal-modal a:focus-visible,
.ml-legal-modal__close:focus-visible,
.ml-legal-switch input:focus-visible + .ml-legal-switch__track,
.ml-legal-floating:focus-visible,
.ml-legal-open-settings:focus-visible {
	outline: 3px solid #2271b1;
	outline-offset: 2px;
	box-shadow: 0 0 0 5px #ffffff;
}

.ml-legal-btn--accept {
	background: var(--ml-accept-bg, #1d2327);
	color: var(--ml-accept-text, #ffffff);
	border-color: var(--ml-accept-bg, #1d2327);
}

.ml-legal-btn--reject {
	background: var(--ml-reject-bg, #1d2327);
	color: var(--ml-reject-text, #ffffff);
	border-color: var(--ml-reject-bg, #1d2327);
}

.ml-legal-btn--settings {
	background: var(--ml-settings-bg, #1d2327);
	color: var(--ml-settings-text, #ffffff);
	border-color: var(--ml-settings-bg, #1d2327);
}

/* ------------------------------------------------------------------ */
/* Banner                                                              */
/* ------------------------------------------------------------------ */
.ml-legal-banner {
	position: fixed;
	z-index: 2147483000;
	box-sizing: border-box;
	background: var(--ml-bg, #ffffff);
	color: var(--ml-text, #1d2327);
	font-family: var(--ml-font, inherit);
	font-size: var(--ml-font-size, 15px);
	line-height: 1.5;
	box-shadow: 0 -2px 18px rgba(0, 0, 0, 0.18);
}

.ml-legal-banner[hidden] {
	display: none;
}

.ml-legal-banner *,
.ml-legal-modal * {
	box-sizing: border-box;
}

.ml-legal-banner a {
	color: var(--ml-link, #0a4b78);
	text-decoration: underline;
}

.ml-legal-banner__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px 24px;
	max-width: var(--ml-max-width, 1100px);
	margin: 0 auto;
	padding: 18px 20px;
}

.ml-legal-banner__content {
	flex: 1 1 420px;
	min-width: 0;
}

.ml-legal-banner__title {
	margin: 0 0 4px;
	font-size: 1.1em;
	font-weight: 700;
	color: inherit;
}

.ml-legal-banner__title:focus {
	outline: none;
}

.ml-legal-banner__title:focus-visible {
	outline: 3px solid #2271b1;
	outline-offset: 2px;
}

.ml-legal-banner__text {
	margin: 0;
	color: inherit;
}

.ml-legal-banner__actions {
	display: flex;
	flex: 0 1 auto;
	flex-wrap: wrap;
	gap: 10px;
}

.ml-legal-banner__actions .ml-legal-btn {
	flex: 1 1 0;
}

/* Barras */
.ml-legal-layout-bar-bottom {
	left: 0;
	right: 0;
	bottom: 0;
}

.ml-legal-layout-bar-top {
	left: 0;
	right: 0;
	top: 0;
	box-shadow: 0 2px 18px rgba(0, 0, 0, 0.18);
}

/* Cajas */
.ml-legal-layout-box-left,
.ml-legal-layout-box-right,
.ml-legal-layout-center {
	width: calc(100% - 32px);
	max-width: min(var(--ml-max-width, 1100px), 460px);
	border-radius: var(--ml-radius, 6px);
	bottom: 16px;
}

.ml-legal-layout-box-left {
	left: 16px;
}

.ml-legal-layout-box-right {
	right: 16px;
}

.ml-legal-layout-center {
	left: 50%;
	bottom: auto;
	top: 50%;
	transform: translate(-50%, -50%);
	max-width: min(var(--ml-max-width, 1100px), 560px);
	box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.35), 0 4px 24px rgba(0, 0, 0, 0.25);
}

.ml-legal-layout-box-left .ml-legal-banner__inner,
.ml-legal-layout-box-right .ml-legal-banner__inner,
.ml-legal-layout-center .ml-legal-banner__inner {
	flex-direction: column;
	align-items: stretch;
}

.ml-legal-layout-box-left .ml-legal-banner__content,
.ml-legal-layout-box-right .ml-legal-banner__content,
.ml-legal-layout-center .ml-legal-banner__content {
	flex: 0 0 auto;
}

.ml-legal-layout-box-left .ml-legal-banner__actions .ml-legal-btn,
.ml-legal-layout-box-right .ml-legal-banner__actions .ml-legal-btn,
.ml-legal-layout-center .ml-legal-banner__actions .ml-legal-btn {
	min-width: 0;
}

/* ------------------------------------------------------------------ */
/* Panel de preferencias                                               */
/* ------------------------------------------------------------------ */
html.ml-legal-modal-open {
	overflow: hidden;
}

.ml-legal-modal {
	position: fixed;
	inset: 0;
	z-index: 2147483001;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	font-family: var(--ml-font, inherit);
	font-size: var(--ml-font-size, 15px);
	line-height: 1.5;
}

.ml-legal-modal[hidden] {
	display: none;
}

.ml-legal-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
}

.ml-legal-modal__dialog {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 640px;
	max-height: calc(100vh - 32px);
	background: var(--ml-bg, #ffffff);
	color: var(--ml-text, #1d2327);
	border-radius: var(--ml-radius, 6px);
	box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
}

.ml-legal-modal__dialog:focus {
	outline: none;
}

.ml-legal-modal__dialog a {
	color: var(--ml-link, #0a4b78);
}

.ml-legal-modal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 20px;
	border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.ml-legal-modal__title {
	margin: 0;
	font-size: 1.25em;
	color: inherit;
}

.ml-legal-modal__close {
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	border-radius: var(--ml-radius, 6px);
}

.ml-legal-modal__body {
	overflow-y: auto;
	padding: 16px 20px;
}

.ml-legal-modal__intro {
	margin: 0 0 12px;
}

.ml-legal-modal__footer {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	padding: 16px 20px;
	border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.ml-legal-modal__footer .ml-legal-btn {
	flex: 1 1 0;
}

.ml-legal-cat {
	padding: 12px 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.ml-legal-cat:last-child {
	border-bottom: 0;
}

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

.ml-legal-cat__title {
	margin: 0;
	font-size: 1.05em;
	color: inherit;
}

.ml-legal-cat__always {
	font-weight: 600;
	font-size: 0.9em;
	white-space: nowrap;
}

.ml-legal-cat__desc,
.ml-legal-cat__services {
	margin: 6px 0 0;
	font-size: 0.93em;
}

/* Interruptor accesible (checkbox con role="switch"). */
.ml-legal-switch {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
}

.ml-legal-switch input {
	position: absolute;
	opacity: 0;
	width: 52px;
	height: 30px;
	margin: 0;
	cursor: pointer;
}

.ml-legal-switch__track {
	position: relative;
	display: inline-block;
	width: 52px;
	height: 30px;
	border-radius: 30px;
	background: #8c8f94;
	transition: background 0.15s ease;
}

.ml-legal-switch__thumb {
	position: absolute;
	top: 3px;
	left: 3px;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: #ffffff;
	transition: transform 0.15s ease;
}

.ml-legal-switch input:checked + .ml-legal-switch__track {
	background: var(--ml-accept-bg, #1d2327);
}

.ml-legal-switch input:checked + .ml-legal-switch__track .ml-legal-switch__thumb {
	transform: translateX(22px);
}

.ml-legal-switch__state {
	min-width: 2em;
	font-weight: 600;
	font-size: 0.9em;
}

.ml-legal-switch__state--on,
.ml-legal-switch input:checked ~ .ml-legal-switch__state--off {
	display: none;
}

.ml-legal-switch input:checked ~ .ml-legal-switch__state--on {
	display: inline;
}

/* ------------------------------------------------------------------ */
/* Botón flotante                                                      */
/* ------------------------------------------------------------------ */
.ml-legal-floating {
	position: fixed;
	bottom: 16px;
	z-index: 2147482999;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--ml-settings-bg, #1d2327);
	color: var(--ml-settings-text, #ffffff);
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
	cursor: pointer;
}

.ml-legal-floating--left {
	left: 16px;
}

.ml-legal-floating--right {
	right: 16px;
}

html.ml-legal-banner-visible .ml-legal-floating {
	display: none;
}

/* ------------------------------------------------------------------ */
/* Contenido bloqueado                                                 */
/* ------------------------------------------------------------------ */
.ml-legal-blocked {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 220px;
	margin: 0 0 1em;
	padding: 20px;
	background: #f0f0f1;
	color: #1d2327;
	border: 1px solid #c3c4c7;
	border-radius: 6px;
	text-align: center;
	box-sizing: border-box;
}

.ml-legal-blocked__inner {
	max-width: 520px;
}

.ml-legal-blocked__title {
	margin: 0 0 8px;
	font-weight: 700;
}

.ml-legal-blocked__text {
	margin: 0 0 14px;
	font-size: 0.93em;
}

.ml-legal-blocked__text a {
	color: #0a4b78;
}

.ml-legal-blocked__button {
	background: var(--ml-accept-bg, #1d2327);
	color: var(--ml-accept-text, #ffffff);
	border-color: var(--ml-accept-bg, #1d2327);
}

.ml-legal-blocked__template {
	display: none;
}

/* ------------------------------------------------------------------ */
/* Enlaces legales                                                     */
/* ------------------------------------------------------------------ */
.ml-legal-footer-bar {
	padding: 12px 16px;
	font-size: 14px;
	text-align: center;
}

.ml-legal-links__list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px 18px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ml-legal-links__item {
	margin: 0;
}

.ml-legal-open-settings {
	cursor: pointer;
}

/* ------------------------------------------------------------------ */
/* Documentos                                                          */
/* ------------------------------------------------------------------ */
.ml-legal-table-wrap {
	width: 100%;
	overflow-x: auto;
	margin: 1em 0;
}

.ml-legal-cookie-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.93em;
}

.ml-legal-cookie-table th,
.ml-legal-cookie-table td {
	padding: 8px 10px;
	border: 1px solid rgba(0, 0, 0, 0.15);
	text-align: left;
	vertical-align: top;
}

.ml-legal-cookie-table thead th {
	background: rgba(0, 0, 0, 0.05);
}

.ml-legal-cookie-table code {
	word-break: break-all;
}

@media (max-width: 720px) {
	.ml-legal-cookie-table thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
	}

	.ml-legal-cookie-table,
	.ml-legal-cookie-table tbody,
	.ml-legal-cookie-table tr,
	.ml-legal-cookie-table td {
		display: block;
		width: 100%;
	}

	.ml-legal-cookie-table tr {
		margin-bottom: 12px;
		border: 1px solid rgba(0, 0, 0, 0.15);
	}

	.ml-legal-cookie-table td {
		border: 0;
		border-bottom: 1px solid rgba(0, 0, 0, 0.08);
	}

	.ml-legal-cookie-table td::before {
		content: attr(data-label) ": ";
		font-weight: 700;
	}
}

.ml-legal-admin-notice {
	margin: 0 0 1.5em;
	padding: 12px 16px;
	background: #fcf0f1;
	border-left: 4px solid #d63638;
	color: #1d2327;
	font-size: 0.93em;
}

.ml-legal-admin-notice ul {
	margin: 6px 0 6px 20px;
}

.ml-legal-note {
	font-size: 0.9em;
	opacity: 0.85;
}

/* ------------------------------------------------------------------ */
/* Formularios                                                         */
/* ------------------------------------------------------------------ */
.ml-legal-consent-field {
	display: block;
	margin: 0.75em 0;
}

.ml-legal-consent-field input[type="checkbox"] {
	width: auto;
	margin-right: 6px;
	vertical-align: middle;
}

.ml-legal-consent-field label {
	display: inline;
	font-weight: normal;
}

.ml-legal-first-layer {
	display: block;
	margin: 1em 0;
	padding: 10px 12px;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 4px;
	font-size: 0.8em;
	line-height: 1.45;
}

.ml-legal-first-layer__title {
	display: block;
	margin-bottom: 4px;
	font-weight: 700;
}

.ml-legal-first-layer__row {
	display: block;
}

.ml-legal-cf7 {
	display: block;
}

/* ------------------------------------------------------------------ */
/* Móvil                                                               */
/* ------------------------------------------------------------------ */
@media (max-width: 600px) {
	.ml-legal-banner__inner {
		padding: 14px 16px;
	}

	.ml-legal-banner__actions,
	.ml-legal-modal__footer {
		flex-direction: column;
		width: 100%;
	}

	.ml-legal-banner__actions .ml-legal-btn,
	.ml-legal-modal__footer .ml-legal-btn {
		width: 100%;
		min-width: 0;
	}

	.ml-legal-banner {
		max-height: 85vh;
		overflow-y: auto;
	}

	.ml-legal-layout-box-left,
	.ml-legal-layout-box-right {
		left: 8px;
		right: 8px;
		width: auto;
		bottom: 8px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ml-legal-btn,
	.ml-legal-switch__track,
	.ml-legal-switch__thumb {
		transition: none;
	}
}
