/* Jornada 26-11-2026: ver prompts/2026-11-26/CONTRATO.md
   Ficha del curso (public/js/views/event.js). Mobile first: una columna a 390 px y, desde 861 px,
   contenido a la izquierda y la inscripción a la derecha. Se separa con espacio y líneas finas;
   la única caja es la de inscripción. Tamaños: título, subtítulo de sección y texto. */

.fx { --fx-gap: 32px; padding-block: var(--s-6) var(--s-16); }
.fx .fx-notice { margin-bottom: var(--s-5); }
.fx-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-6); }

/* Cabecera: tipo, título, organizador, fecha y lugar */
.fx-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--s-3); }
.fx-kind { color: var(--ink-2); font-size: 1rem; }
.fx-kind a { color: var(--ink); font-weight: 500; text-decoration: underline; text-decoration-color: var(--linea-fuerte); text-underline-offset: 3px; }
.fx-kind a:hover { text-decoration-color: currentColor; }
.fx-title { margin-top: var(--s-2); font-family: var(--font-display); font-weight: 600; font-size: 1.75rem; line-height: 1.15; letter-spacing: -0.02em; color: var(--ink); text-wrap: balance; overflow-wrap: break-word; }
.fx-sub { margin-top: var(--s-3); font-size: 1rem; line-height: 1.55; color: var(--ink-2); max-width: 60ch; }
.fx-org { margin-top: var(--s-4); font-size: 1rem; line-height: 1.5; color: var(--ink-2); }
.fx-org .verified-icon { display: inline-grid; vertical-align: -2px; margin-left: 4px; }
.fx-org a { color: var(--ink); font-weight: 600; text-decoration: none; }
.fx-org a:hover { text-decoration: underline; text-underline-offset: 3px; }
.fx-rating { margin-top: var(--s-2); }

.fx-facts { list-style: none; margin: var(--s-6) 0 0; padding: 0; display: grid; gap: var(--s-4); }
.fx-facts li { display: flex; align-items: center; gap: 14px; min-width: 0; }
.fx-facts li > div { display: grid; gap: 2px; min-width: 0; }
.fx-facts b { font-weight: 600; font-size: 1rem; line-height: 1.4; color: var(--ink); }
.fx-facts span:not(.date-tile):not(.fx-fact-icon) { color: var(--ink-2); font-size: 1rem; line-height: 1.45; }
.fx-facts a { color: var(--ink); font-weight: 500; }
.fx .date-tile { width: 50px; flex: none; }
.fx-fact-icon { width: 50px; flex: none; display: grid; place-items: center; color: var(--noche); }
.fx-fact-icon .icon { width: 24px; height: 24px; }

/* Foto del evento: solo si la organización subió una. La portada tipográfica repetiría lo que ya dice el título. */
.fx-photo { margin: var(--s-6) 0 0; border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 10; background: var(--noche-100); }
.fx-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Inscripción */
.fx-side { min-width: 0; }

