/* Wrapper */
.wsr-wrapper {
  position: relative;
  padding: 20px 10px;
}

/* Horizontal reel row */
.wsr-carousel {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

/* Hide scrollbar */
.wsr-carousel::-webkit-scrollbar {
  display: none;
}

/* Reel card */
.wsr-card {
  width: 235px;               /* desktop */
  flex-shrink: 0;
  background: rgba(0,0,0,0);
  border-radius: 14px;
  padding: 12px;
  overflow: hidden;
  scroll-snap-align: start;
  border: 2px solid #bc0c0c;
  box-shadow: inset 0 0 16px 8px #bc0c0c6e;
}

/* Tablet */
@media (max-width: 1024px) {
  .wsr-card {
    width: 205px;
  }
}

/* Mobile */
@media (max-width: 640px) {
  .wsr-card {
    width: 170px;
  }
}


/* Media section */
.wsr-media {
  aspect-ratio: 9 / 16;
  background: #000;
  border-radius: 0.5rem;
  position: relative;
}

.wsr-media video,
.wsr-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0.5rem;
}

/* ----------------------------------
 * CARD LOADER OVERLAY
 * ---------------------------------- */
.wsr-card-loader {
  position: absolute;
  inset: 0; /* top:0 right:0 bottom:0 left:0 */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

/* Loader visible */
.wsr-card-loader.active {
  opacity: 1;
}

/* Footer section */
.wsr-footer {
  padding: 6px 8px;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Arrows */
.wsr-arrow {
  position: absolute;
  top: 47%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.6);
  color: #bc0c0c;
  border: none;
  /* width: 36px;
  height: 36px; */
  border-radius: 50%;
  cursor: pointer;
  z-index: 5;
}

.wsr-prev { left: -28px; }
.wsr-next { right: -28px; }

/* Caption */
.wsr-caption {
  font-size: 13px;
  line-height: 1.2;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Product thumbnail strip */
.wsr-product-strip {
  display: flex;
  gap: 6px;
  overflow: hidden;
}

.wsr-product-thumb img {
  width: 34px;
  height: 34px;
  object-fit: cover;
  border-radius: 6px;
}

.wsr-card[data-products] {
  display: unset;
}

@media (max-width: 999.98px) {
    .wsr-card[data-products] {
        --shop-columns: unset !important;
    }
}

/* ===============================
   VIEWER
================================ */

#wsr-viewer {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: none;
  z-index: 9999;
}

#wsr-viewer.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.wsr-viewer-inner {
  width: 100%;
  max-width: 390px;
  max-height: 95vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wsr-viewer-media {
  position: relative;       /* 🔑 anchor overlays */
  width: 100%;
  aspect-ratio: 9 / 16;     /* mobile-first reels */
  max-height: 95vh;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 16px;
  overflow: hidden;        /* 🔑 clamps overlays */
}

/* MEDIA */
.wsr-media-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.wsr-media-layer video,
.wsr-media-layer img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* or contain or cover */
}

/* UI OVERLAY */
.wsr-ui-layer {
  position: absolute;
  inset: 0;
  z-index: 2; /* ABOVE MEDIA */
  pointer-events: none;
}

/* enable clicks where needed */
.wsr-ui-layer button,
.wsr-ui-layer a {
  pointer-events: auto;
}

.wsr-viewer-mute {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 20;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0,0,0,0);
  color: #fff;
  border: none;
  font-size: 16px;
  cursor: pointer;
}

.wsr-viewer-mute:hover{
  background: rgba(0,0,0,0.4);
}


.wsr-viewer-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  pointer-events: none;
}

/* Hide by default */
.wsr-viewer-mute,
.wsr-viewer-progress {
  display: none;
}

.wsr-viewer-close {
  top: 12px;
  right: 12px;
}

.wsr-viewer-mute {
  top: 12px;
  left: 12px;
}

.wsr-viewer-progress {
  bottom: 8px;
  left: 8px;
  right: 8px;
}

.wsr-viewer-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 20;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0,0,0,0);
  color: #fff;
  border: none;
  font-size: 22px;
  cursor: pointer;
}



.wsr-viewer-close:hover {
  background: rgba(0,0,0,0.4);
}

.wsr-viewer-progress {
  position: absolute;
  bottom: 6px;
  left: 6px;
  right: 6px;
  height: 3px;
  background: rgba(255,255,255,0.25);
  border-radius: 2px;
  overflow: hidden;
  z-index: 15;
}

