/*
  brainOASIS Google-Rezensionen, Baustein v1.1.0
  Stil: reviews.css  (Logik: reviews.js)

  Einbau:  <section class="bor" data-bo-reviews> ...statisches HTML aus renderStatic()... </section>
  Ohne JavaScript bleibt alles lesbar: Kopfzeile, volle Texte, Antworten, scrollbare Reihe.
  Mit JavaScript (Klasse .bor-js) wird daraus das Laufband (.is-marquee) bzw. bei
  reduzierter Bewegung die ruhige scrollbare Reihe (.is-scroll).
  Die Schrift NewBlack wird von der Seite geladen (Familie "NewBlack"), oder per
  --bor-font überschrieben. Keine externen Anfragen, keine Fremdschrift.

  Anpassbar über CSS-Variablen auf dem Host-Element:
  --bor-gutter  seitlicher Rand (Handy 1.25rem, Desktop clamp(2.5rem,6vw,6rem))
  --bor-max     Breite der Inhaltsspalte (1240px)
  --bor-lines   Zeilen vor "Mehr lesen" (5)
*/

.bor,
.bor *,
.bor *::before,
.bor *::after {
  box-sizing: border-box;
}

.bor {
  /* Marke (Brand Guidelines Jan 2026) */
  --bor-ink: #2D2D25;          /* Shadow */
  --bor-ink-soft: rgb(45 45 37 / .72);
  --bor-sand: #F0F0ED;         /* Soft sand */
  --bor-white: #FFFFFF;
  --bor-palm: #DADCC7;
  --bor-oasis: #81836B;
  --bor-desert: #EEE6C9;
  --bor-mirage: #B9C7C8;
  --bor-dunes: #CAC3BD;
  --bor-star: #FBBC04;         /* Google-Gelb, nur für die Sterne */

  --bor-gutter: 1.25rem;
  --bor-max: 1240px;
  --bor-edge: max(var(--bor-gutter), calc((100% - var(--bor-max)) / 2));
  --bor-gap: 1rem;
  --bor-radius: .75rem;
  --bor-fade: 1rem;
  --bor-lines: 5;

  --bor-ease: cubic-bezier(.23, 1, .32, 1);
  --bor-ease-drawer: cubic-bezier(.32, .72, 0, 1);

  display: block;
  position: relative;
  min-height: 24rem;           /* reserviert Platz, bevor die Daten da sind */
  color: var(--bor-ink);
  font-family: var(--bor-font, "NewBlack", system-ui, -apple-system, "Segoe UI", sans-serif);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
  text-align: left;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (min-width: 48em) {
  .bor { --bor-gutter: 2.5rem; --bor-gap: 1.5rem; --bor-fade: 2.5rem; }
}
@media (min-width: 64em) {
  .bor { --bor-gutter: clamp(2.5rem, 6vw, 6rem); --bor-fade: 4rem; }
}

.bor [hidden] { display: none !important; }
.bor button, .bor a { -webkit-tap-highlight-color: transparent; }

.bor-sr {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ------------------------------------------------------------------ Kopfzeile */

.bor-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .25rem 2rem;
  margin-inline: var(--bor-edge);
}

.bor-id {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem 1.5rem;
}

.bor-brand {
  display: inline-flex;
  align-items: center;
  gap: .625rem;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.2;
}

.bor-g {
  display: block;
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
}

.bor-score {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}

.bor-num {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
}

.bor-count {
  font-size: .9375rem;
  line-height: 1.3;
  color: var(--bor-ink-soft);
}

.bor-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
}

.bor-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--bor-ink);
  font-size: .9375rem;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .28em;
}

@media (hover: hover) and (pointer: fine) {
  .bor-link:hover { text-decoration-thickness: 2px; }
}

/* ------------------------------------------------------------------ Sterne */

.bor-stars {
  position: relative;
  display: inline-block;
  flex: none;
  line-height: 0;
  font-size: .9375rem;          /* Sterngröße = font-size */
}
.bor-stars--lg { font-size: 1.25rem; }
.bor-stars svg { display: block; width: calc(1em * 124 / 24); height: 1em; fill: currentColor; }
.bor-stars-base { color: var(--bor-palm); }
.bor-stars-fill {
  position: absolute;
  top: 0;
  left: 0;
  color: var(--bor-star);
  clip-path: inset(0 var(--bor-miss, 0%) 0 0);
}

/* ------------------------------------------------------------------ Band */

.bor-stage { margin-top: .5rem; }

.bor-viewport {
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 1rem var(--bor-edge) 2rem;   /* Platz für Schatten und Fokusring */
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--bor-edge);
  scrollbar-width: thin;
  scrollbar-color: var(--bor-oasis) transparent;
  container-type: inline-size;
}

