/* ==========================================================================
   RP · Próximas Fechas
   Mobile-first. Los colores salen de variables: ajusta solo el bloque :root.
   ========================================================================== */

.rp-pf {
	--rp-verde: #1e9e5a;
	--rp-verde-osc: #147a44;
	--rp-texto: #1a1a1a;
	--rp-texto-2: #5b6360;
	--rp-borde: #e2e6e4;
	--rp-fondo: #ffffff;
	--rp-fondo-2: #f6f8f7;
	--rp-ambar-bg: #fdf3e3;
	--rp-ambar-tx: #8a5a12;
	--rp-radio: 12px;

	max-width: 960px;
	margin-inline: auto;
	color: var(--rp-texto);
	font-size: 16px;
	line-height: 1.5;
}

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

.rp-pf__sr {
	position: absolute; width: 1px; height: 1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* --- Cabecera ------------------------------------------------------------ */

.rp-pf__cabecera { text-align: center; margin-bottom: 1.5rem; }

.rp-pf__titulo {
	margin: 0 0 .35rem;
	font-size: clamp(1.5rem, 4vw, 2rem);
	line-height: 1.2;
	letter-spacing: -.01em;
}

.rp-pf__subtitulo {
	margin: 0;
	color: var(--rp-texto-2);
	font-size: .95rem;
}

/* --- Filtros ------------------------------------------------------------- */

.rp-pf__filtros {
	display: flex;
	gap: .5rem;
	overflow-x: auto;
	padding-bottom: .5rem;
	margin-bottom: 1.25rem;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}
.rp-pf__filtros::-webkit-scrollbar { display: none; }

.rp-pf__chip {
	flex: 0 0 auto;
	min-height: 40px;
	padding: .5rem 1rem;
	border: 1px solid var(--rp-borde);
	border-radius: 999px;
	background: var(--rp-fondo);
	color: var(--rp-texto-2);
	font: inherit;
	font-size: .875rem;
	cursor: pointer;
	transition: background-color .15s, border-color .15s, color .15s;
}
.rp-pf__chip:hover { border-color: var(--rp-verde); color: var(--rp-verde-osc); }
.rp-pf__chip.is-activo {
	background: var(--rp-verde);
	border-color: var(--rp-verde);
	color: #fff;
}
.rp-pf__chip:focus-visible { outline: 2px solid var(--rp-verde-osc); outline-offset: 2px; }

/* --- Separador de mes ---------------------------------------------------- */

.rp-pf__mes {
	margin: 1.5rem 0 .75rem;
	font-size: .75rem;
	font-weight: 600;
	letter-spacing: .08em;
	color: var(--rp-texto-2);
	text-transform: uppercase;
}
.rp-pf__mes:first-child { margin-top: 0; }

/* --- Tarjeta (móvil: apilada) -------------------------------------------- */

.rp-pf__tarjeta {
	display: grid;
	gap: .5rem;
	padding: 1rem;
	margin-bottom: .75rem;
	border: 1px solid var(--rp-borde);
	border-radius: var(--rp-radio);
	background: var(--rp-fondo);
}

.rp-pf__tarjeta.is-completa { opacity: .6; }

.rp-pf__fecha { display: flex; align-items: baseline; gap: .4rem; }

.rp-pf__fecha-dia,
.rp-pf__fecha-mes {
	font-size: .8rem;
	font-weight: 600;
	letter-spacing: .04em;
	color: var(--rp-texto-2);
	text-transform: uppercase;
}

.rp-pf__fecha-num {
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1;
	letter-spacing: -.02em;
}

.rp-pf__nombre {
	display: flex;
	align-items: center;
	gap: .5rem;
	margin: 0;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.3;
}

.rp-pf__punto {
	flex: 0 0 auto;
	width: 8px; height: 8px;
	border-radius: 50%;
	background: var(--rp-verde);
}

.rp-pf__meta {
	margin: .15rem 0 0;
	color: var(--rp-texto-2);
	font-size: .875rem;
}

.rp-pf__accion { display: grid; gap: .5rem; }

.rp-pf__precio {
	margin: 0;
	font-size: 1.15rem;
	font-weight: 600;
}
.rp-pf__precio .woocommerce-Price-amount { font-weight: 600; }

.rp-pf__plazas {
	justify-self: start;
	margin: 0;
	padding: .2rem .6rem;
	border-radius: 6px;
	font-size: .8rem;
	font-weight: 500;
}
.rp-pf__plazas--pocas { background: var(--rp-ambar-bg); color: var(--rp-ambar-tx); }
.rp-pf__plazas--cero  { background: var(--rp-fondo-2); color: var(--rp-texto-2); }

.rp-pf__cta {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: .75rem 1.25rem;
	border-radius: 8px;
	background: var(--rp-verde);
	color: #fff;
	font-weight: 600;
	text-align: center;
	text-decoration: none;
	transition: background-color .15s;
}
.rp-pf__cta:hover, .rp-pf__cta:focus { background: var(--rp-verde-osc); color: #fff; }
.rp-pf__cta:focus-visible { outline: 2px solid var(--rp-texto); outline-offset: 2px; }

.rp-pf__cta--inactivo {
	background: var(--rp-fondo-2);
	color: var(--rp-texto-2);
	cursor: default;
}

/* --- Pie ----------------------------------------------------------------- */

.rp-pf__vermas { margin: 1.25rem 0 0; text-align: center; }
.rp-pf__vermas a {
	display: inline-block;
	min-height: 48px;
	padding: .75rem 1.5rem;
	border: 1px solid var(--rp-verde);
	border-radius: 8px;
	color: var(--rp-verde-osc);
	font-weight: 600;
	text-decoration: none;
}
.rp-pf__vermas a:hover { background: var(--rp-fondo-2); }

.rp-pf__pie {
	margin: 1rem 0 0;
	color: var(--rp-texto-2);
	font-size: .8rem;
	text-align: center;
}

/* --- Estado vacío -------------------------------------------------------- */

.rp-pf__vacio {
	padding: 2rem 1.25rem;
	border: 1px dashed var(--rp-borde);
	border-radius: var(--rp-radio);
	background: var(--rp-fondo-2);
	text-align: center;
}
.rp-pf__vacio-titulo { margin: 0 0 .35rem; font-size: 1.1rem; font-weight: 600; }
.rp-pf__vacio-texto  { margin: 0; color: var(--rp-texto-2); }

/* --- Escritorio: la tarjeta pasa a fila ---------------------------------- */

@media (min-width: 768px) {

	.rp-pf__tarjeta {
		grid-template-columns: 92px 1fr 200px;
		align-items: center;
		gap: 1.25rem;
		padding: 0;
		overflow: hidden;
	}

	.rp-pf__fecha {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: .1rem;
		align-self: stretch;
		padding: 1.15rem .5rem;
		background: var(--rp-fondo-2);
	}

	.rp-pf__fecha-num { font-size: 1.75rem; }

	.rp-pf__info   { padding: 1.15rem 0; }
	.rp-pf__accion { padding: 1.15rem 1.25rem 1.15rem 0; justify-items: end; text-align: right; }
	.rp-pf__plazas { justify-self: end; }
	.rp-pf__cta    { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	.rp-pf * { transition: none !important; }
}

/* ==========================================================================
   Vista CALENDARIO
   ========================================================================== */

.rp-pf__leyenda {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem 1.25rem;
	justify-content: center;
	margin: 0 0 1.25rem;
	padding: 0;
	list-style: none;
}

.rp-pf__leyenda-item {
	display: flex;
	align-items: center;
	gap: .45rem;
	font-size: .85rem;
	color: var(--rp-texto-2);
}

/* Los meses se apilan y solo se ve el activo. */
.rp-pf__mes-bloque { display: none; }
.rp-pf__mes-bloque.is-visible { display: block; }

.rp-pf__mes-nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: .75rem;
}

.rp-pf__mes-titulo {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 600;
	text-align: center;
	flex: 1;
}

.rp-pf__nav {
	width: 44px; height: 44px;
	border: 1px solid var(--rp-borde);
	border-radius: 8px;
	background: var(--rp-fondo);
	color: var(--rp-texto);
	font-size: 1.25rem;
	line-height: 1;
	cursor: pointer;
}
.rp-pf__nav:hover:not([disabled]) { border-color: var(--rp-verde); color: var(--rp-verde); }
.rp-pf__nav[disabled] { opacity: .35; cursor: default; }
.rp-pf__nav:focus-visible { outline: 2px solid var(--rp-verde); outline-offset: 2px; }

.rp-pf__rejilla {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
}

.rp-pf__dow {
	padding: .4rem 0;
	font-size: .75rem;
	font-weight: 600;
	letter-spacing: .04em;
	color: var(--rp-texto-2);
	text-align: center;
	text-transform: uppercase;
}

.rp-pf__celda {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-height: 92px;
	padding: .35rem;
	border: 1px solid var(--rp-borde);
	border-radius: 8px;
	background: var(--rp-fondo);
}

.rp-pf__celda--vacia { border: 0; background: none; }
.rp-pf__celda.es-pasado { opacity: .4; }
.rp-pf__celda.es-hoy { border-color: var(--rp-verde); box-shadow: inset 0 0 0 1px var(--rp-verde); }
.rp-pf__celda.tiene-eventos { background: var(--rp-fondo-2); }

.rp-pf__num {
	font-size: .8rem;
	font-weight: 600;
	color: var(--rp-texto-2);
}

.rp-pf__evento {
	display: block;
	padding: .3rem .4rem;
	border-radius: 6px;
	background: var(--rp-ev, var(--rp-verde));
	color: #000;
	font-size: .72rem;
	font-weight: 600;
	line-height: 1.25;
	text-decoration: none;
	overflow: hidden;
	transition: filter .15s;
}
.rp-pf__evento:hover, .rp-pf__evento:focus { filter: brightness(1.12); color: #fff; }
.rp-pf__evento:focus-visible { outline: 2px solid var(--rp-texto); outline-offset: 1px; }

.rp-pf__evento.is-completo {
	background: transparent;
	border: 1px dashed var(--rp-borde);
	color: var(--rp-texto-2);
	font-weight: 500;
}

.rp-pf__evento-txt {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* --------------------------------------------------------------------------
   MÓVIL: la rejilla se mantiene, pero compacta.
   Cada convocatoria se reduce a un punto de color y, al tocar el día,
   se despliega el detalle debajo con el botón de reserva.
   -------------------------------------------------------------------------- */

.rp-pf__detalle { display: none; }

@media (max-width: 699px) {

	.rp-pf--cal { font-size: 15px; }

	.rp-pf__rejilla { gap: 2px; }

	.rp-pf__dow { padding: .25rem 0; font-size: .7rem; }

	.rp-pf__celda {
		min-height: 0;
		aspect-ratio: 1 / 1;
		align-items: center;
		justify-content: flex-start;
		gap: 2px;
		padding: .25rem .1rem;
		border-radius: 6px;
	}

	.rp-pf__num { font-size: .8rem; line-height: 1.1; }

	/* Los eventos pasan a ser puntos de color. */
	.rp-pf__celda .rp-pf__evento {
		width: 7px;
		height: 7px;
		padding: 0;
		border-radius: 50%;
		font-size: 0;
		line-height: 0;
	}
	.rp-pf__celda .rp-pf__evento.is-completo {
		background: transparent;
		border: 1px solid var(--rp-texto-2);
	}
	.rp-pf__celda .rp-pf__evento-txt { display: none; }

	/* Los puntos se colocan en fila. */
	.rp-pf__celda.tiene-eventos {
		flex-direction: column;
		cursor: pointer;
	}
	.rp-pf__celda.tiene-eventos::after {
		content: '';
		display: block;
	}
	.rp-pf__puntos {
		display: flex;
		flex-wrap: wrap;
		gap: 3px;
		justify-content: center;
	}

	.rp-pf__celda.is-seleccionada {
		border-color: var(--rp-texto);
		box-shadow: inset 0 0 0 1px var(--rp-texto);
	}

	/* Panel de detalle del día tocado. */
	.rp-pf__detalle {
		display: none;
		margin-top: .85rem;
		padding: .9rem;
		border: 1px solid var(--rp-borde);
		border-radius: var(--rp-radio);
		background: var(--rp-fondo-2);
	}
	.rp-pf__detalle.is-abierto { display: block; }

	.rp-pf__detalle-titulo {
		margin: 0 0 .6rem;
		font-size: .95rem;
		font-weight: 600;
	}

	.rp-pf__detalle-item {
		display: flex;
		align-items: center;
		gap: .55rem;
		padding: .55rem 0;
		border-top: 1px solid var(--rp-borde);
	}
	.rp-pf__detalle-item:first-of-type { border-top: 0; }

	.rp-pf__detalle-nombre {
		flex: 1;
		font-size: .85rem;
		font-weight: 600;
		line-height: 1.25;
	}
	.rp-pf__detalle-precio {
		font-size: .8rem;
		color: var(--rp-texto-2);
		font-weight: 500;
	}
	.rp-pf__detalle-cta {
		display: inline-flex;
		align-items: center;
		min-height: 44px;
		padding: .5rem 1rem;
		border-radius: 8px;
		background: var(--rp-verde);
		color: #fff;
		font-size: .85rem;
		font-weight: 600;
		text-decoration: none;
		white-space: nowrap;
	}
	.rp-pf__detalle-cta:hover, .rp-pf__detalle-cta:focus { color: #fff; }

	.rp-pf__detalle-agotado {
		font-size: .8rem;
		color: var(--rp-texto-2);
	}

	.rp-pf__ayuda {
		margin: .5rem 0 0;
		font-size: .78rem;
		color: var(--rp-texto-2);
		text-align: center;
	}

	/* La lista completa se mantiene debajo, plegada tras un botón. */
	.rp-pf--cal .rp-pf__lista--movil { display: none; }
	.rp-pf--cal .rp-pf__lista--movil.is-abierta { display: block; }

	.rp-pf__ver-lista {
		display: block;
		width: 100%;
		min-height: 46px;
		margin-top: 1rem;
		padding: .7rem;
		border: 1px solid var(--rp-borde);
		border-radius: 8px;
		background: var(--rp-fondo);
		color: var(--rp-texto);
		font: inherit;
		font-size: .875rem;
		font-weight: 600;
		cursor: pointer;
	}
}

@media (min-width: 700px) {
	.rp-pf--cal .rp-pf__lista--movil,
	.rp-pf__ver-lista,
	.rp-pf__ayuda { display: none; }
}
