/**
 * Programa Feria Valencia — frontend.
 *
 * Todo va prefijado con .fp- y con valores explicitos: el bloque no hereda
 * tipografia ni colores de la plantilla, para que se vea igual en las cinco
 * webs sin una hoja de correcciones por tema.
 */

.fp-programa {
	--fp-txt: #1d1d1b;
	--fp-txt2: #5f5e5a;
	--fp-txt3: #8a8a86;
	--fp-linea: #e4e3e0;
	--fp-fondo: #fff;
	--fp-suave: #f6f5f3;
	--fp-color: #5f5e5a;

	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 16px;
	line-height: 1.5;
	color: var(--fp-txt);
	max-width: 900px;
	margin: 0 auto;
	-webkit-font-smoothing: antialiased;
}

.fp-programa *,
.fp-programa *::before,
.fp-programa *::after { box-sizing: border-box; }

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

/* ------------------------------------------------------------- barra */

.fp-toolbar {
	position: sticky;
	top: 0;
	z-index: 10;
	background: var(--fp-fondo);
	padding: 12px 0 10px;
	border-bottom: 1px solid var(--fp-linea);
	margin-bottom: 4px;
}

.fp-dias {
	display: flex;
	gap: 6px;
	overflow-x: auto;
	padding-bottom: 2px;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}
.fp-dias::-webkit-scrollbar { display: none; }

.fp-dia {
	flex: 0 0 auto;
	min-width: 68px;
	min-height: 48px;
	padding: 6px 12px;
	border: 1px solid var(--fp-linea);
	border-radius: 8px;
	background: var(--fp-fondo);
	color: var(--fp-txt2);
	font: inherit;
	font-size: 13px;
	line-height: 1.25;
	cursor: pointer;
	text-align: center;
	transition: background .12s, border-color .12s;
}
.fp-dia:hover { background: var(--fp-suave); }
.fp-dia[aria-selected="true"] {
	background: var(--fp-txt);
	border-color: var(--fp-txt);
	color: #fff;
}
.fp-dia-sem { display: block; font-size: 11px; opacity: .75; text-transform: uppercase; letter-spacing: .03em; }
.fp-dia-num { display: block; font-weight: 600; }
.fp-dia-todos { display: flex; align-items: center; justify-content: center; font-weight: 600; }

/* Los días ocupan su propia fila en móvil y comparten línea con los
   botones a partir de 700px. */
.fp-barra {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}
.fp-barra .fp-dias { flex: 1 1 100%; min-width: 0; }
.fp-barra .fp-acciones { flex: 1 1 auto; margin-top: 0; align-items: center; }

/* Panel de filtros. details/summary nativos: funciona sin JavaScript.
   El cuerpo se despliega flotando bajo la barra, para que el botón pueda
   ir en línea con los días y el idioma. */
.fp-filtros { position: static; }
.fp-filtros-btn {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	min-height: 40px;
	padding: 8px 14px;
	border: 1px solid var(--fp-linea);
	border-radius: 8px;
	background: var(--fp-fondo);
	font-size: 14px;
	color: var(--fp-txt);
	cursor: pointer;
	list-style: none;
	user-select: none;
}
.fp-filtros-btn::-webkit-details-marker { display: none; }
.fp-filtros-btn::marker { content: ''; }
.fp-filtros-btn:hover { background: var(--fp-suave); }
.fp-filtros[open] .fp-filtros-btn {
	background: var(--fp-suave);
	border-color: var(--fp-txt3);
}
.fp-icono-filtro { flex: 0 0 auto; color: var(--fp-txt2); }
.fp-filtros-n {
	min-width: 19px;
	height: 19px;
	padding: 0 5px;
	border-radius: 20px;
	background: var(--fp-txt);
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	line-height: 19px;
	text-align: center;
}
.fp-filtros-cuerpo {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	z-index: 20;
	padding: 12px;
	background: var(--fp-fondo);
	border: 1px solid var(--fp-linea);
	border-radius: 10px;
	box-shadow: 0 6px 20px rgba(0, 0, 0, .09);
}

