/* Bewertungsliste (reviews.js): Fenster wie Google-Bewertungen – Übersicht, Filter, einzelne Bewertungen */

/* Knopf im Karten-Popup: Sonnen · Schnitt · «12 reviews ›» */
.pp-rv { display: inline-flex; align-items: center; gap: 6px; padding: 2px 0; border: 0; background: none; cursor: pointer;
  font: inherit; color: var(--ink); text-align: left; }
.pp-rv b { font: 600 14px var(--f-mono); }
.pp-rv span:last-child { font: 13px var(--f-mono); color: var(--deep-water); text-decoration: underline; text-underline-offset: 3px; }
.pp-rv:hover span:last-child { color: var(--kite-text); }

.link-btn { border: 0; background: none; padding: 0; font: inherit; color: var(--deep-water); text-decoration: underline;
  text-underline-offset: 3px; cursor: pointer; }
.link-btn:hover { color: var(--kite-text); }

/* Fenster */
.rv-dlg { width: min(96vw, 680px); max-height: min(92vh, 900px); display: none; flex-direction: column; overflow: hidden; }
.rv-dlg[open] { display: flex; }
html.rv-open { overflow: hidden; }
.rv-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 18px 20px 12px;
  border-bottom: 1px solid var(--sand-line); background: var(--paper); }
.rv-head h2 { margin: 2px 0 0; font: 800 22px/1.15 var(--f-display); }
.rv-close { flex: 0 0 auto; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--sand-light); font-size: 26px;
  line-height: 1; cursor: pointer; color: var(--ink); }
.rv-close:hover { background: var(--sand); }
.rv-scroll { overflow-y: auto; overscroll-behavior: contain; padding: 0 20px 20px; }
.rv-note { margin: 16px 0; color: var(--ink-soft); }

/* Übersicht: Schnitt links, Verteilung rechts */
.rv-summary { display: grid; grid-template-columns: auto 1fr; gap: 8px 24px; align-items: center; padding: 16px 0; }
.rv-score { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 120px; }
.rv-avg { font: 800 48px/1 var(--f-display); }
.suns--lg svg { width: 20px; height: 20px; }
.rv-total { font: 13px var(--f-mono); color: var(--ink-soft); }
.rv-chill { font: 12px var(--f-mono); color: var(--deep-water); }
.rv-hist { display: flex; flex-direction: column; gap: 3px; }
.rv-bar { display: grid; grid-template-columns: 14px 1fr 28px; align-items: center; gap: 8px; width: 100%; min-height: 26px; padding: 0 6px;
  border: 0; border-radius: 13px; background: none; cursor: pointer; font: 13px var(--f-mono); color: var(--ink); }
.rv-bar:hover:not(:disabled), .rv-bar.is-on { background: var(--sand-light); }
.rv-bar.is-on { box-shadow: inset 0 0 0 2px var(--kite); }
.rv-bar:disabled { cursor: default; color: var(--sand-dark); }
.rv-bar-track { height: 10px; border-radius: 5px; background: var(--sand-light); overflow: hidden; }
.rv-bar-track span { display: block; height: 100%; border-radius: 5px; background: var(--kite); }
.rv-bar-c { text-align: right; color: var(--ink-soft); }
.rv-rate { grid-column: 1 / -1; }

/* Filter: Chips + Auswahlfelder, kleben beim Scrollen oben */
.rv-filters { position: sticky; top: 0; z-index: 2; display: flex; flex-direction: column; gap: 8px; padding: 10px 0;
  background: var(--paper); border-bottom: 1px solid var(--sand-line); }
.rv-filters:empty { display: none; }
.rv-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: -2px; }
.rv-chips::-webkit-scrollbar { display: none; }
.rv-chip { flex: 0 0 auto; min-height: 36px; padding: 0 14px; border: 1px solid var(--sand-dark); border-radius: 18px; background: var(--paper);
  font: 600 14px var(--f-display); color: var(--ink); cursor: pointer; white-space: nowrap; }
