/*
 * Mapa de butaques (seat-map.js). Colors amb contrast de 3:1 com a mínim sobre el blanc:
 * lliure amb vora (es distingeix de l'ocupada pel farcit), la triada amb el color de la marca.
 * Els colors són variables (--tk-seat-*): un disseny amb mode fosc posa els seus.
 * Els plànols del panell tenen escales molt diferents: vector-effect manté el gruix de la vora.
 */
.tk-seat-map { position: relative; padding: 14px 8px 12px; border: 1px solid var(--tk-line, #E7E3DC); border-radius: var(--tk-radius, 8px); background: var(--tk-bg, #fff); }
.tk-seat-map__canvas { overflow: auto; max-height: 70vh; touch-action: pan-x pan-y pinch-zoom; }
.tk-seat-map__canvas svg { display: block; width: 100%; height: auto; }
.tk-seat-map__zoom { position: absolute; right: 10px; top: 10px; z-index: 2; display: flex; flex-direction: column; gap: 6px; }
.tk-seat-map__zoom button { width: 40px; height: 40px; min-height: 0; padding: 0; border-radius: var(--tk-radius, 8px); border: 1px solid var(--tk-line, #E7E3DC); background: var(--tk-bg, #fff); color: var(--tk-ink, #171412); font-size: 0; cursor: pointer; text-decoration: none; }
.tk-seat-map__zoom button::before { font-size: 1.25rem; font-weight: 500; }
.tk-seat-map__zoom [data-tk-seat-zoom="in"]::before { content: '+'; }
.tk-seat-map__zoom [data-tk-seat-zoom="out"]::before { content: '−'; }
.tk-seat-map__zoom [data-tk-seat-zoom="reset"]::before { content: '1:1'; font-size: .75rem; font-weight: 700; }

.tk-seat { cursor: default; }
.tk-seat--free { fill: var(--tk-seat-free, #FFFFFF) !important; stroke: var(--tk-seat-free-line, #6F695F) !important; stroke-width: 1.5px; vector-effect: non-scaling-stroke; cursor: pointer; }
.tk-seat--free:hover { fill: var(--tk-muted-bg, #F4F2EE) !important; }
.tk-seat--free.tk-seat--mobility { fill: var(--tk-seat-mobility, #DCE8F5) !important; stroke: var(--tk-seat-mobility-line, #1F5C99) !important; }
.tk-seat--free.tk-seat--reduced { fill: var(--tk-seat-reduced, #EFE4F5) !important; stroke: var(--tk-seat-reduced-line, #6A3D8A) !important; }
.tk-seat--free.tk-seat--pack { fill: var(--tk-seat-pack, #E6E3F5) !important; stroke: var(--tk-seat-pack-line, #4A3F8C) !important; }
.tk-seat--busy { fill: var(--tk-seat-busy, #D6D0C6) !important; stroke: none !important; }
.tk-seat--selected { fill: var(--tk-accent-ui, #171412) !important; stroke: var(--tk-accent-ui, #171412) !important; }
.tk-seat:focus { outline: none; stroke: var(--tk-ink, #171412) !important; stroke-width: 3px; }

.tk-seat-map__legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; list-style: none; margin: 12px 0 0; padding: 0; color: var(--tk-ink-2, #3E3A35); font-size: .8125rem; }
.tk-seat-map__legend li { display: flex; align-items: center; gap: 6px; }
.tk-seat-map__legend span { display: inline-block; width: 14px; height: 14px; border-radius: 4px; }
.tk-seat-map__legend .is-free { border: 1.5px solid var(--tk-seat-free-line, #6F695F); background: var(--tk-seat-free, #FFFFFF); }
.tk-seat-map__legend .is-mobility { border: 1.5px solid var(--tk-seat-mobility-line, #1F5C99); background: var(--tk-seat-mobility, #DCE8F5); }
.tk-seat-map__legend .is-reduced { border: 1.5px solid var(--tk-seat-reduced-line, #6A3D8A); background: var(--tk-seat-reduced, #EFE4F5); }
.tk-seat-map__legend .is-busy { background: var(--tk-seat-busy, #D6D0C6); }
.tk-seat-map__legend .is-selected { background: var(--tk-accent-ui, #171412); }

.tk-seat-map [data-tk-seat-list] { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tk-seat-map [data-tk-seat-list]:empty { display: none; }
.tk-seat-map [data-tk-seat-list] li { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 10px 12px; border: 2px solid var(--tk-accent-ui, #171412); border-radius: var(--tk-radius, 8px); }
.tk-seat-map [data-tk-seat-list] li > span:first-child { font-weight: 700; min-width: 5rem; }
.tk-seat-map [data-tk-seat-list] select, .tk-seat-map [data-tk-seat-list] input { flex: 1 1 12rem; min-height: 44px; padding: 0 10px; border: 1px solid var(--tk-line-strong, #D6D0C6); border-radius: var(--tk-radius, 8px); background: var(--tk-bg, #fff); }
.tk-seat-map:not(.tk-seat-map--ready) .tk-seat-map__zoom { display: none; }

/* El plànol sencer a la vista fins que es fa zoom (seat-map.js posa l'amplada en línia). */
.tk-seat-map__canvas svg:not([style*="width"]) { max-height: 68vh; }
