/* OGG Reviews – frontend
   Variabelen worden gezet vanuit de instellingen (zie inline style in <head>). */
:root {
  --ogg-accent: #1a73e8;
  --ogg-star: #fbbc04;
  --ogg-text: #202124;
  --ogg-muted: #5f6368;
  --ogg-bg: #ffffff;
  --ogg-radius: 14px;
  --ogg-offset: 20px;
  --ogg-z: 9990;
  --ogg-shadow: 0 6px 24px rgba(0, 0, 0, .14), 0 1px 3px rgba(0, 0, 0, .08);
  --ogg-font: inherit;
}

.ogg-badge, .ogg-popup, .ogg-inline {
  font-family: var(--ogg-font);
  color: var(--ogg-text);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  box-sizing: border-box;
}
.ogg-badge *, .ogg-popup *, .ogg-inline * { box-sizing: border-box; }

/* ---------- Sterren ---------- */
.ogg-stars {
  position: relative;
  display: inline-block;
  height: 20px;
  line-height: 0;
  vertical-align: middle;
  white-space: nowrap;
}
.ogg-stars svg { width: 20px; height: 20px; display: inline-block; fill: #dadce0; }
.ogg-stars__fill { position: absolute; left: 0; top: 0; overflow: hidden; white-space: nowrap; }
.ogg-stars__fill svg { fill: var(--ogg-star); }
.ogg-stars--sm { height: 16px; }
.ogg-stars--sm svg { width: 16px; height: 16px; }

/* ---------- Icoon ---------- */
.ogg-icon { display: inline-block; vertical-align: middle; border-radius: 50%; }
.ogg-icon--text {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--ogg-muted);
  border-radius: 4px;
  padding: 1px 5px;
  background: rgba(0, 0, 0, .05);
}

/* ---------- Sticky badge ---------- */
.ogg-badge {
  position: relative;
  display: inline-block;
  background: var(--ogg-bg);
  border-radius: var(--ogg-radius);
  box-shadow: var(--ogg-shadow);
  transition: transform .18s ease, box-shadow .18s ease, opacity .25s ease;
}
.ogg-badge--sticky {
  position: fixed;
  bottom: var(--ogg-offset);
  z-index: var(--ogg-z);
}
.ogg-badge--left { left: var(--ogg-offset); }
.ogg-badge--right { right: var(--ogg-offset); }
.ogg-badge[hidden] { display: none; }
.ogg-badge:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0, 0, 0, .18), 0 2px 4px rgba(0, 0, 0, .08); }
.ogg-badge__body {
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border: 0;
  margin: 0;
  padding: 12px 18px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  color: inherit;
  font: inherit;
  min-width: 128px;
  text-align: center;
}
.ogg-badge__body:focus-visible { outline: 2px solid var(--ogg-accent); outline-offset: 2px; border-radius: var(--ogg-radius); }
.ogg-badge__icon { display: block; line-height: 0; margin-bottom: 2px; }
.ogg-badge__rating { display: flex; align-items: center; gap: 6px; }
.ogg-badge__score { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.ogg-badge__count { font-size: 11px; font-weight: 700; color: var(--ogg-accent); }
.ogg-badge__close {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 0;
  background: var(--ogg-bg);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
  color: var(--ogg-muted);
  font-size: 16px;
  line-height: 22px;
  padding: 0;
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s ease;
}
.ogg-badge:hover .ogg-badge__close, .ogg-badge__close:focus-visible { opacity: 1; }
@media (hover: none) { .ogg-badge__close { opacity: 1; } }
.ogg-badge--inline .ogg-badge__close { display: none; }

/* ---------- Popup ---------- */
.ogg-popup[hidden] { display: none; }
.ogg-popup {
  position: fixed;
  inset: 0;
  z-index: calc(var(--ogg-z) + 10);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.ogg-popup__overlay {
  position: absolute;
  inset: 0;
  background: rgba(32, 33, 36, .55);
  backdrop-filter: blur(2px);
  animation: ogg-fade .2s ease;
}
.ogg-popup__dialog {
  position: relative;
  background: var(--ogg-bg);
  border-radius: var(--ogg-radius);
  box-shadow: 0 24px 64px rgba(0, 0, 0, .3);
  width: 100%;
  max-width: 760px;
  max-height: min(88vh, 900px);
  overflow: auto;
  padding: 28px 28px 20px;
  animation: ogg-up .22s ease;
  overscroll-behavior: contain;
}
.ogg-popup__dialog:focus { outline: none; }
.ogg-popup__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: rgba(0, 0, 0, .05);
  color: var(--ogg-text);
  font-size: 24px;
  line-height: 36px;
  padding: 0;
  cursor: pointer;
}
.ogg-popup__close:hover { background: rgba(0, 0, 0, .1); }
.ogg-popup__title { font-size: 22px; font-weight: 700; margin: 0 40px 16px 0; line-height: 1.25; }
.ogg-popup__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.ogg-popup__all { margin: 18px 0 0; text-align: center; font-size: 14px; }
.ogg-popup__all a { color: var(--ogg-accent); font-weight: 600; text-decoration: none; }
.ogg-popup__all a:hover { text-decoration: underline; }
.ogg-popup__empty { color: var(--ogg-muted); text-align: center; grid-column: 1 / -1; }
@media (max-width: 640px) {
  .ogg-popup { padding: 0; align-items: flex-end; }
  .ogg-popup__dialog { max-height: 92vh; border-radius: var(--ogg-radius) var(--ogg-radius) 0 0; padding: 22px 18px 16px; animation-name: ogg-slide; }
  .ogg-popup__list { grid-template-columns: 1fr; }
}
@keyframes ogg-fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes ogg-up { from { opacity: 0; transform: translateY(14px) } to { opacity: 1; transform: none } }
@keyframes ogg-slide { from { transform: translateY(40px) } to { transform: none } }
body.ogg-popup-open { overflow: hidden; }

/* ---------- Samenvatting ---------- */
.ogg-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 18px;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: calc(var(--ogg-radius) - 2px);
  background: rgba(0, 0, 0, .02);
}
.ogg-summary__left { display: flex; align-items: center; gap: 14px; }
.ogg-summary__name { font-weight: 700; font-size: 15px; }
.ogg-summary__rating { display: flex; align-items: center; gap: 8px; margin: 2px 0; }
.ogg-summary__score { font-size: 24px; font-weight: 700; line-height: 1; }
.ogg-summary__count { font-size: 13px; color: var(--ogg-muted); }
.ogg-summary__note { font-size: 12px; color: var(--ogg-muted); margin-top: 2px; }
.ogg-btn {
  display: inline-block;
  background: var(--ogg-accent);
  color: #fff !important;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 999px;
  text-decoration: none !important;
  white-space: nowrap;
  transition: filter .15s ease;
}
.ogg-btn:hover { filter: brightness(1.08); }

