/* Lage-Exposé (web/lage-expose/, expose.js) on top of kiez.css: the form, the choices, the previews. */
body.xp main { max-width: 1240px; }
body.xp main > h1, body.xp main > .sub, body.xp main > .crumbs, body.xp .xp-seo { max-width: 820px; }
.xp-seo { margin-top: 12px; }
.xp-list { padding-left: 1.2em; } .xp-list li { margin: 0 0 6px; }
.xp-seo code { font-size: .88em; background: var(--face); border: 1px solid var(--rule); padding: 0 4px; overflow-wrap: anywhere; }

/* the form: one line on wide screens */
.xp-form { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr) auto; gap: 12px 14px; align-items: end; margin-top: 18px; }
.xp-field { display: grid; gap: 4px; font-weight: 700; font-size: .95rem; }
.xp-field small { font-weight: 400; }
.xp-field input { font: 400 1.05rem/1.2 "Sofia Sans", system-ui, sans-serif; color: var(--ink); background: #fff; border: 1.5px solid rgb(18 18 18 / .35);
  border-radius: 2px; padding: 12px 12px; min-height: 48px; width: 100%; }
.xp-field input:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-tint); }
.xp-go { font: 800 1.05rem/1 "Sofia Sans", system-ui, sans-serif; color: #121212; background: var(--orange); border: 0; border-radius: 2px;
  padding: 0 20px; min-height: 48px; cursor: pointer; white-space: nowrap; }
.xp-go:hover { background: #e84a0c; } .xp-go:focus-visible, .btn:focus-visible, .xp-tabs button:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }
.xp-go:disabled { opacity: .6; cursor: progress; }
.btn { font: 700 .95rem/1 "Sofia Sans", system-ui, sans-serif; color: var(--ink); background: #fff; border: 1.5px solid var(--ink); border-radius: 2px;
  padding: 0 14px; min-height: 40px; cursor: pointer; }
.btn:hover { background: var(--violet-tint); }
.btn-sm { min-height: 34px; padding: 0 10px; font-size: .88rem; }
.xp-status { grid-column: 1 / -1; margin: 0; min-height: 1.6em; }
.xp-status:empty { display: none; }
.xp-status.err { color: #c0331f; font-weight: 700; }

/* the result: choices left, previews right */
.xp-result { display: none; grid-template-columns: 320px minmax(0, 1fr); gap: 22px; align-items: start; margin: 8px 0 30px; scroll-margin-top: 12px; }
body.xp-has .xp-result { display: grid; }
.xp-side { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; background: var(--face); border: 1px solid var(--rule); padding: 14px 14px 6px; }
.xp-side h2 { margin: 0 0 10px; }
.xp-cat { border-top: 1px solid var(--rule); padding: 8px 0; }
.xp-cat-head { display: grid; grid-template-columns: 22px 1fr; gap: 8px; align-items: start; cursor: pointer; }
.xp-cat-head b { display: block; line-height: 1.25; border-left: 4px solid var(--rule); padding-left: 8px; margin-left: -2px; }
.xp-cat.on .xp-cat-head b { border-left-color: var(--rule-c); }
.xp-cat-head small { display: block; font-size: .82rem; line-height: 1.3; padding-left: 10px; margin-top: 2px; }
.xp-cat input, .xp-pt input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--violet); }
.xp-cat:not(.on) .xp-cat-head b { text-decoration: line-through; text-decoration-thickness: 1.5px; }
.xp-cat details { margin: 6px 0 0 30px; }
.xp-cat summary { cursor: pointer; font-size: .85rem; font-weight: 600; }
.xp-cat:not(.on) details { opacity: .55; }
.xp-pts { display: grid; gap: 2px; padding: 6px 0 4px; }
.xp-pt { display: grid; grid-template-columns: 20px 1fr auto; gap: 6px; align-items: start; font-size: .88rem; line-height: 1.3; cursor: pointer; }
.xp-pt.none { cursor: default; } .xp-pt.none span { text-decoration: line-through; } .xp-pt small { font-size: .78rem; }

