/* Rezensionintegrator Widget — Full Flight Sim
 * Scope: alle Styles sind unter .ffs-gr-widget genested, damit sie
 * nicht in die Duda-Seite leaken.
 */

/* Poppins – selbst gehostet (kein Request an Google beim Seitenaufruf).
 * SIL Open Font License 1.1 — https://openfontlicense.org
 * Quelle: fonts.gstatic.com/s/poppins/v24 (einmalig heruntergeladen). */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/poppins-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/poppins-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/poppins-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/poppins-500-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/poppins-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/poppins-600-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/poppins-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/poppins-700-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

.ffs-gr-widget {
  --ffs-accent: #ddb357;        /* war: --ffs-gold */
  --ffs-star: #FBBC04;
  --ffs-card-bg: #ffffff;
  --ffs-radius: 12px;
  --ffs-card-width: 300px;
  --ffs-card-gap: 16px;
  --ffs-max-lines: 14;
  --ffs-star-size: 18px;
  --ffs-card-height: auto;
  --ffs-text: #1f1f1f;
  --ffs-muted: #5f6368;
  /* Header-Textfarbe — Default hell für dunkle Seiten (FFS ist dunkel).
   * Override in der Einbettung möglich:
   *   <style>.ffs-gr-widget { --ffs-header-color: #1f1f1f; }</style> */
  --ffs-header-color: #f1f3f4;
  --ffs-header-muted: #b8bcc2;
  --ffs-border: #e8eaed;
  --ffs-shadow: 0 1px 3px rgba(0,0,0,.08);
  --ffs-shadow-hover: 0 4px 12px rgba(0,0,0,.12);

  box-sizing: border-box;
  /* Header erbt Text-Farbe vom Parent (Duda-Seite), damit er auf hellem
   * UND dunklem Seitenhintergrund lesbar ist. Karten + Modal haben
   * eigenen weißen BG und setzen color explizit auf --ffs-text. */
  color: inherit;
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

.ffs-gr-widget *,
.ffs-gr-widget *::before,
.ffs-gr-widget *::after { box-sizing: inherit; }

/* Header — eigene weiße Box, funktioniert auf jedem Seitenhintergrund */
.ffs-gr-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .85rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  background: #fff;
  color: #1f1f1f;
  border-radius: var(--ffs-radius);
  box-shadow: var(--ffs-shadow);
}
.ffs-gr-header .google-wordmark {
  font-family: 'Poppins', system-ui, sans-serif;
  font-weight: 500;
  font-size: 1.35rem;
  line-height: 1;
  letter-spacing: -.02em;
  flex-shrink: 0;
}
/* Rating-Zeile: alle Elemente gleiche Größe + fett */
.ffs-gr-header .label,
.ffs-gr-header .stars,
.ffs-gr-header .score,
.ffs-gr-header .count {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
}
.ffs-gr-header .stars { color: var(--ffs-star); letter-spacing: 2px; font-size: var(--ffs-star-size); }
.ffs-gr-header .separator { color: #dadce0; font-weight: 300; font-size: 1.05rem; line-height: 1; }
.ffs-gr-header .cta-button {
  margin-left: auto;
  padding: .7rem 1.3rem;
  background: var(--ffs-accent);
  color: #1f1f1f;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: filter .15s ease, transform .15s ease;
}
.ffs-gr-header .cta-button:hover { filter: brightness(1.05); transform: translateY(-1px); }
.ffs-gr-header .cta-button:focus-visible { outline: 2px solid #000; outline-offset: 2px; }

/* Slider */
.ffs-gr-slider {
  position: relative;
  display: flex;
  align-items: center;
}
.ffs-gr-track {
  display: flex;
  gap: var(--ffs-card-gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  /* kein horizontales Padding — Karten starten bündig mit Header */
  padding: 0 0 1rem 0;
  /* Scrollbar versteckt — Navigation via Pfeile (Desktop) + Swipe (Touch). */
  scrollbar-width: none;            /* Firefox */
  -ms-overflow-style: none;          /* IE/Edge Legacy */
}
.ffs-gr-track::-webkit-scrollbar { display: none; } /* Chromium/Safari */

/* Nav-Arrows */
.ffs-gr-slider .nav-prev,
.ffs-gr-slider .nav-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: #fff;
  border: 1px solid var(--ffs-border);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1.25rem;
  cursor: pointer;
  box-shadow: var(--ffs-shadow);
  opacity: 0;
  transition: opacity .2s ease;
  z-index: 2;
}
.ffs-gr-slider:hover .nav-prev,
.ffs-gr-slider:hover .nav-next,
.ffs-gr-slider:focus-within .nav-prev,
.ffs-gr-slider:focus-within .nav-next { opacity: 1; }
.ffs-gr-slider .nav-prev { left: -8px; }
.ffs-gr-slider .nav-next { right: -8px; }
.ffs-gr-slider .nav-prev[disabled],
.ffs-gr-slider .nav-next[disabled] { opacity: .3 !important; cursor: default; }

/* Karte */
.review-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: var(--ffs-card-height, auto);
  overflow: hidden;
  flex: 0 0 var(--ffs-card-width);
  min-width: 240px;
  background: var(--ffs-card-bg);
  color: var(--ffs-text);
  border: 1px solid var(--ffs-border);
  border-radius: var(--ffs-radius);
  padding: 1rem;
  scroll-snap-align: start;
  box-shadow: var(--ffs-shadow);
  transition: transform .15s ease, box-shadow .15s ease;
  cursor: pointer;
}
.review-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--ffs-shadow-hover);
}
.review-card .author-row {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: .5rem;
}
.review-card .avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ccc;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: .95rem;
  object-fit: cover;
}
.review-card .meta { min-width: 0; flex: 1; }
.review-card .name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.review-card .date { color: var(--ffs-muted); font-size: .8rem; }
.review-card .rating-row { margin-bottom: .4rem; }
.review-card .rating-row .stars { color: var(--ffs-star); font-size: var(--ffs-star-size); }
.review-card .rating-row .verified {
  display: inline-block;
  vertical-align: middle;
  margin-left: .3rem;
  color: #4285F4;
}
.review-card .text {
  font-size: .9rem;
  line-height: 1.5;
  color: var(--ffs-text);
  display: -webkit-box;
  -webkit-line-clamp: var(--ffs-max-lines);
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0;
}
.review-card .read-more {
  display: inline-block;
  /* nach unten an die Karte pinnen, damit Text den ganzen Raum nutzt */
  margin-top: auto;
  padding-top: .5rem;
  color: #5f6368;
  font-size: .85rem;
  font-weight: 500;
}
.review-card .google-g {
  position: absolute;
  top: .85rem;
  right: .85rem;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  opacity: .95;
}