/* ---------- Reviewkaart ---------- */
.ogg-card {
  background: var(--ogg-bg);
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: calc(var(--ogg-radius) - 2px);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.ogg-card__head { display: flex; align-items: center; gap: 10px; }
.ogg-card__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 40px;
}
.ogg-card__avatar--initial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ogg-accent);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
}
.ogg-card__meta { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ogg-card__author { font-weight: 700; font-size: 14px; line-height: 1.25; overflow-wrap: anywhere; }
.ogg-card__date { font-size: 12px; color: var(--ogg-muted); }
.ogg-card__source { line-height: 0; flex: 0 0 auto; }
.ogg-card__text { margin: 0; font-size: 14px; line-height: 1.55; color: var(--ogg-text); }
.ogg-card__more {
  background: none;
  border: 0;
  padding: 0;
  color: var(--ogg-accent);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* ---------- Paginering ---------- */
.ogg-card[hidden] { display: none; }
.ogg-pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.ogg-pager[hidden] { display: none; }
.ogg-pager__btn {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, .12);
  background: var(--ogg-bg);
  color: var(--ogg-text);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.ogg-pager__btn:hover:not(:disabled) { background: rgba(0, 0, 0, .05); }
.ogg-pager__btn.is-active { background: var(--ogg-accent); border-color: var(--ogg-accent); color: #fff; }
.ogg-pager__btn:disabled { opacity: .35; cursor: default; }
.ogg-pager__btn--prev, .ogg-pager__btn--next { font-size: 22px; line-height: 1; }
.ogg-pager__gap { color: var(--ogg-muted); padding: 0 2px; }

/* ---------- Inline weergaven ---------- */
.ogg-inline { margin: 0 0 1.5em; }
.ogg-inline__title { margin: 0 0 14px; }
.ogg-inline .ogg-summary { margin-bottom: 16px; }
.ogg-inline--summary .ogg-summary { margin-bottom: 0; }
.ogg-cards { display: grid; gap: 14px; }
.ogg-inline--grid .ogg-cards { grid-template-columns: repeat(var(--ogg-cols, 3), minmax(0, 1fr)); }
@media (max-width: 900px) { .ogg-inline--grid .ogg-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .ogg-inline--grid .ogg-cards { grid-template-columns: 1fr; } }

.ogg-slider { position: relative; }
.ogg-slider__track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 4px 2px 10px;
  scrollbar-width: none;
}
.ogg-slider__track::-webkit-scrollbar { display: none; }
.ogg-slider__track .ogg-card {
  flex: 0 0 calc((100% - 14px * (var(--ogg-cols, 3) - 1)) / var(--ogg-cols, 3));
  scroll-snap-align: start;
}
@media (max-width: 900px) { .ogg-slider__track .ogg-card { flex-basis: calc((100% - 14px) / 2); } }
@media (max-width: 600px) { .ogg-slider__track .ogg-card { flex-basis: 86%; } }
.ogg-slider__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 0;
  background: var(--ogg-bg);
  box-shadow: var(--ogg-shadow);
  color: var(--ogg-text);
  font-size: 26px;
  line-height: 36px;
  padding: 0;
  cursor: pointer;
  z-index: 2;
}
.ogg-slider__nav--prev { left: -14px; }
.ogg-slider__nav--next { right: -14px; }
.ogg-slider__nav:disabled { opacity: .35; cursor: default; }

@media (prefers-reduced-motion: reduce) {
  .ogg-badge, .ogg-popup__overlay, .ogg-popup__dialog { animation: none; transition: none; }
  .ogg-slider__track { scroll-behavior: auto; }
}