/* Laufband: nur mit Skript und ohne reduzierte Bewegung */
.bor.is-marquee .bor-viewport {
  overflow: hidden;
  overflow: clip;
  padding-inline: 0;
  scroll-snap-type: none;
  touch-action: pan-y;
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--bor-fade), #000 calc(100% - var(--bor-fade)), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 var(--bor-fade), #000 calc(100% - var(--bor-fade)), transparent 100%);
}
.bor.is-dragging .bor-viewport { cursor: grabbing; }

.bor-track {
  display: flex;
  align-items: flex-start;
  gap: var(--bor-gap);
  width: max-content;
  margin: 0;
  padding: 0;
  list-style: none;
}
.bor-js .bor-track { align-items: stretch; }
.bor.is-marquee .bor-track { will-change: transform; }

.bor-slide {
  flex: none;
  scroll-snap-align: start;
  display: flex;
  /* Handy: eine Karte fast in voller Breite, die nächste schaut heraus. In der scrollbaren Reihe
     misst 100cqw nur den Inhalt zwischen den Rändern (2 x 1.25rem), im Laufband die ganze Breite. */
  width: min(var(--bor-w, 26rem), calc(100vw - 3.5rem));
  width: min(var(--bor-w, 26rem), calc(100cqw - 1rem));
  margin: 0;
  padding: 0;
}
.bor.is-marquee .bor-slide { width: min(var(--bor-w, 26rem), calc(100cqw - 3.5rem)); }

/* ------------------------------------------------------------------ Karte */

.bor-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 1.5rem;
  background: var(--bor-white);
  color: var(--bor-ink);
  border-radius: var(--bor-radius);
  box-shadow:
    0 1px 2px rgb(45 45 37 / .08),
    0 14px 28px -14px rgb(45 45 37 / .28);
}

.bor-top {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding-right: 2rem;           /* Platz für das G in der Ecke */
}

.bor-avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--bor-palm);
  color: var(--bor-ink);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1;
}
.bor-av-palm   { background: var(--bor-palm); }
.bor-av-desert { background: var(--bor-desert); }
.bor-av-mirage { background: var(--bor-mirage); }
.bor-av-dunes  { background: var(--bor-dunes); }

.bor-who { display: grid; gap: .125rem; min-width: 0; }
.bor-name {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.bor-meta time { white-space: nowrap; }
.bor-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 .5rem;
  font-size: .875rem;
  line-height: 1.3;
  color: var(--bor-ink-soft);
}

.bor-cg {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 1.25rem;
  height: 1.25rem;
}

.bor-text {
  margin: 1rem 0 0;
  font-size: 1rem;
  line-height: 1.55;
  text-wrap: pretty;
  hyphens: manual;
  overflow-wrap: break-word;
  white-space: pre-line;           /* ohne Skript bleiben die Absätze der Rezension sichtbar */
}
.bor-js .bor-text { white-space: normal; }
.bor-card.is-clamped .bor-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: var(--bor-lines);
  line-clamp: var(--bor-lines);
  overflow: hidden;
}

.bor-extra {
  margin-top: auto;
  padding-top: .75rem;
}

.bor-foot-l {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 .75rem;
}

.bor-tag {
  display: inline-block;
  margin: 0;
  padding: .1875rem .625rem;
  border-radius: 999px;
  background: var(--bor-desert);
  color: var(--bor-ink);
  font-size: .8125rem;
  font-weight: 500;
  line-height: 1.35;
}

.bor-card > .bor-tag { align-self: flex-start; margin-top: 1rem; }
.bor-card > .bor-reply { margin-top: 1rem; }
.bor-js .bor-reply-src { display: none; }

.bor-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 1rem;
}