/* Skeleton */
.review-card.skeleton { pointer-events: none; cursor: default; }
.review-card.skeleton .avatar,
.review-card.skeleton .sk-line {
  background: linear-gradient(90deg, #eee 0%, #f5f5f5 50%, #eee 100%);
  background-size: 200% 100%;
  animation: ffs-sk-pulse 1.2s infinite;
  color: transparent;
}
.review-card.skeleton .sk-line { height: .7rem; border-radius: 3px; margin: .3rem 0; }
.review-card.skeleton .sk-line.short { width: 40%; }

@keyframes ffs-sk-pulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Responsive */
@media (max-width: 1023px) {
  .review-card { flex: 0 0 calc(50% - .5rem); }
  .ffs-gr-slider .nav-prev,
  .ffs-gr-slider .nav-next { opacity: 1; }
}
@media (max-width: 767px) {
  .review-card { flex: 0 0 100%; }
  .ffs-gr-header {
    justify-content: center;
    gap: .6rem;
    padding: .9rem 1rem;
  }
  .ffs-gr-header .google-wordmark {
    flex-basis: 100%;
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: .25rem;
  }
  .ffs-gr-header .cta-button {
    margin-left: 0;
    flex-basis: 100%;
    text-align: center;
    margin-top: .5rem;
  }
}

/* Modal */
.ffs-gr-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 1rem;
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: #1f1f1f;
}
.ffs-gr-modal[open] { display: flex; }
.ffs-gr-modal .box {
  background: #fff;
  border-radius: var(--ffs-radius);
  max-width: 600px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 1.5rem;
  position: relative;
}
.ffs-gr-modal .close {
  position: absolute;
  top: .5rem;
  right: .75rem;
  background: transparent;
  border: 0;
  font-size: 1.5rem;
  cursor: pointer;
}
.ffs-gr-modal .box .owner-reply {
  margin-top: 1rem;
  padding: .75rem 1rem;
  border-left: 3px solid var(--ffs-accent);
  background: #faf6ec;
  border-radius: 0 var(--ffs-radius) var(--ffs-radius) 0;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .ffs-gr-widget *,
  .ffs-gr-widget *::before,
  .ffs-gr-widget *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
