/* TECHTEXTIL 2026 prep - overrides on top of ../../shared/shared.css */

.page { max-width: 1200px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }
.page h1 { font-size: 1.9rem; margin-bottom: .4rem; }
.page h2 { font-size: 1.25rem; margin: 2rem 0 .8rem; padding-top: .5rem; border-top: 1px solid var(--border); }
.page h3 { font-size: 1.05rem; margin: 1.25rem 0 .4rem; }
.page h4 { font-size: .9rem; margin: .6rem 0 .25rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.page p { margin-bottom: .8rem; }
.lede { color: var(--muted); font-size: 1rem; margin-bottom: 1.5rem; }

/* stat cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .75rem; margin: 1rem 0 1.5rem; }
.stat-card { background: var(--gray); padding: 1rem; border-radius: var(--radius); display: flex; flex-direction: column; }
.stat-card b { font-size: 1.8rem; color: var(--primary); }
.stat-card span { color: var(--muted); font-size: .85rem; }

/* category grid */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: .75rem; margin-bottom: 1.5rem; }
.cat-card { display: block; padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; color: var(--fg); background: var(--bg); transition: background .15s, border-color .15s; }
.cat-card:hover { background: var(--row-hover); border-color: var(--primary); }
.cat-num { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.cat-title { font-weight: 600; font-size: 1.05rem; margin: .25rem 0 .5rem; }
.cat-desc { color: var(--muted); font-size: .85rem; margin-bottom: .75rem; }
.cat-n { font-size: .8rem; color: var(--primary); font-weight: 600; }

/* exhibitor rows - columns: rank | name | loc | booth | C1 | C2 | C3 | C4 | score | map */
.ex-header, .ex-row summary { display: grid; grid-template-columns: 3rem 2.4fr 1.4fr 4.5rem 2.5rem 2.5rem 2.5rem 2.5rem 2.5rem 2rem; gap: .4rem; align-items: center; padding: .5rem .75rem; }
.ex-header { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid var(--border); position: sticky; top: 2.5rem; background: var(--bg); z-index: 5; }
.ex-list .ex-row { border-bottom: 1px solid var(--border); }
.ex-row summary { cursor: pointer; list-style: none; font-size: .9rem; }
.ex-row summary::-webkit-details-marker { display: none; }
.ex-row[open] summary { background: var(--row-hover); }
.ex-row summary:hover { background: var(--row-hover); }
.col-rank { font-weight: 600; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.col-name { font-weight: 600; }
.col-loc { color: var(--muted); font-size: .85rem; }
.col-c { text-align: center; transition: background .15s; }
.col-c .score { min-width: unset; padding: 2px 5px; font-size: .75rem; }
.cat-cell-empty { color: var(--gray-tag); font-size: .8rem; }

/* Highlight the active category column so the sort dimension is obvious
   without duplicating its score in "Best". Matches the opp-block left-border
   colours for visual continuity. */
html[data-active-cat="c1"] .col-c1 { background: rgba(30, 63, 114, .09); }
html[data-active-cat="c2"] .col-c2 { background: rgba(101, 166, 201, .14); }
html[data-active-cat="c3"] .col-c3 { background: rgba(154, 61, 124, .10); }
html[data-active-cat="c4"] .col-c4 { background: rgba(22, 163, 74, .10); }
html[data-active-cat="c1"] .ex-header .col-c1,
html[data-active-cat="c2"] .ex-header .col-c2,
html[data-active-cat="c3"] .ex-header .col-c3,
html[data-active-cat="c4"] .ex-header .col-c4 { color: var(--fg); font-weight: 700; }

/* per-category opportunity blocks inside the expanded row */
.opp-block { padding: .6rem .75rem; margin-bottom: .5rem; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--border); border-left-width: 3px; }
.opp-block.opp-c1 { border-left-color: #1e3f72; }
.opp-block.opp-c2 { border-left-color: #65a6c9; }
.opp-block.opp-c3 { border-left-color: #9a3d7c; }
.opp-block.opp-c4 { border-left-color: #16a34a; }
.opp-block h5 { font-size: .85rem; margin: 0 0 .3rem; display: flex; align-items: center; gap: .4rem; }
.opp-block h5 .score { margin-left: auto; }
.opp-why, .opp-what { font-size: .85rem; margin-bottom: .25rem; line-height: 1.45; }
.opp-why { color: var(--muted); }
.kw-list { display: inline; }
.kw { display: inline-block; padding: 1px 6px; margin: 0 2px 2px 0; border-radius: 3px; background: var(--tag-bg); color: var(--tag-fg); font-size: .75rem; font-family: ui-monospace, monospace; }
.opp-override { font-size: .8rem; color: var(--fg); margin-top: .5rem; padding-top: .5rem; border-top: 1px dashed var(--border); }
.col-booth { text-align: center; font-size: .8rem; }
.booth-cell { display: inline-flex; flex-direction: column; line-height: 1.1; align-items: center; }
.booth-hall { font-weight: 700; color: var(--primary); font-size: .85rem; }
.booth-num { font-size: .7rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.booth-cell-empty { color: var(--gray-tag); font-size: .8rem; }

.col-map { text-align: center; }
.map-btn { display: inline-block; text-decoration: none; font-size: 1.05rem; padding: 2px 6px; border-radius: var(--radius); transition: background .15s; }
.map-btn:hover { background: var(--tag-bg); }
.map-btn-empty { color: var(--gray-tag); font-size: .8rem; }

/* exhibitors search + pickers */
.exh-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 1rem 0 .5rem; }
.exh-controls input[type="search"] { flex: 1 1 16rem; min-width: 12rem; padding: .4rem .7rem; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg); color: var(--fg); font: inherit; font-size: .9rem; }
.exh-controls input[type="search"]:focus { outline: none; border-color: var(--primary); }
.exh-controls select { padding: .4rem .5rem; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg); color: var(--fg); font: inherit; font-size: .85rem; }
.exh-controls button#exh-clear { font: inherit; cursor: pointer; padding: .4rem .8rem; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg); color: var(--fg); font-size: .85rem; }
.exh-controls button#exh-clear:hover { background: var(--row-hover); border-color: var(--primary); }
.exh-count { margin-left: auto; font-size: .85rem; color: var(--muted); font-variant-numeric: tabular-nums; }

/* category filter chips */
.filter-bar { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1rem 0 1.25rem; }
.fchip { font: inherit; cursor: pointer; border: 1px solid var(--border); background: var(--bg); color: var(--fg); padding: .4rem .8rem; border-radius: var(--radius); display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; transition: background .15s, border-color .15s; }
.fchip:hover { background: var(--row-hover); border-color: var(--primary); }
.fchip.is-active { background: var(--primary); color: #fff; border-color: var(--primary); }
.fchip.is-active b { color: #fff; }
.fchip b { color: var(--primary); font-weight: 700; }
.fchip-n { background: rgba(0,0,0,.08); padding: 1px 6px; border-radius: 10px; font-size: .75rem; font-variant-numeric: tabular-nums; }
.fchip.is-active .fchip-n { background: rgba(255,255,255,.25); }
.cat-desc { background: var(--gray); padding: .75rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; }
.cat-desc h3 { margin: 0 0 .25rem; font-size: 1rem; }
.cat-desc p { margin: 0; font-size: .9rem; color: var(--muted); }
.col-score { text-align: right; }
.ex-body { padding: .75rem 1.25rem 1.25rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; background: var(--gray); }
.ex-col p { font-size: .9rem; margin-bottom: .5rem; }
.ex-col .ex-meta { font-size: .8rem; color: var(--muted); margin-bottom: .25rem; }

/* pills + score */
.pill { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: .7rem; background: var(--tag-bg); color: var(--tag-fg); margin-right: 4px; white-space: nowrap; }
.pill-cat { background: var(--tag-bg); color: var(--tag-fg); font-weight: 600; }
.pill-src { background: var(--gray-tag-bg); color: var(--gray-tag); font-size: .65rem; }
.pill-tt { background: var(--green-bg); color: var(--green); font-weight: 600; }
.score { display: inline-block; min-width: 2.1rem; padding: 3px 8px; border-radius: var(--radius); font-weight: 700; font-size: .85rem; text-align: center; }
.score-high { background: var(--green-bg); color: var(--green); }
.score-mid { background: var(--yellow-bg); color: var(--yellow); }
.score-low { background: var(--red-bg); color: var(--red); }
.score-weak { background: var(--gray-tag-bg); color: var(--gray-tag); }
.sc-chip { display: inline-block; font-size: .75rem; color: var(--muted); padding: 2px 8px; margin-right: 4px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); }

/* top-prospects table */
.top-table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; font-size: .9rem; }
.top-table th, .top-table td { text-align: left; padding: .5rem .75rem; border-bottom: 1px solid var(--border); }
.top-table th { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; background: var(--gray); }
.top-table tr:hover { background: var(--row-hover); }

/* prospect focus block */
.prospect { padding: 1rem 1.25rem; margin-bottom: 1rem; border: 1px solid var(--border); border-left: 3px solid var(--primary); border-radius: var(--radius); background: var(--bg); }
.prospect h3 { margin-top: 0; display: flex; align-items: center; gap: .5rem; }
.prospect h4 { margin-top: .75rem; }
.prospect .meta { color: var(--muted); font-size: .85rem; margin-bottom: .5rem; }

/* shared.css owns the nav + toggle styling (.site-nav, .nav-btn, .lang-btn,
   .nav-flag, active-link colour). Only carry overrides this deliverable needs. */

/* shared.css wraps [data-lang] content with display:block, which breaks
   in-sentence usage. Keep span pairs inline. */
html.lang-cs span[data-lang="cs"] { display: inline; }
html.lang-en span[data-lang="en"] { display: inline; }

/* halls page */
.hall-tabs { display: flex; gap: .3rem; margin: 1rem 0 .5rem; border-bottom: 1px solid var(--border); }
.htab { font: inherit; cursor: pointer; border: 1px solid var(--border); border-bottom: none; background: var(--gray); color: var(--fg); padding: .4rem 1rem; border-radius: var(--radius) var(--radius) 0 0; font-weight: 600; }
.htab:hover { background: var(--row-hover); }
.htab.is-active { background: var(--primary); color: #fff; border-color: var(--primary); }

.map-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; margin: .75rem 0; }
.route-controls { display: flex; align-items: center; gap: .5rem; font-size: .9rem; }
.route-controls input[type="number"] { width: 4rem; padding: .3rem; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg); color: var(--fg); }
.btn-primary, .btn-secondary { font: inherit; cursor: pointer; padding: .4rem .9rem; border-radius: var(--radius); border: 1px solid var(--primary); font-weight: 600; font-size: .85rem; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--accent); }
.btn-secondary { background: var(--bg); color: var(--primary); }
.btn-secondary:hover { background: var(--row-hover); }
#route-meta { color: var(--muted); font-size: .85rem; }

.cat-legend { display: flex; flex-wrap: wrap; gap: 1rem; margin: .5rem 0 1rem; font-size: .85rem; }
.cat-legend-item { display: inline-flex; align-items: center; gap: .3rem; color: var(--muted); }
.cat-legend-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--border); }

