/* ===== Variables ===== */
.lpl-story-luman,
.luman-viewer {
  --luman-ring: linear-gradient(
    45deg,
    #f09433,
    #e6683c,
    #dc2743,
    #cc2366,
    #bc1888
  );
  --luman-bg: #000;
  --luman-text: #fff;
  --luman-muted: rgba(255, 255, 255, 0.65);
  --luman-accent: #0095f6;
  --luman-danger: #ed4956;
  --luman-radius: 12px;
  --luman-story-w: min(100vw - 32px, 420px);
  --luman-story-h: min(100dvh - 48px, 740px);
  --luman-transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --luman-safe-top: env(safe-area-inset-top, 0px);
  --luman-safe-bottom: env(safe-area-inset-bottom, 0px);
}
button.luman-stories__item:hover {
  background: none;
}
/* ===== Story row (avatars) ===== */
.luman-stories {
  padding: 16px 0;
  border-bottom: 1px solid #dbdbdb;
  background: #fff;
}

.luman-stories__scroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 16px 8px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.luman-stories__scroll::-webkit-scrollbar {
  display: none;
}

.luman-stories__item {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 76px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.luman-stories__ring {
  width: 68px;
  height: 68px;
  padding: 3px;
  border-radius: 50%;
  background: var(--luman-ring);
}

.luman-stories__ring--seen {
  background: #dbdbdb;
}

.luman-stories__thumb {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid #fff;
  background: #efefef center / cover no-repeat;
}

.luman-stories__label {
  font-size: 11px;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

/* ===== Viewer overlay ===== */
.luman-viewer {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
  user-select: none;
  direction: rtl;
}

.luman-viewer[hidden] {
  display: none !important;
}

.luman-viewer__close {
  position: absolute;
  top: calc(12px + var(--luman-safe-top));
  left: 16px;
  z-index: 30;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: var(--luman-text);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.luman-viewer__stage {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.luman-viewer__track {
  display: flex;
  flex-direction: row;
  direction: rtl;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 100%;
  width: 100%;
  padding: 24px 0;
  transition: transform var(--luman-transition);
  will-change: transform;
}

/* ===== Single story card ===== */
.luman-card {
  position: relative;
  flex: 0 0 var(--luman-story-w);
  width: var(--luman-story-w);
  height: var(--luman-story-h);
  max-height: calc(100dvh - 32px);
  border-radius: var(--luman-radius);
  overflow: hidden;
  background: #111;
  transform: scale(0.88);
  opacity: 0.35;
  filter: blur(1px);
  transition:
    transform var(--luman-transition),
    opacity var(--luman-transition),
    filter var(--luman-transition);
  pointer-events: none;
}

.luman-card--active {
  transform: scale(1);
  opacity: 1;
  filter: none;
  pointer-events: auto;
  z-index: 2;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.55);
}

.luman-card--adjacent {
  pointer-events: auto;
  cursor: pointer;
}

.luman-card--adjacent .luman-card__footer {
  display: none !important;
  pointer-events: none;
}

.luman-card__loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1a1a1a;
  z-index: 5;
}

.luman-card__loader[hidden] {
  display: none !important;
}

.luman-card__spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: luman-spin 0.7s linear infinite;
}

@keyframes luman-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Progress bars */
.luman-card__progress {
  position: absolute;
  top: calc(8px + var(--luman-safe-top));
  left: 8px;
  right: 8px;
  z-index: 10;
  display: flex;
  gap: 4px;
  height: 3px;
}

.luman-card__bar {
  flex: 1;
  height: 100%;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 2px;
  overflow: hidden;
}

.luman-card__bar-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: #fff;
  border-radius: 2px;
  will-change: width;
}

.luman-card__bar-fill--done {
  width: 100% !important;
  transition: none;
}

.luman-card__bar-fill--active {
  transition: width linear;
}

/* Header */
.luman-card__header {
  position: absolute;
  top: calc(20px + var(--luman-safe-top));
  left: 12px;
  right: 12px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
}

.luman-card__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: center / cover no-repeat;
}