.wsr-viewer-progress span {
  display: block;
  height: 100%;
  width: 0%;
  background: #fff;
}

.wsr-viewer-caption {
  max-height: 25%;
  overflow-y: auto;
  padding: 10px 14px;
  font-size: 14px;
  color: #fff;
  background: linear-gradient(to top, rgba(0,0,0,0.65), transparent);
  pointer-events: auto;
}

.wsr-viewer-caption-text {
  font-weight: 500;
  font-size: 16px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  color: #fff;
  margin: 0;
  max-width: 260px;
}

.wsr-viewer-products {
  max-height: 30%;
  display: flex;
  gap: 10px;
  padding: 10px 14px 14px;
  overflow-x: auto;
  overflow-y: hidden;
  pointer-events: auto;
}

.wsr-viewer-products,
.wsr-viewer-caption {
  pointer-events: auto;     /* 🔑 allows scroll & click */
}


.wsr-viewer-products::-webkit-scrollbar {
  display: none;
}

/* .wsr-viewer-inner.hide-overlay .wsr-viewer-close,
.wsr-viewer-inner.hide-overlay .wsr-viewer-mute,
.wsr-viewer-inner.hide-overlay .wsr-viewer-progress, */
.wsr-viewer-inner.hide-overlay .wsr-viewer-caption,
.wsr-viewer-inner.hide-overlay .wsr-viewer-products {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}


.wsr-viewer-overlay {
  transition: opacity 0.25s ease;
}



.wsr-viewer-product {
  min-width: 130px;
  background: #fff;
  border-radius: 10px;
  padding: 8px;
  text-align: center;
}

.wsr-viewer-product img {
  width: 100%;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
}


/* -------------------------------------------------
 * Carousel arrow visibility control
 * ------------------------------------------------- */

.wsr-arrow {
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.25s ease;
  font-size: xxx-large;
}

/* Hidden state */
.wsr-arrow.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.wsr-viewer-product-name {
  margin: 6px 0;
  font-size: 13px;
  font-weight: 500;
}

.wsr-viewer-product-btn {
  display: inline-block;
  padding: 6px 10px;
  font-size: 12px;
  background: #000;
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
}

.wsr-viewer-product-btn:hover {
  opacity: 0.4;
}

.product-panel-item {
    width: 160px;
    padding: 4px;
    background: rgba(78, 78, 78, .5);
    min-width: 210px;
    border-radius: 8px;
    cursor: pointer;
    gap: 12px;
}

.product-panel-item-thumbnail {
    display: inline-block;
    width: 68px;
    height: 68px;
    border-radius: 4px;
    background-size: cover;
    background-position: center center;
    border: 2px solid #ffffff;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    position: relative;
}

.product-panel-item-thumbnail-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.product-panel-item-details {
    flex: 1;
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.product-panel-item-details-title {
    font-weight: 500;
    font-size: 16px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    color: #fff;
    margin: 0;
    max-width: 130px;
}

.product-panel-item-view-now {
    background: black;
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    margin-top: 10px;
    width: 100%;
}

.product-panel-item-view-now:hover {
  opacity: 0.85;
}

@media (max-width: 480px) {
  .wsr-viewer-inner {
    max-width: 100%;
  }

  .wsr-viewer-caption {
    font-size: 14px;
  }
}

@media (orientation: landscape) {

  .wsr-viewer-caption {
    max-height: 30%;
    font-size: 13px;
  }

  .wsr-viewer-products {
    max-height: 46%;
  }
}

/* Loader overlay */
.wsr-viewer-loader {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 5;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}

/* Show loader */
.wsr-viewer-loader.active {
  display: flex;
  opacity: 1;
}

/* Spinner */
.wsr-spinner {
  width: 42px;
  height: 42px;
  border: 4px solid rgba(255,255,255,0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: wsr-spin 1s linear infinite;
}

@keyframes wsr-spin {
  to { transform: rotate(360deg); }
}



/* Left side text container */
.event-panel-item-details {
  flex: 1;
  min-width: 0; /* REQUIRED for ellipsis to work */
}

/* Label */
.event-panel-item-label {
  font-size: 12px;
  color: #999;
  margin: 0;
}

/* Organizer name */
.event-panel-item-title {
  font-size: 14px;
  font-weight: 600;
  margin: 2px 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}