/* ═══════════════════════════════════════════════════════════════════════════
   Barra legal del pie — se imprime en todas las paginas del sitio.
   Hoja aparte y autocontenida a proposito: agenda.css solo se carga donde hay
   agenda o portal, y esto va en cada pagina, asi que tiene que pesar poco y no
   depender de ningun contenedor del plugin.
   ═══════════════════════════════════════════════════════════════════════════ */

.mkt-legal-bar {
	--mkt-ink-2: #1a1a1e;
	--mkt-body: #3f3f46;
	--mkt-muted: #6b6b75;
	--mkt-line: #e6e6ec;
	--mkt-surface: #f7f7f9;
	--mkt-red: #c1121f;
	--mkt-red-dark: #8d0801;
	--mkt-ease: cubic-bezier(.22, 1, .36, 1);

	box-sizing: border-box;
	width: 100%;
	margin: 0;
	padding: 13px 16px;
	border-top: 1px solid var(--mkt-line);
	background: var(--mkt-surface);
	text-align: center;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
	line-height: 1.4;
}
.mkt-legal-bar * { box-sizing: border-box; }

.mkt-legal-bar__link {
	appearance: none; -webkit-appearance: none;
	display: inline-flex; align-items: center; gap: 7px;
	margin: 0; padding: 5px 12px;
	border: 0; border-radius: 8px;
	background: none; background-color: transparent; box-shadow: none; text-shadow: none;
	color: var(--mkt-muted);
	font-family: inherit; font-size: 12.5px; font-weight: 600; letter-spacing: .01em;
	text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px;
	text-transform: none;
	cursor: pointer;
	transition: color .18s var(--mkt-ease), background-color .18s var(--mkt-ease);
}
/* focus-visible y no focus: con :focus el enlace quedaba resaltado despues de
   cerrar el modal, porque el foco vuelve al boton. */
.mkt-legal-bar__link:hover,
.mkt-legal-bar__link:focus-visible { background-color: #fff; color: var(--mkt-red-dark); }
.mkt-legal-bar__link:focus-visible { outline: 2px solid var(--mkt-red); outline-offset: 2px; }
.mkt-legal-bar__link svg { flex: 0 0 auto; width: 13px; height: 13px; opacity: .8; }
.mkt-legal-bar__link:hover svg { opacity: 1; }

/* ── Modal ──────────────────────────────────────────────────────────────── */
.mkt-legal-modal {
	position: fixed; inset: 0; z-index: 100000;
	display: flex; align-items: center; justify-content: center;
	padding: 20px;
	background: rgba(0, 0, 0, .58);
	backdrop-filter: blur(4px);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
	animation: mkt-legal-fade .2s ease backwards;
}
.mkt-legal-modal[hidden] { display: none; }
.mkt-legal-modal * { box-sizing: border-box; }

.mkt-legal-modal__dialog {
	width: min(620px, 100%); max-height: 88vh;
	display: flex; flex-direction: column;
	padding: 26px;
	border-radius: 16px;
	background: #fff; color: #3f3f46;
	box-shadow: 0 40px 90px rgba(0, 0, 0, .42);
	animation: mkt-legal-pop .3s cubic-bezier(.22, 1, .36, 1) backwards;
}
.mkt-legal-modal__head {
	display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
	margin-bottom: 16px;
}
.mkt-legal-modal__head h2 {
	margin: 0; color: #1a1a1e; font-size: 19px; line-height: 1.2; letter-spacing: -.01em;
}
.mkt-legal-modal__sub { margin: 4px 0 0; color: #6b6b75; font-size: 13px; line-height: 1.45; }
.mkt-legal-modal__close {
	appearance: none;
	display: flex; align-items: center; justify-content: center;
	flex: 0 0 auto;
	width: 34px !important; height: 34px !important;
	min-width: 34px; min-height: 34px; padding: 0 !important;
	border: 1px solid #e6e6ec; border-radius: 50%;
	background: #f7f7f9; color: #3f3f46;
	cursor: pointer; line-height: 1;
	transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}
.mkt-legal-modal__close:hover { background: #1a1a1e; border-color: #1a1a1e; color: #fff; transform: scale(1.06); }
.mkt-legal-modal__close:focus-visible { outline: 2px solid #c1121f; outline-offset: 2px; }
.mkt-legal-modal__close svg { display: block; width: 16px; height: 16px; }

.mkt-legal-modal__body {
	overflow-y: auto; overscroll-behavior: contain;
	padding-right: 8px;
	color: #52525b; font-size: 13.5px; line-height: 1.65;
}
.mkt-legal-modal__body h3 { margin: 20px 0 8px; color: #1a1a1e; font-size: 14px; }
.mkt-legal-modal__body h3:first-child { margin-top: 0; }
.mkt-legal-modal__body p { margin: 0 0 10px; color: #52525b; }
.mkt-legal-modal__body ul { margin: 0 0 12px; padding-left: 18px; }
.mkt-legal-modal__body li { margin-bottom: 5px; color: #52525b; }
.mkt-legal-modal__body strong { color: #1a1a1e; }

body.mkt-legal-open { overflow: hidden; }

@keyframes mkt-legal-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes mkt-legal-pop {
	from { opacity: 0; transform: translateY(10px) scale(.97); }
	to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	.mkt-legal-bar__link, .mkt-legal-modal, .mkt-legal-modal__dialog, .mkt-legal-modal__close {
		animation: none !important; transition-duration: .01ms !important;
	}
	.mkt-legal-modal__close:hover { transform: none; }
}

@media (max-width: 600px) {
	.mkt-legal-modal__dialog { padding: 20px; max-height: 92vh; }
	.mkt-legal-bar { padding: 11px 14px; }
}