.rv-chip small { font: 12px var(--f-mono); color: var(--ink-soft); margin-left: 2px; }
.rv-chip:hover:not(:disabled) { background: var(--sand-light); }
.rv-chip.is-on { background: var(--ink); border-color: var(--ink); color: var(--salt); }
.rv-chip.is-on small { color: var(--sand); }
.rv-chip:disabled { opacity: .45; cursor: default; }
.rv-chip--tag { font-weight: 500; min-height: 32px; font-size: 13px; }
.rv-chip--tag.is-neg:not(.is-on) { border-color: #D9A08C; }
.rv-selects { display: flex; flex-wrap: wrap; gap: 8px 12px; }
.rv-selects label { display: flex; flex-direction: column; gap: 2px; font: 11px var(--f-mono); text-transform: uppercase; color: var(--deep-water); }
.rv-selects select { min-height: 40px; padding: 0 8px; border: 1px solid var(--sand-dark); border-radius: 6px; background: var(--paper);
  font: 14px var(--f-display); color: var(--ink); text-transform: none; }
.rv-count { margin: 12px 0 0; font: 13px var(--f-mono); color: var(--ink-soft); }
.rv-count .link-btn { margin-left: 8px; font-size: 13px; }

/* Einzelne Bewertungen */
.rv-list { list-style: none; margin: 0; padding: 0; transition: opacity .15s; }
.rv-list.is-loading { opacity: .45; }
.rv-item { display: flex; flex-direction: column; gap: 8px; padding: 18px 0; border-bottom: 1px solid var(--sand-line); }
.rv-empty { padding: 24px 0; color: var(--ink-soft); }
.rv-who { display: flex; align-items: center; gap: 10px; }
.rv-who > div { display: flex; flex-direction: column; }
.rv-ava { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.rv-ava--blank { display: grid; place-items: center; background: var(--deep-water); color: var(--salt); font: 700 17px var(--f-display); }
.rv-name { font-weight: 700; }
.rv-name a { color: var(--ink); }
.rv-sub { font: 12px var(--f-mono); color: var(--ink-soft); }
.rv-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font: 13px var(--f-mono); color: var(--ink-soft); }
.rv-tag { padding: 1px 8px; border-radius: 10px; background: var(--shallows); color: var(--ink); font-size: 12px; }
.rv-title { margin: 0; font: 700 17px var(--f-display); }
.rv-body { margin: 0; white-space: pre-line; line-height: 1.5; }
.rv-text--clamp { max-height: 7.5em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 60%, transparent);
  mask-image: linear-gradient(#000 60%, transparent); }
.rv-item.is-open .rv-text--clamp { max-height: none; -webkit-mask-image: none; mask-image: none; }
.rv-expand { align-self: flex-start; font-weight: 600; }
.rv-details { margin-top: 10px; padding: 10px 12px; border-radius: 8px; background: var(--sand-light); }
.rv-cats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rv-cats li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 14px; }
.rv-cat-l { font-weight: 600; }
.suns--xs { gap: 1px; }
.suns--xs svg { width: 13px; height: 13px; stroke-width: 2.2; }
.rv-cat-tags { display: flex; flex-wrap: wrap; gap: 4px; flex-basis: 100%; }
.rv-mini { padding: 1px 8px; border-radius: 10px; background: var(--paper); border: 1px solid var(--sand-line); font-size: 12px; }
.rv-mini.is-neg { border-color: #D9A08C; color: var(--kite-text); }
.rv-cat-note { flex-basis: 100%; color: var(--ink-soft); font-size: 14px; }
.rv-sub-h { margin: 12px 0 6px; font: 600 12px var(--f-mono); text-transform: uppercase; color: var(--deep-water); }
.rv-line { margin: 0; font-size: 14px; }
.rv-photos .media-grid { max-width: 100%; }
.rv-posted { font: 11px var(--f-mono); color: var(--sand-dark); }
.rv-more { padding: 16px 0 4px; text-align: center; }
.rv-more-btn { align-self: center; }

/* Handy: Fenster als Vollbild-Blatt */
@media (max-width: 640px) {
  .rv-dlg { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; margin: 0; }
  .rv-head { padding: 12px 16px 10px; }
  .rv-head h2 { font-size: 19px; }
  .rv-scroll { padding: 0 16px 24px; }
  .rv-summary { grid-template-columns: 1fr; }
  .rv-score { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; gap: 4px 10px; min-width: 0; }
  .rv-avg { font-size: 36px; }
  .rv-selects { display: grid; grid-template-columns: 1fr 1fr; }
  .rv-selects select { width: 100%; }
  .rv-filters { position: static; }   /* klebend wäre auf dem Handy ein Drittel des Bildschirms */
}

/* Details-Box im Karten-Popup (main.js detailsBlock): je Kategorie Sonnen, häufigste Stichworte, neueste Notizen */
.pp-details .dt-list li { display: block; }
.pp-details .dt-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pp-details .dt-chips { display: flex; flex-wrap: wrap; gap: 3px; margin: 3px 0 2px; }
.pp-details .dt-chip { padding: 0 7px; border: 1px solid var(--sand-line); border-radius: 9px; background: var(--paper);
  font-size: 11px; line-height: 18px; color: var(--ink); white-space: nowrap; }
.pp-details .dt-chip b { font: 500 10px var(--f-mono); color: var(--ink-soft); }
.pp-details .dt-chip.is-neg { border-color: #E8A58E; color: var(--kite-text); }
.pp-details .dt-chip.is-neg b { color: var(--kite-text); }
.pp-details .dt-notes { list-style: none; margin: 3px 0 4px; padding: 0 0 0 8px; border-left: 2px solid var(--sand-line);
  display: flex; flex-direction: column; gap: 4px; }
.pp-details .dt-notes li { font-size: 12px; line-height: 1.35; }
.pp-details .dt-notes q { quotes: '«' '»'; }
.pp-details .dt-notes span { display: block; font: 10px var(--f-mono); color: var(--ink-soft); }
.pp-details .dt-list { gap: 6px; }
/* Popup darf nicht höher als die Karte werden: Inhalt der Box scrollt selbst */
.pp-details .dt-body { max-height: min(300px, 45vh); overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; }

/* Details-Box: Instructors mit Name · Schnitt · Anzahl (Klick = Bewertungsliste gefiltert) */
.pp-details .dt-people li { display: block; }
.pp-details .dt-person { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; min-height: 32px;
  padding: 2px 6px; margin: 0 -6px; border: 0; border-radius: 6px; background: none; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.pp-details .dt-person .dt-l { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--sand-dark); }
.pp-details .dt-person:hover { background: var(--sand-light); }
.pp-details .dt-sub { margin: 6px 0 2px; font: 10px var(--f-mono); text-transform: uppercase; color: var(--ink-soft); }
.pp-details .dt-notes b { font-weight: 600; }
.rv-instr { font-size: 14px; }
.rv-instr b { font-weight: 700; }