.fx-buy { background: var(--surface); border: 1px solid var(--linea); border-radius: 12px; scroll-margin-top: calc(var(--header-h) + 16px); }
.fx-buy-body { display: grid; gap: var(--s-4); padding: var(--s-5); }
.fx-price { display: grid; gap: 2px; }
.fx-price b { font-family: var(--font-display); font-size: 1.75rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; color: var(--ink); font-variant-numeric: tabular-nums; }
.fx-price span { color: var(--ink-2); font-size: 1rem; }
.fx-note { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-2); font-size: 1rem; line-height: 1.5; }
.fx-note .icon { flex: none; margin-top: 2px; color: var(--noche); }
.fx-note b { color: var(--ink); }
.fx-spots { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; color: var(--ink-2); font-size: 1rem; }
.fx-spots .spots-low { color: var(--alerta); font-weight: 600; }
/* Entradas como lista con líneas finas, no cajas dentro de la caja de inscripción: la elegida se marca con el radio. */
.fx .tickets { gap: 0; border-top: 1px solid var(--linea); }
.fx .ticket { min-height: 56px; padding: 14px 4px; border: 0; border-bottom: 1px solid var(--linea); border-radius: 0; background: none; box-shadow: none; }
.fx .ticket:hover { background: none; }
.fx .ticket:hover .radio { border-color: var(--noche); }
.fx .ticket[aria-pressed='true'] { background: none; box-shadow: none; }
.fx .ticket:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; border-radius: 12px; }
.fx .ticket small { display: block; margin-top: 2px; font-size: 0.875rem; line-height: 1.4; }
.fx .reg-status b { font-size: 1rem; }
.fx .reg-status p { margin-top: 2px; }
.fx-cancel { justify-self: start; min-height: 44px; padding: 0; border: 0; background: none; color: var(--error); font: inherit; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.fx-checkout-head { display: flex; align-items: center; gap: 8px; margin-left: -8px; }
.fx-checkout-head h3 { font-size: 1.25rem; }
.fx-line { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-block: 1px solid var(--linea); }
.fx-break { overflow-wrap: anywhere; }

/* Botones: alto mínimo de 48 px; el secundario lleva borde azul noche. */
.fx .btn { min-height: 48px; }
.fx .btn:not(.btn-primary):not(.btn-ghost):not(.btn-icon) { border-color: var(--noche); }
.fx .btn:not(.btn-primary):not(.btn-ghost):not(.btn-icon):hover { background: var(--noche-050); }
.fx .btn-icon { width: 48px; }


/* Secciones del cuerpo: separadas por una línea fina, sin cajas. */
.fx-body { min-width: 0; }
.fx-section { padding-top: var(--fx-gap); margin-top: var(--fx-gap); border-top: 1px solid var(--linea); }
.fx-body > .fx-section:first-child { margin-top: var(--s-2); }
.fx-section > h2 { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; letter-spacing: -0.015em; line-height: 1.3; margin-bottom: var(--s-4); }
.fx-section p { font-size: 1rem; line-height: 1.6; }

.fx-good { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.fx-good li { display: flex; gap: 12px; align-items: flex-start; font-size: 1rem; line-height: 1.5; }
.fx-good .icon { flex: none; width: 22px; height: 22px; margin-top: 1px; color: var(--noche); }
.fx-good a { color: var(--ink); font-weight: 500; }

.fx-messages { display: grid; gap: var(--s-5); }
.fx-messages article { display: grid; gap: 2px; padding-left: 14px; border-left: 2px solid var(--noche); }
.fx-messages p { margin-top: 6px; }

.fx-avatar { flex: none; width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: var(--noche-050); }
.fx-initials { display: grid; place-items: center; font-family: var(--font-display); font-weight: 600; font-size: 1rem; color: var(--noche); background: var(--noche-050); letter-spacing: 0.01em; }
.fx-person { display: flex; gap: var(--s-4); align-items: flex-start; }
.fx-person > div { display: grid; gap: 2px; min-width: 0; }
.fx-person b { font-size: 1rem; font-weight: 600; }
.fx-cred { color: var(--ink-2); font-size: 1rem; line-height: 1.5; }
.fx-person p { margin-top: var(--s-2); }

.fx-prose p + p { margin-top: var(--s-3); }
.fx-prose.is-clamped { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 7; line-clamp: 7; overflow: hidden; }
.fx-more { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-top: var(--s-2); padding: 0; border: 0; background: none; color: var(--link); font-family: var(--font-display); font-weight: 500; font-size: 1rem; cursor: pointer; }
.fx-more:hover { text-decoration: underline; text-underline-offset: 4px; }
.fx-more[aria-expanded='true'] .icon { transform: rotate(-90deg); }
.fx-more:not([aria-expanded='true']) .icon { transform: rotate(90deg); }

.fx-syllabus { list-style: none; margin: 0; padding: 0; }
.fx-syllabus li { padding: 12px 0; border-bottom: 1px solid var(--linea); font-size: 1rem; line-height: 1.5; }
.fx-syllabus li:first-child { padding-top: 0; }
.fx-syllabus li:last-child { border-bottom: 0; padding-bottom: 0; }

.fx-includes { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.fx-includes li { display: flex; gap: 12px; align-items: flex-start; font-size: 1rem; line-height: 1.5; }
.fx-includes .icon { flex: none; width: 20px; height: 20px; margin-top: 2px; color: var(--exito); }

.fx-who { display: grid; gap: var(--s-3); justify-items: start; }
.fx-who p { color: var(--ink-2); }
.fx-faces { display: flex; }
.fx-faces .fx-avatar { width: 40px; height: 40px; font-size: 0.875rem; border: 2px solid var(--bg); margin-left: -8px; background: var(--noche-100); }
.fx-faces .fx-avatar:first-child { margin-left: 0; }

.fx-orgcard { display: flex; align-items: center; gap: 14px; }
.fx-orgcard > div { display: grid; gap: 2px; min-width: 0; justify-items: start; }
.fx-logo { flex: none; width: 56px; height: 56px; border-radius: 12px; object-fit: contain; padding: 4px; background: var(--blanco); border: 1px solid var(--linea); }
.fx-logo.fx-initials { padding: 0; border: 0; background: var(--noche); color: var(--crema); }
.fx-orgname { font-weight: 600; font-size: 1rem; color: var(--ink); text-decoration: none; }
.fx-orgname:hover { text-decoration: underline; text-underline-offset: 3px; }
.fx-org-about { margin-top: var(--s-4); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow: hidden; }
.fx-link { min-height: 44px; margin-top: var(--s-2); }
.fx-subhead { margin-top: var(--s-6); margin-bottom: var(--s-2); font-family: var(--font-display); font-size: 1rem; font-weight: 600; }
.fx-rows { list-style: none; margin: 0; padding: 0; }
.fx-rows li + li { border-top: 1px solid var(--linea); }
.fx-rows a { display: grid; grid-template-columns: 50px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 12px 0; color: var(--ink); text-decoration: none; }
.fx-rows a:hover .fx-row-text b { text-decoration: underline; text-underline-offset: 3px; }
.fx-row-text { display: grid; gap: 2px; min-width: 0; }
.fx-row-text b { font-weight: 600; font-size: 1rem; line-height: 1.35; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.fx-row-text span { color: var(--ink-2); font-size: 1rem; }
.fx-row-price { font-family: var(--font-display); font-weight: 600; white-space: nowrap; }

/* isolation: los paneles de Leaflet (z-index 400) no pasan por encima del encabezado ni de la barra fija. */
.fx .fx-map { position: relative; z-index: 0; isolation: isolate; height: 240px; border-radius: 12px; margin-top: var(--s-4); }

.fx-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.fx-actions .btn { flex: 1 1 auto; }
.fx-share { display: flex; flex-wrap: wrap; align-items: center; column-gap: var(--s-6); margin-top: var(--s-5); color: var(--ink-2); }
.fx-share > span { flex-basis: 100%; }
.fx-share a, .fx-share button { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0; border: 0; background: none; color: var(--link); font-family: var(--font-display); font-weight: 500; font-size: 1rem; text-decoration: none; cursor: pointer; }
.fx-share a:hover, .fx-share button:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Barra fija del celular: precio y botón principal a lo ancho. Se esconde mientras la caja está a la vista. */
@media (max-width: 860px) {
  .mobile-buy.fx-bar { padding: 10px 16px; gap: var(--s-4); box-shadow: 0 -8px 24px -20px rgba(18, 48, 74, 0.4); }
  .fx-bar.is-off, .fx-bar.is-hidden { display: none; }
  .fx-bar-price { display: grid; gap: 0; min-width: 0; flex: none; max-width: 48%; }
  .fx-bar-price b { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; line-height: 1.25; color: var(--ink); }
  .fx-bar-price span { color: var(--ink-2); font-size: 0.875rem; line-height: 1.35; }
  .fx-bar .btn { flex: 1 1 auto; min-height: 48px; padding-inline: 16px; }
  .fx-bar .btn:not(.btn-primary) { border-color: var(--noche); }
}

/* Computador: contenido a la izquierda, portada e inscripción a la derecha. */
@media (min-width: 861px) {
  .fx { --fx-gap: 40px; padding-top: var(--s-10); }
  .fx-grid { grid-template-columns: minmax(0, 1fr) 360px; grid-template-areas: 'head side' 'body side'; column-gap: var(--s-16); row-gap: var(--s-8); }
  .fx-head { grid-area: head; }
  .fx-side { grid-area: side; align-self: stretch; align-content: start; }
  .fx-body { grid-area: body; }
  .fx-title { font-size: 2.5rem; line-height: 1.1; }
  .fx-photo { max-width: 640px; }
  /* Fija al hacer scroll; si hay muchas entradas, la caja se desplaza por dentro en vez de cortarse. */
  .fx-buy { position: sticky; top: calc(var(--header-h) + 24px); max-height: calc(100vh - var(--header-h) - 48px); overflow-y: auto; overscroll-behavior: contain; }
  .fx-buy-body { padding: var(--s-6); }
  .fx-good { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s-6); }
  .fx-avatar { width: 64px; height: 64px; }
  .fx-actions .btn { flex: 0 0 auto; }
}
@media (min-width: 861px) and (max-width: 1080px) {
  .fx-grid { grid-template-columns: minmax(0, 1fr) 320px; column-gap: var(--s-10); }
  .fx-good { grid-template-columns: minmax(0, 1fr); }
}