.hall-wrap { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-top: 1rem; }
@media (min-width: 900px) {
  .hall-wrap.has-panel { grid-template-columns: minmax(280px, 22rem) minmax(0, 1fr); }
}
.hall-svg-host { background: var(--gray); border-radius: var(--radius); overflow: hidden; min-height: 400px; }
.hall-svg-host svg { display: block; }
.hall-svg-host [rid].vuts-target polygon.booth { stroke: var(--primary); stroke-width: 8; }

.booth-panel { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; position: relative; font-size: .9rem; max-height: 75vh; overflow-y: auto; }
.booth-panel h3 { font-size: 1.1rem; margin-bottom: .3rem; }
.booth-panel h4 { margin-top: 1rem; }
.panel-meta { color: var(--muted); font-size: .85rem; margin-bottom: .5rem; }
.panel-profile { font-size: .85rem; }
.panel-close { position: absolute; top: .25rem; right: .5rem; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--muted); line-height: 1; }
.panel-close:hover { color: var(--fg); }

.route-list { background: var(--gray); padding: 1rem 1.25rem; border-radius: var(--radius); margin-top: 1rem; }
.route-list ol { margin-left: 1.25rem; }
.route-list li { padding: .35rem 0; border-bottom: 1px solid var(--border); display: grid; grid-template-columns: 1fr auto auto; gap: .5rem; align-items: center; font-size: .9rem; }
.route-booth { color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }

