/* =============================================================
   SG Related Posts TV – Shared Wiki/Block Carousel Styles
   Gemeinsame Optik für Wiki-Bereich und manuellen Gutenberg-Block.
   ============================================================= */

.rptv-wiki,
.rptv-block {
  clear: both;
  margin: 0 0 36px;
}

.rptv-wiki .sgwh-post-carousel,
.rptv-block .sgwh-post-carousel {
  position: relative;
}

.rptv-wiki .sgwh-post-track,
.rptv-block .sgwh-post-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: var(--rptv-card-width, 200px);
  column-gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding: 0 0 6px;
  margin: 0;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.rptv-wiki .sgwh-post-track::-webkit-scrollbar,
.rptv-block .sgwh-post-track::-webkit-scrollbar {
  display: none;
}

.rptv-wiki .sgwh-post-card,
.rptv-block .sgwh-post-card {
  min-width: 0;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.rptv-wiki .sgwh-post-card__wrap,
.rptv-block .sgwh-post-card__wrap {
  display: block;
  text-decoration: none;
  color: inherit;
}

.rptv-wiki .sgwh-post-card__image-link,
.rptv-block .sgwh-post-card__image-link {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 0 !important;
  overflow: hidden !important;
  border-radius: 12px !important;
}

.rptv-wiki .sgwh-post-card__image-link img,
.rptv-wiki .sgwh-post-card__image-link .sgwh-post-card__image,
.rptv-wiki .sgwh-post-card__image,
.rptv-block .sgwh-post-card__image-link img,
.rptv-block .sgwh-post-card__image-link .sgwh-post-card__image,
.rptv-block .sgwh-post-card__image {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: 16 / 10 !important;
  object-fit: cover !important;
  border-radius: 12px !important;
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.rptv-wiki .sgwh-post-card__body,
.rptv-block .sgwh-post-card__body {
  margin-top: 8px;
  padding: 0;
  text-align: left;
  min-height: 0;
}

.rptv-wiki .sgwh-post-card__title,
.rptv-block .sgwh-post-card__title {
  margin: 0 0 6px;
  padding: 0;
  line-height: 1.16;
  overflow: visible;
  position: relative;
}

.rptv-wiki .sgwh-post-card__title span,
.rptv-block .sgwh-post-card__title span {
  font-family: 'Oswald', sans-serif, Helvetica, Arial;
  font-weight: 500;
  font-size: .98rem;
  line-height: 1.2;
  color: var(--text-main, #fff);
  text-shadow: 0 0 5px rgba(0,0,0,.3);
  overflow-wrap: break-word;
  word-break: break-word;
}

.rptv-wiki .sgwh-post-card__date,
.rptv-block .sgwh-post-card__date {
  font-family: 'Roboto', sans-serif;
  font-size: .70rem;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-dim, rgba(255,255,255,.7));
  margin-top: 0;
}

.rptv-line-u {
  position: absolute;
  height: 3px;
  background: var(--accent-color, #3CFFD0);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .25s ease-out;
  pointer-events: none;
  border-radius: 2px;
}

.rptv-line-u.is-active {
  transform: scaleX(1);
}

.rptv-wiki .sgwh-carousel__btn,
.rptv-block .sgwh-carousel__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: var(--sgwh-carousel-image-mid, 80px);
  transform: translateY(-50%);
  z-index: 2;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.45);
  color: #fff;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  padding: 0;
}

.rptv-wiki .sgwh-post-carousel.is-scrollable .sgwh-carousel__btn,
.rptv-block .sgwh-post-carousel.is-scrollable .sgwh-carousel__btn {
  opacity: 1;
  pointer-events: auto;
}

.rptv-wiki .sgwh-carousel__btn--UNUSED,
.rptv-block .sgwh-carousel__btn--UNUSED {
  opacity: .35;
  cursor: default;
}

.rptv-wiki .sgwh-post-carousel.is-scrollable .sgwh-carousel__btn.is-hidden,
.rptv-block .sgwh-post-carousel.is-scrollable .sgwh-carousel__btn.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.rptv-wiki .sgwh-carousel__btn--prev,
.rptv-block .sgwh-carousel__btn--prev {
  left: -12px;
}

.rptv-wiki .sgwh-carousel__btn--next,
.rptv-block .sgwh-carousel__btn--next {
  right: -12px;
}

@media (max-width: 700px) {
  .rptv-wiki .sgwh-post-track,
  .rptv-block .sgwh-post-track {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 14px !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    padding: 0 0 6px !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
  }

  .rptv-wiki .sgwh-post-card,
  .rptv-block .sgwh-post-card {
    flex: 0 0 calc(50% - 21px) !important;
    width: calc(50% - 21px) !important;
    max-width: calc(50% - 21px) !important;
    scroll-snap-align: start !important;
  }

  .rptv-wiki .sgwh-post-track::-webkit-scrollbar,
  .rptv-block .sgwh-post-track::-webkit-scrollbar {
    display: none;
  }

  .rptv-wiki .sgwh-carousel__btn,
  .rptv-block .sgwh-carousel__btn {
    display: none;
  }
}