.fp-selects {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.fp-select {
	flex: 1 1 160px;
	min-height: 44px;
	padding: 8px 30px 8px 12px;
	border: 1px solid var(--fp-linea);
	border-radius: 8px;
	background: var(--fp-fondo) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235f5e5a' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 11px center;
	background-size: 11px;
	font: inherit;
	font-size: 14px;
	color: var(--fp-txt);
	appearance: none;
	-webkit-appearance: none;
	cursor: pointer;
	max-width: 100%;
}

.fp-acciones {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 8px;
}

.fp-btn {
	min-height: 44px;
	padding: 8px 16px;
	border: 1px solid var(--fp-linea);
	border-radius: 8px;
	background: var(--fp-fondo);
	font: inherit;
	font-size: 14px;
	color: var(--fp-txt);
	cursor: pointer;
}
.fp-btn:hover { background: var(--fp-suave); }
.fp-btn-idioma { min-width: 52px; font-weight: 600; margin-left: auto; }
.fp-btn-reset { margin-top: 8px; }

.fp-conteo {
	margin: 12px 0 6px;
	font-size: 13px;
	color: var(--fp-txt3);
}

/* ------------------------------------------------------------ listado */

.fp-lista {
	list-style: none;
	margin: 0;
	padding: 0;
}

.fp-sep {
	margin: 26px 0 10px;
	padding-bottom: 6px;
	border-bottom: 1px solid var(--fp-linea);
}
.fp-sep:first-child { margin-top: 8px; }
.fp-sep h3 {
	margin: 0;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: .01em;
	color: var(--fp-txt2);
}

.fp-sesion {
	display: flex;
	gap: 14px;
	padding: 16px 0;
	border-bottom: 1px solid var(--fp-linea);
	scroll-margin-top: 130px;
}

.fp-hora {
	flex: 0 0 62px;
	font-variant-numeric: tabular-nums;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.35;
	padding-top: 1px;
}
.fp-hora-fin {
	display: block;
	font-weight: 400;
	font-size: 13px;
	color: var(--fp-txt3);
}

.fp-cuerpo { flex: 1 1 auto; min-width: 0; }

.fp-etiquetas {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	margin-bottom: 6px;
}

.fp-badge {
	display: inline-block;
	padding: 2px 9px;
	border-radius: 20px;
	font-size: 11px;
	line-height: 1.6;
	font-weight: 600;
	letter-spacing: .02em;
	white-space: nowrap;
}
.fp-badge-feria {
	color: #fff;
	background: var(--fp-color);
}
.fp-badge-categoria {
	background: var(--fp-suave);
	color: var(--fp-txt2);
	text-transform: capitalize;
	font-weight: 500;
}
.fp-badge-dest { background: #fdf0d5; color: #85500b; }
.fp-badge-canc { background: #fbe4e4; color: #a32d2d; }

/* El título y el texto adicional van en el mismo bloque: el título en
   negrita y el texto a continuación en peso normal, como una aclaración. */
.fp-titulo {
	margin: 0 0 5px;
	font-size: 17px;
	line-height: 1.35;
	font-weight: 400;
	color: var(--fp-txt);
}
.fp-t { font-weight: 600; }
.fp-adicional {
	font-weight: 400;
	color: var(--fp-txt2);
}

.fp-ponentes,
.fp-organiza {
	margin: 0 0 3px;
	font-size: 14px;
	line-height: 1.5;
	color: var(--fp-txt);
}
.fp-organiza { color: var(--fp-txt2); }

/* Las etiquetas "Por:" y "Organiza:" no compiten con el contenido. */
.fp-etq {
	color: var(--fp-txt3);
	font-weight: 600;
	margin-right: 2px;
}

.fp-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 14px;
	margin-top: 9px;
	font-size: 13px;
	color: var(--fp-txt2);
}
.fp-lugar {
	display: inline-flex;
	align-items: center;
	flex-wrap: wrap;
}
/* Separación con márgenes y no con gap: algunos motores no aplican gap
   dentro de inline-flex y los textos quedarían pegados. */
.fp-icono {
	flex: 0 0 auto;
	color: var(--fp-color);
	margin-right: 5px;
	vertical-align: -2px;
}
.fp-ubi { color: var(--fp-txt2); }
.fp-sep-punto { color: var(--fp-txt3); margin: 0 5px; }
.fp-espacio { font-weight: 600; color: var(--fp-txt); }

.fp-acc {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 10px;
}
.fp-ics,
.fp-inscripcion {
	display: inline-block;
	padding: 7px 13px;
	border: 1px solid var(--fp-linea);
	border-radius: 7px;
	background: var(--fp-fondo);
	font: inherit;
	font-size: 13px;
	color: var(--fp-txt2);
	text-decoration: none;
	cursor: pointer;
}
.fp-ics:hover,
.fp-inscripcion:hover { background: var(--fp-suave); color: var(--fp-txt); }
.fp-inscripcion {
	border-color: var(--fp-color);
	color: var(--fp-color);
	font-weight: 600;
}

/* ------------------------------------------------------------ estados */

.fp-destacada .fp-titulo { font-size: 18px; }
.fp-destacada {
	border-left: 3px solid #eaa72a;
	padding-left: 13px;
	margin-left: -16px;
}

.fp-cancelada { opacity: .6; }
.fp-cancelada .fp-titulo { text-decoration: line-through; }

.fp-resaltada {
	animation: fp-flash 2.6s ease-out;
}
@keyframes fp-flash {
	0%, 55% { background: #fdf6e3; }
	100% { background: transparent; }
}

.fp-sin-resultados,
.fp-p-vacio {
	margin: 32px 0;
	padding: 26px 16px;
	text-align: center;
	font-size: 15px;
	color: var(--fp-txt2);
	background: var(--fp-suave);
	border-radius: 10px;
}

.fp-pie {
	margin: 20px 0 0;
	padding-top: 12px;
	border-top: 1px solid var(--fp-linea);
	font-size: 12px;
	color: var(--fp-txt3);
}

.fp-programa [hidden] { display: none !important; }

/* ----------------------------------------------------------- escritorio */

@media (min-width: 700px) {
	.fp-toolbar { padding: 14px 0 12px; }
	.fp-barra .fp-dias { flex: 1 1 auto; }
	.fp-barra .fp-acciones { flex: 0 0 auto; }
	.fp-filtros-cuerpo { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
	.fp-selects { flex: 1 1 auto; }
	.fp-btn-reset { margin-top: 0; }
	.fp-hora { flex-basis: 78px; font-size: 16px; }
	.fp-sesion { gap: 20px; padding: 20px 0; }
	.fp-titulo { font-size: 18px; }
}

@media print {
	.fp-toolbar, .fp-acc, .fp-conteo { display: none; }
	.fp-filtros { display: none; }
	.fp-sesion { break-inside: avoid; }
	.fp-programa { max-width: none; font-size: 11pt; }
}

@media (prefers-reduced-motion: reduce) {
	.fp-resaltada { animation: none; background: #fdf6e3; }
	.fp-dia { transition: none; }
}
