/* Mayordent Checkout – ventana modal del checkout. */

html.mdc-modal-abierto { overflow: hidden; }

.mdc-modal {
	position: fixed; inset: 0; z-index: 999999;
	display: flex; align-items: center; justify-content: center;
	padding: 16px; box-sizing: border-box;
	background: rgba(17, 24, 39, .55);
}
.mdc-modal[hidden] { display: none; }

.mdc-modal__caja {
	display: flex; flex-direction: column;
	width: min(1120px, 100%); height: min(92vh, 940px);
	background: #fff; color: #111827; border-radius: 16px; overflow: hidden;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .3);
}
.mdc-modal__barra {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding: 12px 16px; border-bottom: 1px solid #e5e7eb; background: #fff;
}
.mdc-modal__titulo { font-size: 1.05rem; font-weight: 600; }
/* "all: unset" quita los estilos que el tema pone a todos los botones (p. ej. fondo azul). */
.mdc-modal .mdc-modal__cerrar {
	all: unset !important; box-sizing: border-box !important;
	display: inline-flex !important; align-items: center !important; justify-content: center !important;
	width: 36px !important; height: 36px !important; border-radius: 50% !important;
	background: transparent !important; color: #374151 !important; font: 400 26px/1 system-ui, sans-serif !important; cursor: pointer !important;
}
.mdc-modal .mdc-modal__cerrar:hover { background: #f3f4f6 !important; }
.mdc-modal .mdc-modal__cerrar:focus-visible { outline: 2px solid var(--mdc-acento, #1d4ed8); outline-offset: 2px; }

.mdc-modal__cuerpo { position: relative; flex: 1; min-height: 0; background: #f3f4f6; }
.mdc-modal__marco { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: transparent; }

/* Indicador de carga */
.mdc-modal__cargando { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; }
.mdc-modal.is-cargando .mdc-modal__cargando { display: flex; }
.mdc-modal__cargando::after {
	content: ""; width: 36px; height: 36px; box-sizing: border-box;
	border: 3px solid #d1d5db; border-top-color: var(--mdc-acento, #1d4ed8); border-radius: 50%;
	animation: mdc-giro .8s linear infinite;
}
@keyframes mdc-giro { to { transform: rotate(360deg); } }

/* Celular: pantalla completa */
@media (max-width: 640px) {
	.mdc-modal { padding: 0; }
	.mdc-modal__caja { width: 100%; height: 100%; border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) {
	.mdc-modal__cargando::after { animation-duration: 2s; }
}