.luman-card__meta {
  flex: 1;
  min-width: 0;
  color: var(--luman-text);
  font-size: 13px;
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.luman-card__time {
  font-weight: 400;
  opacity: 0.75;
  font-size: 12px;
}

/* Media */
.luman-card__media {
  position: absolute;
  inset: 0;
  background: #000 center / cover no-repeat;
}

.luman-card__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.luman-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.luman-card--comments-open .luman-card__footer,
.luman-card--comments-open .luman-card__sound {
  pointer-events: none;
  opacity: 0.35;
}

/* نشان ویدیو روی آواتار */
.luman-stories__ring--video::after {
  content: "▶";
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.luman-stories__ring {
  position: relative;
}

/* آیکن صدا روی ویدیو */
.luman-card__sound {
  position: absolute;
  top: calc(52px + var(--luman-safe-top));
  left: 12px;
  z-index: 12;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}

.luman-card__sound svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}
button.luman-actions__btn.luman-actions__like:hover{
    background: none;
color: #ffffffa6;
}
p.luman-product__title:hover {
    color: #ffff;
}
span.luman-product__cta:hover {
    color: #fff;
}
p.luman-product__price {
    color: #fff;
}
.luman-card__sound .dashicons {
  width: 18px;
  height: 18px;
  font-size: 18px;
  line-height: 1;
  color: currentColor;
}
span.luman-comments__reply {
  width: 100%;
}
.luman-card__sound[hidden] {
  display: none !important;
}

/* Footer: product + actions */
.luman-card__footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 12;
  padding: 12px 12px calc(16px + var(--luman-safe-bottom));
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Product strip */
.luman-product {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  text-decoration: none;
  color: var(--luman-text);
  backdrop-filter: blur(12px);
  transition: background 0.2s;
}

.luman-product:hover {
  background: rgba(255, 255, 255, 0.2);
}

.luman-product__img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  background: #333;
  flex-shrink: 0;
}

.luman-product__info {
  flex: 1;
  min-width: 0;
}

.luman-product__title {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.luman-product__price {
  font-size: 12px;
  margin: 0;
  color: #7ee081;
}

.luman-product__cta {
  font-size: 11px;
  padding: 6px 12px;
  background: var(--luman-accent);
  border-radius: 6px;
  white-space: nowrap;
  font-weight: 600;
}

/* Actions */
.luman-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.luman-actions__btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border: none;
  background: none;
  color: var(--luman-text);
  cursor: pointer;
  padding: 4px 8px;
  font-size: 11px;
  -webkit-tap-highlight-color: transparent;
}

.luman-actions__btn svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5));
}

.luman-actions__btn--active-like {
  color: #ff3040;
}

.luman-actions__btn--active-dislike {
  color: #8e8e8e;
}

.luman-actions__count {
  font-size: 10px;
  opacity: 0.9;
}

/* Pause indicator */
.luman-card__paused {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 15;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}

.luman-card__paused--show {
  opacity: 1;
}

.luman-card__paused svg {
  width: 28px;
  height: 28px;
  fill: #fff;
}

