/* Tennis Schweiz Web-App: Hilfe, Rundgang, Home-Bildschirm, «Neu», Teilen und Mitmachen (ts-plus, ab 10.29). Gehört zu ts-plus.js. */

/* Hilfe-Knopf im Kopf */
.tsp-hilfe-knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line, #BFC3CC);
  border-radius: 50%;
  background: #fff;
  color: var(--navy, #0F1526);
  font: 700 16px/1 var(--sans, system-ui, sans-serif);
  cursor: pointer;
}
.tsp-hilfe-knopf:hover { border-color: var(--navy, #0F1526); }
.tsp-hilfe-knopf:focus-visible,
.tsp-textknopf:focus-visible,
.tsp-reakt:focus-visible,
.tsp-wahl:focus-visible,
.tsp-dlg-nav button:focus-visible,
.tsp-dlg-zu:focus-visible,
.tsp-faq summary:focus-visible,
.tsp-home-andere summary:focus-visible { outline: 2px solid var(--navy, #0F1526); outline-offset: 2px; }

.tsp-textknopf {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  color: var(--navy, #0F1526);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  cursor: pointer;
}
.tsp-klein { margin: 6px 0 0; font-size: 13px; line-height: 1.45; color: var(--sec, #4A5060); }

/* Hilfe und Anleitung */
body.tsp-offen { overflow: hidden; }
.tsp-dlg { position: fixed; inset: 0; z-index: 95; display: flex; align-items: flex-end; justify-content: center; }
.tsp-dlg[hidden] { display: none; }
.tsp-dlg-hg { position: absolute; inset: 0; background: rgba(15, 21, 38, .55); opacity: 0; transition: opacity .2s ease; }
.tsp-dlg.ist-an .tsp-dlg-hg { opacity: 1; }
.tsp-dlg-box {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 640px;
  max-height: min(90vh, 880px);
  overflow: hidden;
  border-radius: 22px 22px 0 0;
  background: #fff;
  color: var(--navy, #0F1526);
  box-shadow: 0 -12px 40px rgba(15, 21, 38, .28);
  transform: translateY(28px);
  opacity: 0;
  transition: transform .25s ease, opacity .2s ease;
}
.tsp-dlg.ist-an .tsp-dlg-box { transform: none; opacity: 1; }
@media (min-width: 720px) {
  .tsp-dlg { align-items: center; padding: 24px; }
  .tsp-dlg-box { border-radius: 22px; }
}
.tsp-dlg-kopf { display: flex; flex: 0 0 auto; align-items: flex-start; gap: 14px; padding: 20px 20px 6px; }
.tsp-dlg-kopf > div { flex: 1 1 auto; min-width: 0; }
.tsp-dlg-kopf h2 { margin: 0; font: 400 25px/1.2 var(--serif, Georgia, serif); }
.tsp-dlg-kopf p { margin: 4px 0 0; font-size: 14px; color: var(--sec, #4A5060); }
.tsp-dlg-zu {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--field, #F2F3F5);
  color: var(--navy, #0F1526);
  cursor: pointer;
}
.tsp-dlg-zu svg { stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; }
.tsp-dlg-nav { display: flex; flex: 0 0 auto; gap: 8px; overflow-x: auto; padding: 10px 20px 12px; scrollbar-width: none; }
.tsp-dlg-nav::-webkit-scrollbar { display: none; }
.tsp-dlg-nav button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 6px 14px;
  border: 1px solid var(--hs-linie, #E2E0D8);
  border-radius: 999px;
  background: #fff;
  color: var(--navy, #0F1526);
  font: 600 13px/1 var(--sans, system-ui, sans-serif);
  cursor: pointer;
}
.tsp-dlg-nav button:hover { border-color: var(--navy, #0F1526); }
.tsp-dlg-inhalt { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 0 20px calc(28px + env(safe-area-inset-bottom)); }
.tsp-dlg-inhalt h3 { margin: 22px 0 10px; font: 400 21px/1.25 var(--serif, Georgia, serif); scroll-margin-top: 8px; }
.tsp-dlg-inhalt h3:first-child { margin-top: 8px; }
.tsp-dlg-inhalt p { margin: 0 0 10px; font-size: 15px; line-height: 1.5; }
.tsp-dlg-fuss { margin-top: 22px !important; }

.tsp-schritte { counter-reset: tsp; list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.tsp-schritte li {
  counter-increment: tsp;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 0 0 40px;
  font-size: 15px;
  line-height: 1.45;
}
.tsp-schritte li::before {
  content: counter(tsp);
  position: absolute;
  left: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--navy, #0F1526);
  color: #fff;
  font: 700 13px/1 var(--sans, system-ui, sans-serif);
}
.tsp-schritte li span { color: var(--sec, #4A5060); }
.tsp-schritte .tsp-textknopf { align-self: flex-start; margin-top: 2px; font-size: 14px; }

.tsp-home-lead { color: var(--navy, #0F1526); }
.tsp-home-geraet { margin: 12px 0 6px !important; font-weight: 700; font-size: 14px !important; }
.tsp-home-liste { margin: 0; padding: 0 0 0 20px; font-size: 15px; line-height: 1.5; }
.tsp-home-liste li { margin: 0 0 4px; }
.tsp-home-knopf { margin: 12px 0 0 !important; }
.tsp-home-schon { padding: 12px 14px; border-radius: 14px; background: var(--hs-creme, #F3F1EA); }
.tsp-home-andere, .tsp-faq details {
  margin: 10px 0 0;
  border: 1px solid var(--hs-linie, #E2E0D8);
  border-radius: 14px;
  background: #fff;
}
.tsp-home-andere > summary, .tsp-faq summary {
  position: relative;
  padding: 12px 44px 12px 14px;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.35;
  cursor: pointer;
  list-style: none;
}
.tsp-home-andere > summary::-webkit-details-marker, .tsp-faq summary::-webkit-details-marker { display: none; }
.tsp-home-andere > summary::after, .tsp-faq summary::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 18px;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--navy, #0F1526);
  border-bottom: 2px solid var(--navy, #0F1526);
  transform: translateY(-70%) rotate(45deg);
}
.tsp-home-andere[open] > summary::after, .tsp-faq details[open] summary::after { transform: translateY(-25%) rotate(-135deg); }
.tsp-home-andere > :not(summary), .tsp-faq details > p { margin: 0 14px 12px !important; }
.tsp-faq details > p { color: var(--sec, #4A5060); }
.tsp-faq a, .tsp-dlg-inhalt .tsp-klein a { color: var(--navy, #0F1526); font-weight: 600; }

/* Rundgang */
.tsp-tour { position: fixed; inset: 0; z-index: 96; }
.tsp-tour-hg { position: absolute; inset: 0; background: rgba(15, 21, 38, .62); }
.tsp-tour-hg[hidden], .tsp-spot[hidden] { display: none; }
.tsp-spot {
  position: fixed;
  border-radius: 14px;
  box-shadow: 0 0 0 9999px rgba(15, 21, 38, .62);
  pointer-events: none;
  transition: left .25s ease, top .25s ease, width .25s ease, height .25s ease;
}
.tsp-karte {
  position: fixed;
  width: min(360px, calc(100vw - 32px));
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  padding: 18px 18px 14px;
  border-radius: 18px;
  background: #fff;
  color: var(--navy, #0F1526);
  box-shadow: 0 20px 60px rgba(15, 21, 38, .35);
  outline: none;
}
.tsp-karte.ist-mitte { left: 50% !important; top: 50% !important; transform: translate(-50%, -50%); }
.tsp-karte-schritt { margin: 0 0 4px; font-size: 12px; font-weight: 600; color: var(--sec, #4A5060); }
.tsp-karte-h { margin: 0 0 6px; font: 400 22px/1.2 var(--serif, Georgia, serif); }
.tsp-karte-t { margin: 0 0 10px; font-size: 15px; line-height: 1.5; color: var(--sec, #4A5060); }
.tsp-karte .tsp-home-lead { font-size: 15px; margin: 0 0 6px; }
.tsp-karte-fuss { display: flex; align-items: center; justify-content: flex-end; gap: 14px; margin-top: 12px; }
.tsp-karte-fuss .tsp-textknopf { font-size: 14px; }
.tsp-karte-luecke { flex: 1 1 auto; }

/* Neu seit dem letzten Besuch */
.tsp-neu {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--red, #FF0000);
  color: #fff;
  font: 700 11px/1.45 var(--sans, system-ui, sans-serif);
  vertical-align: middle;
  position: relative;
  top: -2px;
}
.tsp-neu-leiste {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 0 0 14px;
  padding: 10px 14px;
  border-radius: var(--hs-radius, 14px);
  background: var(--hs-creme, #F3F1EA);
  font-size: 14px;
}
.tsp-hat-punkt { position: relative; }
.tsp-punkt {
  position: absolute;
  top: 4px;
  right: calc(50% - 20px);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--red, #FF0000);
  box-shadow: 0 0 0 2px #fff;
}
.site-nav .tsp-punkt { top: 2px; right: -6px; }

/* Applaus, Teilen, Daumen drücken */
.tsp-aktionen { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }
.tsp-aktionen-karte { margin-top: 10px; }
.tsp-aktionen-zeile { margin-top: 6px; }
.tsp-reakt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 4px 13px 4px 11px;
  border: 1px solid var(--hs-linie, #E2E0D8);
  border-radius: 999px;
  background: #fff;
  color: var(--navy, #0F1526);
  font: 600 13px/1 var(--sans, system-ui, sans-serif);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.tsp-reakt[hidden] { display: none; }
.tsp-reakt:hover { border-color: var(--navy, #0F1526); }
.tsp-reakt[aria-pressed="true"] { border-color: var(--navy, #0F1526); background: var(--navy, #0F1526); color: #fff; }
.tsp-reakt-em { display: inline-flex; font-size: 15px; line-height: 1; }
.tsp-reakt-em svg { stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.tsp-reakt-n { font-variant-numeric: tabular-nums; }
.tsp-reakt-n:empty { display: none; }
.tsp-puls { animation: tsp-puls .45s ease; }
@keyframes tsp-puls { 0% { transform: scale(1); } 40% { transform: scale(1.1); } 100% { transform: scale(1); } }

/* Mitmachen */
.tsp-mit { scroll-margin-top: 80px; }
.tsp-ohne-server { display: none !important; }
.tsp-mit-karte { padding: 20px 18px; border-radius: 22px; background: var(--hs-creme, #F3F1EA); }
.tsp-mit-lead { margin: 0 0 14px; font: 400 19px/1.4 var(--serif, Georgia, serif); }
.tsp-umfrage { margin: 0 0 18px; padding: 16px; border-radius: 16px; background: #fff; }
.tsp-umfrage[hidden] { display: none; }
.tsp-umfrage-h { margin: 0 0 4px; font: 700 13px/1.3 var(--sans, system-ui, sans-serif); color: var(--sec, #4A5060); }
.tsp-umfrage-frage { margin: 0 0 12px; font: 400 20px/1.3 var(--serif, Georgia, serif); }
.tsp-umfrage-wahl { display: grid; gap: 8px; }
.tsp-wahl {
  min-height: 46px;
  padding: 10px 16px;
  border: 1px solid var(--line, #BFC3CC);
  border-radius: 14px;
  background: #fff;
  color: var(--navy, #0F1526);
  font: 600 15px/1.3 var(--sans, system-ui, sans-serif);
  text-align: left;
  cursor: pointer;
}
.tsp-wahl:hover { border-color: var(--navy, #0F1526); }
.tsp-wahl.ist-ich { border-color: var(--navy, #0F1526); box-shadow: inset 0 0 0 1px var(--navy, #0F1526); }
.tsp-wahl:disabled { opacity: .6; cursor: default; }
.tsp-umfrage-erg { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 12px; }
.tsp-umfrage-erg li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 12px; font-size: 15px; line-height: 1.35; }
.tsp-erg-p { font-weight: 700; font-variant-numeric: tabular-nums; }
.tsp-erg-balken { grid-column: 1 / -1; height: 8px; border-radius: 99px; background: var(--field, #F2F3F5); overflow: hidden; }
.tsp-erg-balken span { display: block; height: 100%; border-radius: 99px; background: var(--line, #BFC3CC); transition: width .6s ease; }
.tsp-umfrage-erg li.ist-ich .tsp-erg-balken span { background: var(--navy, #0F1526); }
.tsp-umfrage-erg li.ist-ich .tsp-erg-t { font-weight: 700; }
.tsp-wunsch-h { display: block; margin: 0 0 6px; font-weight: 700; font-size: 15px; }
.tsp-wunsch textarea {
  display: block;
  width: 100%;
  min-height: 92px;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid var(--line, #BFC3CC);
  border-radius: 14px;
  background: #fff;
  color: var(--navy, #0F1526);
  font: inherit;
  font-size: 16px;
  line-height: 1.45;
  resize: vertical;
}
.tsp-wunsch textarea:focus { outline: 2px solid var(--navy, #0F1526); outline-offset: 1px; }
.tsp-wunsch-fuss { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin: 10px 0 0; }
.tsp-wunsch-stand { font-size: 14px; }
.tsp-mit-links { list-style: none; margin: 14px 0 0; padding: 0; }
.tsp-mit-links li { margin: 0; }

/* Meldung als Toast */
.tsp-toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 97;
  max-width: calc(100vw - 32px);
  padding: 11px 18px;
  border-radius: 999px;
  background: var(--navy, #0F1526);
  color: #fff;
  font: 600 14px/1.3 var(--sans, system-ui, sans-serif);
  box-shadow: 0 8px 24px rgba(15, 21, 38, .3);
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition: transform .2s ease, opacity .2s ease;
}
.tsp-toast.ist-an { transform: translate(-50%, 0); opacity: 1; }
@media (max-width: 820px) { .tsp-toast { bottom: calc(86px + env(safe-area-inset-bottom)); } }

@media (prefers-reduced-motion: reduce) {
  .tsp-dlg-hg, .tsp-dlg-box, .tsp-spot, .tsp-toast, .tsp-erg-balken span, .tsp-reakt { transition: none; }
  .tsp-puls { animation: none; }
}
@media print {
  .tsp-hilfe-knopf, .tsp-aktionen, .tsp-mit, .tsp-neu-leiste, .tsp-toast, .tsp-tour, .tsp-dlg { display: none !important; }
}
