/****************************************************/
/* CUSTOM MODAL */
/****************************************************/

::backdrop {
  background-image: linear-gradient(
    45deg,
    var(--color-alt),
    var(--color-primary),
    var(--color-alt),
    var(--color-primary)
  );
  opacity: 0.75;
}

/* General del modal */


.dialog-modal {
  border: none;
  border-radius: 0;
  padding: 0;
  width: 90%;
  max-width: 500px;
  background: #fff; /* Fondo blanco */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  z-index: 1100;
  margin: 2rem auto 0;
  transform: scale(0.8); /* Estado inicial para animacion */
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease; /* Transicion para entrada/salida */
}


.dialog-modal[open] {
  transform: scale(1); /* Escala completa */
  opacity: 1; /* Visible */
}

/* Estilo del contenido */
.modal-content {
  padding: 20px;
  max-height: 60vh;
  overflow-y: auto; /* Scroll para el contenido */
	scrollbar-width: none; /* Firefox */
	-ms-overflow-style: none; /* Internet Explorer y Edge */
}

.modal-content::-webkit-scrollbar {
	display: none; /* Chrome, Safari */
}


/* Boton de cierre */
.close-modal {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 2rem;
  color: #555;
  cursor: pointer;
  background-color: transparent !important;
  aspect-ratio: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.4rem;
}

.close-modal:hover {
  color: #000;
}



.dialog-modal.dialog-medium {
  max-width: 700px;
}
.dialog-modal:not(.custom-popup).dialog-medium .modal-content {
  max-height: calc(80vh - 4rem);
  height: calc(80vh - 4rem);
	
}

.dialog-modal.dialog-large {
  max-width: 1000px;
}
.dialog-modal:not(.custom-popup).dialog-large .modal-content {
  max-height: calc(100vh - 4rem);
  height: calc(100vh - 4rem);
	
}
.custom-popup .modal-content{
	max-height: none;
}


/* Responsivo */
@media (max-width: 600px) {
  .dialog-modal {
    width: 95%;
  }
}


/****************************************************/
/* PANEL DE CONDICIONES (listado en lista)          */
/****************************************************/

/* Sustituye al modal de condiciones cuando la web tiene el listado en lista
   (sections/panel-condiciones.php). Es el segundo nivel del diseño «Listado
   legales»: el legal completo es largo, así que va en un cajón a la derecha
   desde 768 px y a pantalla completa por debajo, con su propio scroll. No lleva
   .dialog-modal: no le tocan sus reglas ni el script de custom-modal.js. */
