/*
 * SPP Media UI
 * - bottom thumbnails only
 * - video entry always directly visible
 * - no tabs
 * - no vertical thumb rail
 */

.gcw-spp-media {
  --gcw-gap: 12px;
  --gcw-radius: 18px;
  --gcw-border: rgba(15, 23, 42, 0.10);
  --gcw-bg: #fbfbfa;
  --gcw-nav-size: 40px;
  --gcw-thumb-size: 78px;
  --gcw-thumb-gap: 10px;
  --gcw-main-max: 540px;
  position: relative;
  box-sizing: border-box;
  overflow: visible;
}

.gcw-spp-media,
.gcw-spp-main,
.gcw-spp-thumbs,
.gcw-spp-thumbs-track {
  min-width: 0;
}

.gcw-spp-main {
  position: relative;
  width: 100%;
  max-width: var(--gcw-main-max);
}

.gcw-spp-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--gcw-radius);
  background: var(--gcw-bg);
  border: 1px solid var(--gcw-border);
}

.gcw-spp-track::-webkit-scrollbar { display: none; }
.gcw-spp-track { scrollbar-width: none; }

.gcw-spp-slide {
  flex: 0 0 100%;
  width: 100%;
  scroll-snap-align: start;
  position: relative;
  user-select: none;
  background: var(--gcw-bg);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gcw-spp-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.gcw-spp-img--empty {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: rgba(0, 0, 0, 0.04);
}

.gcw-spp-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: var(--gcw-nav-size);
  height: var(--gcw-nav-size);
  border-radius: 999px;
  border: 1px solid var(--gcw-border);
  background: rgba(255, 255, 255, 0.94);
  cursor: pointer;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.gcw-spp-prev { left: 10px; margin: 0; }
.gcw-spp-next { right: 10px; margin: 0; }

.gcw-spp-nav::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(135deg);
  width: 10px;
  height: 10px;
  border-right: 2px solid rgba(0, 0, 0, 0.55);
  border-bottom: 2px solid rgba(0, 0, 0, 0.55);
  box-sizing: border-box;
}

.gcw-spp-next::before {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.gcw-spp-slide--video {
  background: rgba(0, 0, 0, 0.04);
}

.gcw-spp-video-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.gcw-spp-video-play {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.65);
  position: relative;
}

.gcw-spp-video-play::after {
  content: "";
  position: absolute;
  left: 30px;
  top: 22px;
  width: 0;
  height: 0;
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
  border-left: 20px solid #fff;
}

.gcw-spp-thumbs {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.gcw-spp-thumbs-track {
  display: flex;
  gap: var(--gcw-thumb-gap);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  align-items: center;
  flex: 1 1 auto;
  scrollbar-width: none;
}

.gcw-spp-thumbs-track::-webkit-scrollbar { display: none; }

.gcw-spp-thumb {
  flex: 0 0 auto;
  width: var(--gcw-thumb-size);
  height: var(--gcw-thumb-size);
  border-radius: 16px;
  border: 1px solid var(--gcw-border);
  background: #fff;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  margin: 0;
  filter: brightness(0.92);
  opacity: 0.98;
}

.gcw-spp-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  -webkit-user-drag: none;
  user-select: none;
}

.gcw-spp-thumb.is-active {
  filter: brightness(1);
  opacity: 1;
  border-color: rgba(15, 118, 110, 0.35);
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.08);
}

.gcw-spp-thumb--video-entry {
  width: auto;
  min-width: 92px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: #0f766e;
  background: #edf8f6;
  border-color: rgba(15, 118, 110, 0.22);
}

.gcw-spp-thumb-video-icon {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.14);
  position: relative;
  flex: 0 0 auto;
}

.gcw-spp-thumb-video-icon::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 6px;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 7px solid #0f766e;
}

.gcw-spp-thumb-video-text {
  white-space: nowrap;
}

.gcw-spp-thumb--empty {
  display: block;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.04);
}

@media (min-width: 850px) {
  .gcw-spp-main {
    max-width: 560px;
  }
}

@media (max-width: 849px) {
  .gcw-spp-media {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .gcw-spp-main {
    width: 100%;
    max-width: none;
  }

  .gcw-spp-nav {
    width: 36px;
    height: 36px;
  }

  .gcw-spp-thumb {
    width: 72px;
    height: 72px;
    border-radius: 14px;
  }

  .gcw-spp-thumb--video-entry {
    min-width: 86px;
    padding: 0 14px;
    font-size: 14px;
  }
}