.bor-tbtn {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  min-height: 2.75rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--bor-ink);
  font: inherit;
  font-size: .9375rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .28em;
  cursor: pointer;
  touch-action: manipulation;
}
.bor-tbtn--quiet {
  color: var(--bor-ink-soft);
  font-weight: 500;
  text-decoration: none;
}
.bor-tbtn svg {
  flex: none;
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@media (hover: hover) and (pointer: fine) {
  .bor-tbtn:hover { text-decoration-thickness: 2px; }
  .bor-tbtn--quiet:hover { color: var(--bor-ink); text-decoration: underline; }
}
.bor-tbtn:active { transform: scale(.97); transition: transform 100ms ease-out; }

/* ------------------------------------------------------------------ Steuerung */

.bor-controls {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: .5rem var(--bor-edge) 0;
}

.bor-btn {
  appearance: none;
  -webkit-appearance: none;
  display: inline-grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--bor-white);
  color: var(--bor-ink);
  box-shadow:
    0 1px 2px rgb(45 45 37 / .1),
    0 8px 16px -8px rgb(45 45 37 / .3);
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 100ms ease-out, background-color 160ms ease;
}
.bor-btn:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) {
  .bor-btn:hover { background: var(--bor-palm); }
}
.bor-btn svg {
  display: block;
  width: 1.5rem;
  height: 1.5rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.bor-btn .bor-ico-fill { fill: currentColor; stroke: none; }
.bor-btn .bor-ico-play { display: none; }
.bor-btn[data-state="paused"] .bor-ico-play { display: block; }
.bor-btn[data-state="paused"] .bor-ico-pause { display: none; }
.bor-btn--pause { margin-left: .5rem; }

/* ------------------------------------------------------------------ Fokus */

.bor :focus-visible {
  outline: 2px solid var(--bor-ink);
  outline-offset: 3px;
}
.bor-card:focus-visible { outline-offset: 2px; }
.bor .bor-card:focus { outline: none; }
.bor .bor-card:focus-visible { outline: 2px solid var(--bor-ink); }
.bor .is-clone .is-kfocus { outline: 2px solid var(--bor-ink); outline-offset: 2px; }
.bor .is-clone .bor-tbtn.is-kfocus { outline-offset: 3px; }

/* ------------------------------------------------------------------ Blatt (Mehr lesen) */

.bor-sheet {
  width: min(36rem, calc(100vw - 2rem));
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--bor-ink);
  overflow: visible;
  font: inherit;
}
.bor-sheet::backdrop {
  background: rgb(45 45 37 / .42);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 240ms ease-out;
}
.bor-sheet.is-in::backdrop { opacity: 1; }

.bor-sheet-panel {
  position: relative;
  max-height: calc(100dvh - 2rem);
  padding: 1.5rem 1.5rem 2rem;
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--bor-white);
  border-radius: 1rem;
  box-shadow:
    0 2px 4px rgb(45 45 37 / .1),
    0 32px 64px -24px rgb(45 45 37 / .5);
  opacity: 0;
  transform: translate(var(--bor-dx, 0px), var(--bor-dy, 0px)) scale(var(--bor-s, .94));
  transition:
    transform 240ms var(--bor-ease-drawer),
    opacity 160ms linear;
}
.bor-sheet.is-in .bor-sheet-panel {
  opacity: 1;
  transform: none;
  transition:
    transform 340ms var(--bor-ease-drawer),
    opacity 200ms linear;
}

.bor-sheet-close {
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  top: .5rem;
  right: .5rem;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--bor-ink);
  cursor: pointer;
  transition: transform 100ms ease-out, background-color 160ms ease;
}
.bor-sheet-close:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) {
  .bor-sheet-close:hover { background: var(--bor-sand); }
}
.bor-sheet-close svg {
  width: 1.5rem; height: 1.5rem;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round;
}
.bor-sheet .bor-top { padding-right: 3.25rem; }

.bor-sheet-text {
  margin: 1.25rem 0 0;
  font-size: 1.0625rem;
  line-height: 1.6;
  white-space: pre-line;          /* Absätze der Originalrezension bleiben erhalten */
  text-wrap: pretty;
  hyphens: manual;
  overflow-wrap: break-word;
}
.bor-sheet .bor-tag { margin-top: 1rem; }
.bor-sheet .bor-tag[hidden] { display: none; }

.bor-reply {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  background: var(--bor-sand);
  border-radius: .5rem;
}
.bor-reply-h {
  margin: 0 0 .25rem;
  font-size: .9375rem;
  font-weight: 600;
  line-height: 1.3;
}
.bor-reply-t {
  margin: 0;
  font-size: 1rem;
  line-height: 1.55;
  white-space: pre-line;
}

/* ------------------------------------------------------------------ Ruhige Variante (reduzierte Bewegung) */

.bor.is-scroll .bor-btn--pause { display: none; }

/* ------------------------------------------------------------------ Systemeinstellungen */

@media (prefers-reduced-motion: reduce) {
  .bor-btn,
  .bor-tbtn,
  .bor-sheet-close { transition: background-color 120ms linear; }
  .bor-btn:active,
  .bor-tbtn:active,
  .bor-sheet-close:active { transform: none; }
  .bor-sheet-panel,
  .bor-sheet.is-in .bor-sheet-panel {
    transform: none;
    transition: opacity 120ms linear;
  }
  .bor-sheet::backdrop { transition: opacity 120ms linear; }
}

@media (prefers-reduced-transparency: reduce) {
  .bor-sheet::backdrop {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgb(45 45 37 / .72);
  }
}

@media (prefers-contrast: more) {
  .bor { --bor-ink-soft: var(--bor-ink); }
  .bor-card,
  .bor-btn,
  .bor-sheet-panel { box-shadow: none; border: 2px solid var(--bor-ink); }
  .bor-stars-base { color: var(--bor-dunes); }
}

@media (forced-colors: active) {
  .bor-card,
  .bor-btn,
  .bor-sheet-panel { border: 1px solid CanvasText; }
  .bor-stars-fill { forced-color-adjust: none; }
}
