/* Tostao · Sitio — página «Formaciones y fechas»: filtros, lista, calendario mensual y estados de plazas. */

.ts-w .ts-form { max-width: var(--ts-ancho); margin: 0 auto; padding: 22px 40px 64px; color: var(--ts-granate); font-family: var(--ts-fuente); }
.ts-w .ts-migas { font-size: 12.5px; color: var(--ts-suave); }
.ts-w .ts-migas a { color: inherit; text-decoration: none; }
.ts-w .ts-titulo { text-align: center; margin: 10px 0 8px; font: 700 46px/1.05 var(--ts-fuente); letter-spacing: -1px; color: var(--ts-granate); }
.ts-w .ts-intro-f { text-align: center; max-width: 660px; margin: 0 auto 24px; color: var(--ts-suave); line-height: 1.6; font-size: 15px; }

/* filtros */
.ts-w .ts-pills { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 22px; }
.ts-w .ts-pi { display: inline-block; border: 1px solid var(--ts-granate); border-radius: 999px; padding: 9px 18px; font-size: 12px; font-weight: 700; line-height: 1.3; letter-spacing: .8px; white-space: nowrap; flex: none; text-transform: uppercase; background: #fff; color: var(--ts-granate); text-decoration: none; }
.ts-w .ts-pi:hover { background: var(--ts-crema-claro); }
.ts-w .ts-pi[aria-current="true"] { background: var(--ts-granate); color: var(--ts-amarillo); border-color: var(--ts-granate); }

/* contador + selector de vista */
.ts-w .ts-vista-barra { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 6px 0 14px; }
.ts-w .ts-cuenta { font-size: 14px; color: var(--ts-suave); font-weight: 600; margin: 0; }
.ts-w .ts-vista-sw { display: inline-flex; gap: 2px; padding: 3px; background: var(--ts-crema-claro); border: 1px solid var(--ts-linea); border-radius: 999px; }
.ts-w .ts-vista-sw button { border: 0; background: transparent; border-radius: 999px; padding: 8px 16px; font: 700 13px var(--ts-fuente); color: var(--ts-granate); display: inline-flex; align-items: center; gap: 8px; cursor: pointer; transition: background .15s, color .15s; }
.ts-w .ts-vista-sw button:hover { background: rgba(91, 17, 23, .08); }
.ts-w .ts-vista-sw button[aria-pressed="true"] { background: var(--ts-granate); color: var(--ts-amarillo); }
.ts-w .ts-vista-sw svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ts-w .ts-form :focus-visible { outline: 3px solid var(--ts-granate); outline-offset: 2px; }

/* lista */
.ts-w .ts-lista { display: grid; gap: 14px; }
/* cabecera de mes: la crea formaciones.js entre las filas (nombre del mes + número de fechas) */
.ts-w .ts-mes-f { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 14px 4px 0; padding: 0; font-size: 20px; font-weight: 800; letter-spacing: -.3px; line-height: 1.2; color: var(--ts-granate); }
.ts-w .ts-mes-f:first-child { margin-top: 4px; }
.ts-w .ts-mes-f small { font-size: 13px; font-weight: 600; letter-spacing: 0; color: var(--ts-suave); }
.ts-w .ts-lista[hidden], .ts-w .ts-cal[hidden], .ts-w .ts-fila[hidden], .ts-w .ts-vacio[hidden], .ts-w .ts-centro[hidden] { display: none; }
.ts-w .ts-fila { display: grid; grid-template-columns: 74px 92px minmax(0, 1fr) auto auto auto; gap: 18px; align-items: center; background: #fff; border: 1px solid var(--ts-linea); border-radius: 18px; padding: 14px 18px; }
.ts-w .ts-dia { background: var(--ts-crema); color: var(--ts-granate); box-shadow: inset 0 0 0 1.5px var(--ts-granate); border-radius: 16px; width: 74px; height: 74px; display: grid; place-items: center; text-align: center; line-height: 1; }
.ts-w .ts-dia b { font-size: 26px; display: block; }
.ts-w .ts-dia span { font-size: 11.5px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.ts-w .ts-mini { width: 92px; height: 66px; border-radius: 12px; background: var(--ts-gris) center / cover no-repeat; }
.ts-w .ts-fila[data-lleno] .ts-mini { filter: grayscale(.6); opacity: .8; }
.ts-w .ts-fila h4 { margin: 0 0 4px; font-size: 17px; line-height: 1.2; font-weight: 700; color: var(--ts-granate); }
.ts-w .ts-fila p { margin: 0; font-size: 13px; color: var(--ts-suave); line-height: 1.45; }
.ts-w .ts-sca { display: inline-block; background: var(--ts-granate); color: var(--ts-amarillo); font-size: 10.5px; font-weight: 800; letter-spacing: 1px; padding: 2px 8px; border-radius: 999px; margin-left: 6px; vertical-align: 2px; }
.ts-w .ts-precio { font-size: 20px; font-weight: 800; white-space: nowrap; }
.ts-w .ts-etq { font-size: 12.5px; font-weight: 700; padding: 6px 12px; border-radius: 999px; white-space: nowrap; }
.ts-w .ts-etq.ts-libre { box-shadow: inset 0 0 0 1.5px var(--ts-granate); color: var(--ts-granate); }
.ts-w .ts-etq.ts-conf { background: var(--ts-granate); color: var(--ts-amarillo); }
.ts-w .ts-etq.ts-escasez { background: var(--ts-amarillo); color: var(--ts-granate); }
.ts-w .ts-etq.ts-lleno { box-shadow: inset 0 0 0 1.5px var(--ts-linea); color: var(--ts-suave); }
.ts-w .ts-btn-sec { display: inline-block; border: 1.5px solid var(--ts-granate); border-radius: 999px; padding: 8px 16px; font-weight: 800; font-size: 12.5px; background: #fff; color: var(--ts-granate); text-decoration: none; white-space: nowrap; transition: background .15s, color .15s; }
.ts-w .ts-btn-sec:hover { background: var(--ts-granate); color: var(--ts-amarillo); }
.ts-w .ts-centro { display: flex; justify-content: center; margin-top: 26px; }
.ts-w .ts-form .ts-pill { display: inline-block; background: var(--ts-amarillo); color: var(--ts-granate); font: 700 13.5px/1.2 var(--ts-fuente); padding: 11px 22px; border-radius: 999px; text-decoration: none; transition: background .15s, color .15s; }
.ts-w .ts-form .ts-pill:hover { background: var(--ts-granate); color: var(--ts-amarillo); }
.ts-w .ts-vacio { text-align: center; background: #fff; border: 1px solid var(--ts-linea); border-radius: 18px; padding: 34px 24px; margin-top: 14px; }
.ts-w .ts-vacio h3 { margin: 0 0 8px; font-size: 20px; }
.ts-w .ts-vacio p { margin: 0 0 18px; color: var(--ts-suave); }

/* calendario */
.ts-w .ts-cal-cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 14px; }
.ts-w .ts-cal-mes { margin: 0; font-size: 26px; letter-spacing: -.5px; text-transform: capitalize; color: var(--ts-granate); }
.ts-w .ts-cal-nav { width: 44px; height: 44px; padding: 0; border-radius: 50%; border: 2px solid var(--ts-granate); background: #fff; color: var(--ts-granate); display: grid; place-items: center; cursor: pointer; transition: background .15s, color .15s; }
.ts-w .ts-cal-nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.ts-w .ts-cal-nav:hover { background: var(--ts-granate); color: var(--ts-amarillo); }
.ts-w .ts-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--ts-linea); border-radius: 18px; overflow: hidden; background: #fff; }
.ts-w .ts-cal-dow { padding: 10px 0; text-align: center; font-weight: 800; font-size: 12.5px; letter-spacing: .08em; color: var(--ts-granate); background: var(--ts-crema-claro); border-bottom: 1px solid var(--ts-linea); }
.ts-w .ts-cal-d { min-height: 104px; padding: 8px; margin: 0; border: 0; border-right: 1px solid var(--ts-linea); border-bottom: 1px solid var(--ts-linea); border-radius: 0; display: flex; flex-direction: column; gap: 6px; align-items: stretch; text-align: left; background: #fff; font: inherit; color: inherit; position: relative; }
.ts-w .ts-cal-d:nth-child(7n + 7) { border-right: 0; }
.ts-w .ts-cal-d > b { font-size: 14px; font-weight: 700; color: var(--ts-suave); align-self: flex-start; }
.ts-w .ts-cal-d.ts-cal-v { background: var(--ts-crema-claro); opacity: .5; }
.ts-w .ts-cal-d.pasado > b { opacity: .45; }
.ts-w .ts-cal-d.hoy > b { background: var(--ts-granate); color: var(--ts-amarillo); border-radius: 50%; width: 26px; height: 26px; display: grid; place-items: center; }
.ts-w button.ts-cal-d.con { cursor: pointer; }
.ts-w button.ts-cal-d.con:hover { background: var(--ts-crema-claro); }
.ts-w button.ts-cal-d.con > b { color: var(--ts-granate); font-size: 16px; }
.ts-w .ts-cal-d.sel { box-shadow: inset 0 0 0 3px var(--ts-granate); }
.ts-w .ts-cal-evs { display: flex; flex-direction: column; gap: 4px; flex: 1; min-height: 0; }
.ts-w .ts-cal-evs .ts-cal-ev { flex: 1; display: flex; align-items: center; white-space: normal; overflow-wrap: break-word; hyphens: manual; font-size: 13px; line-height: 1.2; }
/* Día con una sola formación: el recuadro entero es la formación */
.ts-w button.ts-cal-d.un { padding: 8px 10px 10px; gap: 4px; }
.ts-w button.ts-cal-d.un .ts-cal-ev { background: none; box-shadow: none; padding: 0; border-radius: 0; font-size: 14px; font-weight: 800; align-items: flex-end; text-decoration: none; color: inherit; }
.ts-w button.ts-cal-d.un.libre { background: #fff; box-shadow: inset 0 0 0 2px var(--ts-granate); color: var(--ts-granate); }
.ts-w button.ts-cal-d.un.conf { background: var(--ts-granate); color: var(--ts-amarillo); }
.ts-w button.ts-cal-d.un.conf > b { color: var(--ts-amarillo); }
.ts-w button.ts-cal-d.un.ultimas { background: var(--ts-amarillo); color: var(--ts-granate); }
.ts-w button.ts-cal-d.un.lleno { background: var(--ts-linea); color: var(--ts-suave); }
.ts-w button.ts-cal-d.un.lleno .ts-cal-ev { text-decoration: line-through; }
.ts-w button.ts-cal-d.un:hover { filter: brightness(.96); }
.ts-w button.ts-cal-d.un.sel { box-shadow: none; outline: 3px solid var(--ts-granate); outline-offset: -3px; }
.ts-w button.ts-cal-d.un.conf.sel { outline-color: var(--ts-amarillo); }
.ts-w .ts-cal-pts { display: none; gap: 4px; justify-content: center; flex-wrap: wrap; }
.ts-w .ts-cal-ev { display: block; font-size: 11.5px; font-weight: 800; padding: 4px 8px; border-radius: 8px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ts-w .ts-cal-ev.libre { box-shadow: inset 0 0 0 1.5px var(--ts-granate); color: var(--ts-granate); }
.ts-w .ts-cal-ev.conf { background: var(--ts-granate); color: var(--ts-amarillo); }
.ts-w .ts-cal-ev.ultimas { background: var(--ts-amarillo); color: var(--ts-granate); }
.ts-w .ts-cal-ev.lleno { background: var(--ts-linea); color: var(--ts-suave); text-decoration: line-through; }
.ts-w .ts-cal-pt { width: 9px; height: 9px; border-radius: 50%; display: block; }
.ts-w .ts-cal-pt.libre { box-shadow: inset 0 0 0 1.8px var(--ts-granate); }
.ts-w .ts-cal-pt.conf { background: var(--ts-granate); }
.ts-w .ts-cal-pt.ultimas { background: var(--ts-amarillo); box-shadow: 0 0 0 1px var(--ts-granate); }
.ts-w .ts-cal-pt.lleno { background: var(--ts-linea); }
.ts-w .ts-cal-leyenda { display: flex; gap: 8px 20px; flex-wrap: wrap; margin: 12px 2px 0; font-size: 12.5px; color: var(--ts-suave); align-items: center; }
.ts-w .ts-cal-leyenda span { display: inline-flex; gap: 7px; align-items: center; }
.ts-w .ts-cal-agenda { margin-top: 24px; }
.ts-w .ts-cal-agenda h4 { margin: 0 0 12px; font-size: 19px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; color: var(--ts-granate); }
.ts-w .ts-cal-agenda h4 button { font: 700 13px var(--ts-fuente); color: var(--ts-granate); background: none; border: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 4px 0; }
.ts-w .ts-cal-agenda .ts-lista { display: grid; gap: 12px; }
.ts-w .ts-cal-vacio { background: var(--ts-crema-claro); border: 1px solid var(--ts-linea); border-radius: 16px; padding: 20px; font-size: 14.5px; display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; }

/* pantallas medias: la fila de seis columnas dejaba el título en ~80 px; pasa a dos líneas (título + estado arriba y abajo, precio y botón a la derecha) */
@media (max-width: 1100px) {
	.ts-w .ts-fila { grid-template-columns: 74px 92px minmax(0, 1fr) auto; gap: 8px 18px; }
	.ts-w .ts-dia, .ts-w .ts-mini { grid-row: 1 / span 2; align-self: center; }
	.ts-w .ts-fila > :nth-child(3) { grid-column: 3; grid-row: 1; align-self: end; }
	.ts-w .ts-etq { grid-column: 3; grid-row: 2; justify-self: start; align-self: start; }
	.ts-w .ts-precio { grid-column: 4; grid-row: 1; justify-self: end; align-self: end; }
	.ts-w .ts-fila .ts-btn-sec { grid-column: 4; grid-row: 2; justify-self: end; align-self: start; }
}
/* tableta y móvil */
@media (max-width: 960px) {
	.ts-w .ts-form { padding: 16px 20px 46px; }
	.ts-w .ts-titulo { font-size: 34px; }
	.ts-w .ts-pills { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; }
	.ts-w .ts-pi { flex: none; }
	.ts-w .ts-pills { scrollbar-width: none; }
	.ts-w .ts-pills::-webkit-scrollbar { display: none; }
}
@media (max-width: 900px) {
	/* con recuadros estrechos el nombre no cabe sin partirse: el color del recuadro ya dice el estado y el detalle sale debajo */
	.ts-w .ts-cal-d { min-height: 58px; padding: 6px 3px; align-items: center; gap: 5px; }
	.ts-w .ts-cal-d > b { align-self: center; }
	.ts-w .ts-cal-evs { display: none; }
	.ts-w .ts-cal-pts { display: flex; }
	.ts-w button.ts-cal-d.un { padding: 6px 3px; }
	.ts-w button.ts-cal-d.un .ts-cal-pts { display: none; }
	.ts-w button.ts-cal-d.un > b { color: inherit; }
}
@media (max-width: 760px) {
	.ts-w .ts-cal-mes { font-size: 22px; }
	.ts-w .ts-cal-dow { font-size: 11px; letter-spacing: .02em; }
}
@media (max-width: 600px) {
	.ts-w .ts-form { padding: 14px 16px 40px; }
	.ts-w .ts-titulo { font-size: 28px; }
	/* Lista en móvil: franjas a todo el ancho que alternan fondo gris cálido y blanco, en lugar de tarjetas pegadas */
	.ts-w .ts-lista { --ts-banda: #F3EEE1; gap: 0; margin: 0 -16px; background: #fff; border-top: 1px solid var(--ts-linea); border-bottom: 1px solid var(--ts-linea); }
	.ts-w .ts-fila { grid-template-columns: 62px minmax(0, 1fr) auto; gap: 8px 14px; padding: 22px 16px 24px; border: 0; border-radius: 0; background: #fff; }
	.ts-w .ts-fila:nth-child(odd of .ts-fila:not([hidden])) { background: var(--ts-banda); }
	.ts-w .ts-fila:nth-child(odd of .ts-fila:not([hidden])) .ts-dia { background: #fff; }
	.ts-w .ts-mes-f { margin: 0; padding: 26px 16px 12px; background: #fff; border-top: 1px solid var(--ts-linea); font-size: 21px; }
	.ts-w .ts-mes-f:first-child { padding-top: 22px; border-top: 0; }
	.ts-w .ts-dia { width: 62px; height: 62px; grid-row: 1 / span 2; }
	.ts-w .ts-dia b { font-size: 22px; }
	.ts-w .ts-mini { display: none; }
	.ts-w .ts-donde-f { display: none; }
	.ts-w .ts-fila > :nth-child(3) { grid-column: 2 / -1; grid-row: 1; }
	.ts-w .ts-fila h4 { font-size: 18px; margin-bottom: 6px; }
	.ts-w .ts-fila p { font-size: 14px; }
	.ts-w .ts-etq { grid-column: 2 / -1; grid-row: 2; justify-self: start; align-self: start; }
	/* «Reserva abierta» y «Completo» son información, no botones: en móvil van como texto con punto (el contorno redondo parecía un botón) */
	.ts-w .ts-etq.ts-libre, .ts-w .ts-etq.ts-lleno { box-shadow: none; padding: 4px 0; font-size: 13.5px; }
	.ts-w .ts-etq.ts-libre::before, .ts-w .ts-etq.ts-lleno::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: -1px; }
	.ts-w .ts-etq.ts-libre::before { box-shadow: inset 0 0 0 2px var(--ts-granate); }
	.ts-w .ts-etq.ts-lleno::before { background: var(--ts-linea); }
	/* fila de acción: precio a la izquierda y botón a la derecha */
	.ts-w .ts-precio { grid-column: 1 / 3; grid-row: 3; font-size: 21px; justify-self: start; align-self: center; margin-top: 8px; }
	.ts-w .ts-fila .ts-btn-sec { grid-column: 3; grid-row: 3; margin-top: 8px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 22px; font-size: 13.5px; background: var(--ts-amarillo); border-color: var(--ts-amarillo); color: var(--ts-granate); }
	.ts-w .ts-fila .ts-btn-sec:hover { background: var(--ts-granate); border-color: var(--ts-granate); color: var(--ts-amarillo); }
	.ts-w .ts-fila[data-lleno] .ts-btn-sec { background: transparent; border-color: var(--ts-granate); }
	.ts-w .ts-fila[data-lleno] .ts-btn-sec:hover { background: var(--ts-granate); color: var(--ts-amarillo); }
	.ts-w .ts-cal-agenda .ts-lista { margin-top: 4px; }
}
@media (prefers-reduced-motion: reduce) { .ts-w .ts-form * { transition: none !important; } }

/* acceso rápido a la tarjeta regalo al final del listado */
.ts-w .ts-regalo-f { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 10px; margin: 28px 0 0; padding: 18px 24px; border-radius: 18px; background: var(--ts-crema-claro); color: var(--ts-granate); font: 600 15px/1.4 var(--ts-fuente); }
.ts-w .ts-regalo-f svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ts-w .ts-regalo-f a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 800; color: var(--ts-granate); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* ---- barra de filtros fija al desplazarse (la misma que la de la tienda) ---- */
.ts-w .ts-fija { position: sticky; top: var(--ts-sticky-top, 0px); z-index: 30; padding: 12px 0; margin: -12px 0 10px; background: #fff; box-shadow: 0 0 0 100vmax #fff; clip-path: inset(0 -100vmax); }
.ts-w .ts-fija .ts-pills { margin-bottom: 0; flex-wrap: nowrap; overflow-x: auto; justify-content: center; justify-content: safe center; scrollbar-width: none; padding: 2px; }
.ts-w .ts-fija .ts-pills::-webkit-scrollbar { display: none; }
.ts-w .ts-fija::after { content: ""; position: absolute; left: -100vmax; right: -100vmax; bottom: 0; height: 1px; background: var(--ts-linea); opacity: 0; transition: opacity .15s; pointer-events: none; }
.ts-w .ts-fija.ts-pegada::after { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .ts-w .ts-fija::after { transition: none; } }

/* botón de la tarjeta regalo bajo la introducción */
.ts-w .ts-regalo-cab { display: flex; justify-content: center; margin: -6px 0 22px; }
.ts-w .ts-regalo-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 24px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--ts-granate); color: var(--ts-granate); font: 700 13.5px/1.2 var(--ts-fuente); text-decoration: none; transition: background .15s, color .15s; }
.ts-w .ts-regalo-btn:hover { background: var(--ts-granate); color: var(--ts-amarillo); }
.ts-w .ts-regalo-btn svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 600px) { .ts-w .ts-regalo-btn { width: 100%; justify-content: center; } }