.xp-tabs { display: inline-grid; grid-auto-flow: column; border: 1.5px solid var(--ink); border-radius: 2px; overflow: hidden; margin: 0 0 12px; }
.xp-tabs button { font: 700 .98rem/1 "Sofia Sans", system-ui, sans-serif; border: 0; background: #fff; color: var(--ink); padding: 0 16px; min-height: 42px; cursor: pointer; }
.xp-tabs button + button { border-left: 1.5px solid var(--ink); }
.xp-tabs button[aria-selected="true"] { background: var(--violet); color: #fff; }
.xp-acts { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 12px; }
.xp-acts span { font-size: .9rem; }
.xp-slides { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.xp-slides figure { margin: 0; background: var(--face); border: 1px solid var(--rule); }
.xp-slides img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; background: #fff; }
.xp-slides figcaption { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; font-weight: 700; font-size: .92rem; }
.xp-page { display: block; width: min(100%, 720px); height: auto; aspect-ratio: 2480 / 3508; background: #fff; border: 1px solid var(--rule); box-shadow: 0 16px 34px -18px rgb(18 18 18 / .42); }
.xp-out[aria-busy="true"] .xp-slides, .xp-out[aria-busy="true"] .xp-page { opacity: .55; transition: opacity .2s; }
.xp-empty { font-weight: 700; }
.xp-text { margin-top: 22px; background: var(--face); border: 1px solid var(--rule); padding: 14px; }
.xp-text h3 { margin: 0 0 8px; }
.xp-text textarea { width: 100%; font: 400 1rem/1.5 "Sofia Sans", system-ui, sans-serif; color: var(--ink); border: 1.5px solid rgb(18 18 18 / .35); border-radius: 2px; padding: 10px; resize: vertical; margin: 0 0 10px; }

/* the print: only the one-pager, edge to edge on A4 */
.xp-print { display: none; }
@media print {
  @page { size: A4 portrait; margin: 0; }
  body.xp > *:not(.xp-print) { display: none !important; }
  body.xp, html { background: #fff !important; }
  .xp-print { display: block !important; }
  .xp-print img { display: block; width: 210mm; height: 297mm; }
}

@media (max-width: 960px) {
  .xp-result { grid-template-columns: minmax(0, 1fr); }
  .xp-side { position: static; max-height: none; }
}
@media (max-width: 720px) {
  .xp-form { grid-template-columns: minmax(0, 1fr); }
  .xp-go { width: 100%; }
  .xp-slides { grid-template-columns: minmax(0, 1fr); }
  .bar nav a { margin-left: 0; margin-right: 14px; white-space: nowrap; display: inline-block; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* the worked example: three gallery pictures and the one-pager, then the location text */
.xp-ex { list-style: none; padding: 0; margin: 12px 0 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.xp-ex figure { margin: 0; background: var(--face); border: 1px solid var(--rule); }
.xp-ex img { display: block; width: 100%; height: auto; }
.xp-ex li:last-child img { max-height: 340px; width: auto; margin: 0 auto; }
.xp-ex figcaption { padding: 6px 10px; font-weight: 700; font-size: .9rem; }
.xp-quote { margin: 8px 0 12px; padding: 12px 16px; border-left: 4px solid var(--orange); background: var(--face); }
.xp-quote p { margin: 0; }
@media (max-width: 720px) { .xp-ex { grid-template-columns: minmax(0, 1fr); } .xp-ex li:last-child img { max-height: none; width: 100%; } }

/* the full-size preview */
.xp-zoom { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.xp-zoom:focus-visible { outline: 3px solid var(--violet); outline-offset: -3px; }
.xp-page { cursor: zoom-in; }
.xp-view { width: min(96vw, 1500px); max-height: 96vh; padding: 0; border: 0; border-radius: 2px; background: #121212; color: #fff; overflow: hidden; }
.xp-view::backdrop { background: rgb(10 10 12 / .82); }
.xp-view-bar { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; }
.xp-view-bar b { font-size: 1.05rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xp-view-bar span { color: rgb(255 255 255 / .7); font-variant-numeric: tabular-nums; margin-right: auto; white-space: nowrap; }
.xp-view .xp-go { min-height: 40px; }
.xp-view-x { min-width: 40px; font-size: 1.5rem; padding: 0; background: transparent; color: #fff; border-color: rgb(255 255 255 / .5); }
.xp-view-x:hover { background: rgb(255 255 255 / .12); }
.xp-view-stage { position: relative; display: grid; place-items: center; padding: 0 12px 12px; }
.xp-view-stage img { display: block; max-width: 100%; max-height: calc(96vh - 76px); width: auto; height: auto; background: #fff; user-select: none; -webkit-user-drag: none; }
.xp-view-nav { position: absolute; top: 50%; translate: 0 -50%; width: 48px; height: 64px; border: 0; border-radius: 2px; background: rgb(18 18 18 / .72); color: #fff;
  font: 400 2.4rem/1 "Sofia Sans", system-ui, sans-serif; cursor: pointer; }
.xp-view-nav:hover { background: var(--violet); }
.xp-view-nav:focus-visible, .xp-view-x:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }
.xp-view-nav.prev { left: 18px; } .xp-view-nav.next { right: 18px; }
@media (max-width: 720px) {
  .xp-view { width: 100vw; max-width: 100vw; max-height: 100dvh; }
  .xp-view-bar { flex-wrap: wrap; gap: 8px 10px; } .xp-view-bar b { flex: 1 1 100%; order: -1; }
  .xp-view .xp-go { width: auto; flex: 1 1 auto; } .xp-view-bar span { margin-right: 0; }
  .xp-view-nav { width: 38px; height: 52px; font-size: 2rem; } .xp-view-nav.prev { left: 14px; } .xp-view-nav.next { right: 14px; }
}

/* the other cities under the lead (Berlin page) */
body.xp main > .xp-cities { max-width: 820px; margin: -2px 0 0; font-weight: 600; }

/* the guides (lagebeschreibung/, expose-erstellen/): one address field that opens the Lage-Exposé */
.xp-jump { grid-template-columns: minmax(0, 1fr) auto; }
.xp-jump .xp-cities { grid-column: 1 / -1; margin: 0; font-size: .95rem; }
body.xp-guide main { max-width: 860px; }
@media (max-width: 720px) { .xp-jump { grid-template-columns: minmax(0, 1fr); } }