/* ===== Comments panel ===== */
.luman-comments {
  position: fixed;
  inset: 0;
  z-index: 100001;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.luman-comments[hidden] {
  display: none !important;
}
button.luman-viewer__close {
    width: 40px;
    min-height: 40px;
}
.luman-comments__sheet {
  width: 100%;
  max-width: var(--luman-story-w);
  max-height: 55dvh;
  background: #fff;
  border-radius: 16px 16px 0 0;
  display: flex;
  flex-direction: column;
  color: #262626;
  animation: luman-slide-up 0.3s ease;
}

@keyframes luman-slide-up {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.luman-comments__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #efefef;
  font-weight: 600;
}
button.luman-card__sound {
    width: 40px;
    min-height: 40px;
}
.luman-comments__close {
  border: none;
  background: none;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  color: #8e8e8e;
}
button.luman-comments__close {
    width: 40px;
    min-height: 40px;
}
.luman-comments__list {
  list-style: none;
  margin: 0;
  padding: 12px 16px;
  overflow-y: auto;
  flex: 1;
  min-height: 80px;
}

.luman-comments__list li {
  padding: 8px 0;
  font-size: 14px;
  border-bottom: 1px solid #f5f5f5;
}

.luman-comments__list li span {
  display: inline-block;
  margin-left: 6px;
  vertical-align: middle;
}

.luman-comments__user {
  font-weight: 700;
}

.luman-comments__text {
  color: inherit;
}

.luman-comments__reply {
  display: block;
  margin-top: 6px;
  color: #8e8e8e;
  font-size: 13px;
}

.luman-comments__empty {
  color: #8e8e8e;
  text-align: center;
  padding: 24px;
  font-size: 14px;
}

.luman-comments__form {
  display: flex;
  gap: 8px;
  padding: 12px 16px calc(12px + var(--luman-safe-bottom));
  border-top: 1px solid #efefef;
}

.luman-comments__form input {
  flex: 1;
  border: 1px solid #dbdbdb;
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
}

.luman-comments__form button {
  position: relative;
  border: none;
  background: var(--luman-accent);
  color: #fff;
  border-radius: 8px;
  padding: 0 16px;
  font-weight: 600;
  cursor: pointer;
}

.luman-comments__form.is-submitting button,
.luman-comments__form button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.luman-comments__form.is-submitting button {
  color: transparent;
  min-width: 58px;
}

.luman-comments__form.is-submitting button::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: luman-spin 0.7s linear infinite;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .lpl-story-luman,
  .luman-viewer {
    --luman-story-w: min(100vw - 24px, 100vw - 24px);
    --luman-story-h: min(100dvh - 24px, 100dvh - 24px);
  }

  .luman-viewer__track {
    gap: 8px;
  }

  .luman-card:not(.luman-card--active) {
    display: none;
  }

  .luman-viewer__close {
    top: calc(8px + var(--luman-safe-top));
    left: 12px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .lpl-story-luman,
  .luman-viewer {
    --luman-story-w: min(380px, 42vw);
    --luman-story-h: min(680px, 85dvh);
  }
}

@media (min-width: 1025px) {
  .luman-viewer__track {
    gap: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

.lpl-story-luman,
.lpl-story-luman *,
.luman-viewer,
.luman-viewer * {
  box-sizing: border-box;
}

.lpl-story-luman {
  --luman-ring: linear-gradient(
    45deg,
    #f09433,
    #e6683c,
    #dc2743,
    #cc2366,
    #bc1888
  );
  --luman-bg: #000;
  --luman-text: #fff;
  --luman-muted: rgba(255, 255, 255, 0.65);
  --luman-accent: #0095f6;
  --luman-danger: #ed4956;
  --luman-radius: 12px;
  padding: 16px 0;
  background: #fff;
}

.lpl-story-luman__scroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 16px 8px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.lpl-story-luman__scroll::-webkit-scrollbar {
  display: none;
}

.luman-actions {
  justify-content: space-between;
  gap: 12px;
}

.luman-actions__comment-box {
  flex: 1;
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.85);
  padding: 0 16px;
  text-align: right;
  cursor: pointer;
  font: inherit;
}

.luman-actions__like {
  flex: 0 0 auto;
}

.luman-story-toast {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 100003;
  transform: translate(-50%, -50%);
  padding: 12px 18px;
  border-radius: 14px;
  background: rgba(17, 24, 39, 0.92);
  color: #fff;
  font-size: 14px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.25);
}

.luman-card__sound img {
  width: 18px;
  height: 18px;
  display: block;
  filter: brightness(0) invert(1);
}

.luman-comments__list li.is-pending {
  opacity: 0.48;
  position: relative;
}

.luman-comments__list li.is-pending::after {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 8px;
  border: 2px solid #d1d5db;
  border-top-color: var(--luman-accent);
  border-radius: 50%;
  animation: luman-spin 0.7s linear infinite;
  vertical-align: middle;
}

.luman-comments__loading,
.luman-comments__list li em {
  display: block;
  margin-top: 5px;
  color: #6b7280;
  font-size: 12px;
  font-style: normal;
}
a.luman-product:hover {
    color: white;
}
.luman-product__price--sale {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  direction: rtl;
  font-size: 0;
  line-height: 1.35;
}

.luman-product__price--sale del {
  color: rgba(255, 255, 255, 0.62);
  font-size: 10px;
  font-weight: 500;
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
  text-decoration-color: rgba(255, 255, 255, 0.88);
}

.luman-product__price--sale strong {
  color: #7ee081;
  font-size: 12px;
  font-weight: 800;
}

.luman-comments__list[hidden] {
  display: none !important;
}