.condiciones-panel {
	--panel-borde: color-mix(in srgb, var(--text-color, #000) 12%, transparent);
	--panel-suave: color-mix(in srgb, var(--text-color, #000) 4%, #fff);
	--panel-texto-suave: color-mix(in srgb, var(--text-color, #000) 72%, #fff);
	position: fixed;
	inset: 0 0 0 auto;
	width: 100%;
	max-width: 100%;
	height: auto;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background-color: var(--main-bg, #fff);
	color: var(--text-color);
	font-family: var(--main-font);
	box-shadow: -0.5rem 0 2rem rgba(16, 19, 25, 0.18);
	overflow: hidden;
	transform: translateX(100%);
	transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.3, 1), overlay 0.35s allow-discrete, display 0.35s allow-discrete;
}
.condiciones-panel[open] {
	transform: none;
}
@starting-style {
	.condiciones-panel[open] {
		transform: translateX(100%);
	}
}
.condiciones-panel::backdrop {
	background-image: none;
	background-color: rgba(16, 19, 25, 0.55);
	opacity: 1;
}
@media (min-width: 768px) {
	.condiciones-panel {
		width: min(29rem, 100%);
	}
}
html:has(.condiciones-panel[open]) {
	overflow: hidden;
}

.condiciones-panel__marco {
	display: flex;
	flex-direction: column;
	height: 100%;
}
.condiciones-panel__cabecera {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.25rem 1.5rem 1rem;
}
.condiciones-panel__titulo {
	margin: 0;
	font-family: var(--heading-font);
	font-size: 1.3rem;
	font-weight: 700;
	line-height: 1.2;
}
/* Dos clases: brand.css pinta los `button:not([class*="bg-"])` y utilities.css les
   quita el foco. */
.condiciones-panel .condiciones-panel__cerrar {
	display: inline-flex;
	flex: none;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0.35rem;
	border: 0;
	border-radius: 50%;
	background: none;
	color: var(--text-color);
	cursor: pointer;
}
.condiciones-panel .condiciones-panel__cerrar:hover {
	background-color: var(--panel-suave);
	color: var(--text-color);
}
.condiciones-panel .condiciones-panel__cerrar:focus-visible,
.condiciones-panel .condiciones-panel__cta:focus-visible {
	outline: 2px solid var(--color-alt, currentColor);
	outline-offset: 2px;
}
.condiciones-panel__cerrar svg {
	width: 100%;
	height: 100%;
}
.condiciones-panel__cuerpo {
	flex: 1 1 auto;
	display: grid;
	align-content: start;
	gap: 1.5rem;
	padding: 0 1.5rem 1.5rem;
	overflow-y: auto;
	overscroll-behavior: contain;
}
.condiciones-panel__vehiculo {
	display: grid;
	grid-template-columns: 6.5rem minmax(0, 1fr);
	align-items: center;
	gap: 1rem;
}
.condiciones-panel__vehiculo[hidden],
.condiciones-panel__foto[hidden],
.condiciones-panel [data-servicios][hidden] {
	display: none;
}
.condiciones-panel__foto {
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 0.25rem;
	background-color: var(--panel-suave);
}
.condiciones-panel__nombre {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 700;
}
.condiciones-panel__version,
.condiciones-panel__datos {
	margin: 0.15rem 0 0;
	color: var(--panel-texto-suave);
	font-size: 0.85rem;
	line-height: 1.35;
}
.condiciones-panel__subtitulo {
	margin: 0 0 0.6rem;
	font-size: 1rem;
	font-weight: 700;
}
.condiciones-panel__producto {
	font-weight: 400;
	color: var(--panel-texto-suave);
}
.condiciones-panel__tabla {
	margin: 0;
	padding: 0.25rem 0;
	border-radius: 0.25rem;
	background-color: var(--panel-suave);
}
.condiciones-panel__fila {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.45rem 0.9rem;
	border-bottom: 1px solid var(--panel-borde);
	font-size: 0.9rem;
}
.condiciones-panel__fila:last-child {
	border-bottom: 0;
}
.condiciones-panel__fila dt {
	color: var(--panel-texto-suave);
}
.condiciones-panel__fila dd {
	margin: 0;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	text-align: right;
}
.condiciones-panel__fila--destacada dt,
.condiciones-panel__fila--destacada dd {
	color: var(--text-color);
	font-weight: 800;
}
.condiciones-panel__lista {
	display: grid;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	font-size: 0.9rem;
	list-style: none;
}
.condiciones-panel__lista li {
	display: flex;
	align-items: baseline;
	gap: 0.65rem;
}
.condiciones-panel__lista li::before {
	content: '';
	flex: none;
	width: 0.7rem;
	height: 0.35rem;
	border-left: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateY(-0.15rem) rotate(-45deg);
}
.condiciones-panel__legal {
	color: var(--panel-texto-suave);
	font-size: 0.75rem;
	line-height: 1.55;
}
.condiciones-panel__legal p,
.condiciones-panel__parrafo {
	margin: 0 0 0.6rem;
}
.condiciones-panel__legal > :last-child {
	margin-bottom: 0;
}
.condiciones-panel__legal :is(b, strong) {
	color: var(--text-color);
}
.condiciones-panel__legal u {
	text-decoration: underline;
	text-underline-offset: 0.15em;
}
.condiciones-panel__pie {
	padding: 1rem 1.5rem 1.5rem;
	border-top: 1px solid var(--panel-borde);
}
.condiciones-panel .condiciones-panel__cta {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0.9rem 1rem;
	border-radius: 0.25rem;
	background-color: var(--text-color);
	color: #fff;
	font-weight: 700;
	text-decoration: none;
}
.condiciones-panel .condiciones-panel__cta:hover {
	background-color: color-mix(in srgb, var(--text-color) 80%, #fff);
	color: #fff;
}
.condiciones-panel .condiciones-panel__cta[hidden],
.condiciones-panel__pie:has(.condiciones-panel__cta[hidden]) {
	display: none;
}
@media (prefers-reduced-motion: reduce) {
	.condiciones-panel {
		transition: none;
	}
}