/* callouts */
.callout { padding: .75rem 1rem; border-radius: var(--radius); margin: 1rem 0; font-size: .9rem; }
.callout-warn { background: var(--yellow-bg); color: var(--yellow); border-left: 3px solid var(--yellow); }
.callout code { background: rgba(0,0,0,0.06); padding: 0 .25rem; border-radius: 3px; font-family: ui-monospace, monospace; }

/* md dump */
.md-dump pre { background: var(--gray); padding: 1rem 1.25rem; border-radius: var(--radius); overflow-x: auto; white-space: pre-wrap; font-family: ui-monospace, Menlo, monospace; font-size: .82rem; line-height: 1.55; }

/* map page */
.map-figure { margin: 1rem 0 2rem; text-align: center; background: var(--gray); padding: 1rem; border-radius: var(--radius); }
.map-img { max-width: 100%; height: auto; border-radius: var(--radius); background: #fff; }
.map-figure figcaption { font-size: .75rem; color: var(--muted); margin-top: .5rem; }

.hall-card { border-left: 4px solid var(--primary); border-right: 1px solid var(--border); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); border-radius: var(--radius); margin-bottom: .6rem; background: var(--bg); overflow: hidden; }
.hall-card summary { cursor: pointer; padding: .75rem 1rem; display: grid; grid-template-columns: 4rem 2fr 5rem 3fr; gap: .75rem; align-items: center; list-style: none; }
.hall-card summary::-webkit-details-marker { display: none; }
.hall-card[open] summary { background: var(--row-hover); }
.hall-card summary:hover { background: var(--row-hover); }
.hall-tag { color: #fff; font-weight: 700; padding: .25rem .6rem; border-radius: var(--radius); text-align: center; font-size: .9rem; }
.hall-theme { font-size: .9rem; }
.hall-count { font-size: 1.25rem; font-weight: 700; text-align: right; color: var(--primary); }
.hall-chips { font-size: .75rem; text-align: right; }
.hall-body { padding: .5rem 1rem 1rem; background: var(--gray); }

.cat-chip { display: inline-block; padding: 2px 7px; margin-left: 4px; border-radius: 12px; font-weight: 600; background: var(--tag-bg); color: var(--tag-fg); }
.cat-chip-empty { background: var(--gray-tag-bg); color: var(--gray-tag); font-weight: 400; }

.legend { list-style: none; padding: 0; }
.legend li { padding: .35rem 0; font-size: .9rem; display: flex; align-items: center; gap: .5rem; }
.hall-dot { display: inline-block; width: 14px; height: 14px; border-radius: 3px; }

/* responsive */
@media (max-width: 1100px) {
  .ex-header, .ex-row summary { grid-template-columns: 2.5rem 2fr 1.2fr 4rem 2rem 2rem 2rem 2rem 2.5rem 1.75rem; gap: .3rem; }
}
@media (max-width: 800px) {
  .ex-header, .ex-row summary { grid-template-columns: 2rem 2fr 3.5rem 2.5rem 1.75rem; }
  .col-c, .col-loc { display: none; }
  .ex-body { grid-template-columns: 1fr; }
}

/* ── Mobile tuning (phones) ────────────────────────────────────────── */
@media (max-width: 640px) {
  /* Nav: let logo take its own line so links + buttons get the full
     width below. Keeps all items reachable without a hamburger. */
  .site-nav { flex-wrap: wrap; row-gap: .25rem; padding: .4rem .6rem; }
  .site-nav .logo { flex: 1 0 100%; margin-right: 0; font-size: .85rem; line-height: 1.2; }
  .site-nav > a:not(.logo) { flex: 0 1 auto; font-size: .8rem; padding: .35rem .5rem; }
  .site-nav .spacer { display: none; }
  .site-nav .nav-btn { font-size: .75rem; padding: .2rem .4rem; }
  /* Theme toggle hidden on phones — non-essential, saves row space. */
  .site-nav .theme-btn { display: none; }

  /* Page padding tighter on phones. */
  .page { padding: 1rem .85rem 3rem; }
  .page h1 { font-size: 1.5rem; }

  /* Hall controls: stack so the route planner doesn't squeeze into
     two cramped columns. */
  .map-controls { flex-direction: column; align-items: stretch; gap: .6rem; }
  .route-controls { flex-wrap: wrap; }
  .hall-tabs { overflow-x: auto; flex-wrap: nowrap; }
  .htab { flex: 0 0 auto; }

  /* Exhibitors controls — stack search + selects cleanly. */
  .exh-controls { gap: .4rem; }
  .exh-controls input[type="search"] { flex: 1 1 100%; }
  .exh-count { margin-left: 0; flex: 1 1 100%; text-align: right; }

  /* Larger tap target on chip buttons + nav items. */
  .fchip, .htab, .btn-primary, .btn-secondary, .site-nav .nav-btn { min-height: 2.2rem; }

  /* Floor plan: push booth-panel below the SVG with a visual break. */
  .hall-svg-host { min-height: 70vh; }
  .booth-panel { max-height: none; }

  /* Hall cards on map page collapse the stat column grid. */
  .hall-card summary { grid-template-columns: 3rem 1fr 3rem; }
  .hall-card summary .hall-chips { display: none; }
}
