/* FMT Video Stories — scoped to .fmt-stories / .fmt-story-viewer */
.fmt-stories {
  --fmt-accent: #d40000;
  --fmt-bg: #161616;
  --fmt-ink: #f3f3f3;
  --fmt-muted: #b5b5b5;
  --fmt-ring: rgba(255, 255, 255, 0.2);
  --fmt-gap: 10px;
  --fmt-pad: 12px;
  --fmt-story-ring: conic-gradient(from 0deg, #ff9a1f 0deg, #ff4d00 48deg, #fd1d55 96deg, #e1306c 140deg, #c13584 184deg, #833ab4 232deg, #5851db 286deg, #4f7cff 328deg, #ff9a1f 360deg);
  --btn-bgcolor: transparent;
  --btn-bgcolor-hover: transparent;
  --btn-color: var(--fmt-ink);
  --btn-color-hover: var(--fmt-ink);
  --btn-brd-color: transparent;
  --btn-brd-color-hover: transparent;
  --btn-box-shadow-hover: none;
  direction: rtl;
  background: var(--fmt-bg);
  color: var(--fmt-ink);
  font-family: IRansansX, IRANSansX, Tahoma, sans-serif;
  padding: 16px 0 12px;
  overflow: hidden;
}
.fmt-stories *,
.fmt-story-viewer * {
  box-sizing: border-box;
}
.fmt-stories__inner {
  width: 100%;
  max-width: 1222px;
  margin: 0 auto;
  padding: 0 var(--fmt-pad);
}
.fmt-stories__row {
  position: relative;
}
.fmt-stories__track {
  display: flex;
  flex-direction: row;
  gap: var(--fmt-gap);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 10px 2px 8px;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
}
.fmt-stories__track::-webkit-scrollbar {
  display: none;
}
.fmt-stories__item {
  flex: 0 0 calc((100% - (3 * var(--fmt-gap))) / 4);
  max-width: calc((100% - (3 * var(--fmt-gap))) / 4);
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  background-color: transparent;
  background-image: none;
  border: 0;
  border-color: transparent;
  box-shadow: none;
  padding: 0;
  margin: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: center;
  min-width: 0;
  overflow: visible;
  outline: none;
  filter: none;
  transform: none;
  -webkit-tap-highlight-color: transparent;
}
.fmt-stories button.fmt-stories__item,
.fmt-stories button.fmt-stories__item:hover,
.fmt-stories button.fmt-stories__item:focus,
.fmt-stories button.fmt-stories__item:focus-visible,
.fmt-stories button.fmt-stories__item:active {
  appearance: none !important;
  -webkit-appearance: none !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-color: transparent !important;
  box-shadow: none !important;
  color: inherit !important;
  outline: none;
  filter: none;
  transform: none !important;
}
.fmt-stories button.fmt-stories__item::-moz-focus-inner {
  border: 0;
  padding: 0;
}
.fmt-stories__avatar {
  position: relative;
  width: min(84px, 86%);
  aspect-ratio: 1 / 1;
  flex: 0 0 auto;
  border-radius: 50%;
  overflow: visible;
  isolation: isolate;
  transition: transform 0.25s ease;
}
.fmt-stories__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--fmt-story-ring);
  box-shadow: 0 0 8px rgba(225, 48, 108, 0.38), 0 0 14px rgba(255, 122, 24, 0.18);
  animation: fmt-ring-spin 12s linear infinite;
  transition: box-shadow 0.25s ease, filter 0.25s ease;
}
.fmt-stories__thumb {
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--fmt-bg);
  padding: 2px;
  overflow: hidden;
  z-index: 1;
}
.fmt-stories__item:hover .fmt-stories__avatar,
.fmt-stories__item:focus-visible .fmt-stories__avatar {
  transform: scale(1.04);
}
.fmt-stories__item:hover .fmt-stories__ring,
.fmt-stories__item:focus-visible .fmt-stories__ring {
  box-shadow: 0 0 10px rgba(225, 48, 108, 0.55), 0 0 18px rgba(255, 122, 24, 0.32), 0 0 28px rgba(83, 81, 219, 0.22);
  filter: brightness(1.12) saturate(1.15);
}
.fmt-stories__item:hover .fmt-stories__thumb img,
.fmt-stories__item:hover .fmt-stories__ph,
.fmt-stories__item:focus-visible .fmt-stories__thumb img,
.fmt-stories__item:focus-visible .fmt-stories__ph {
  filter: brightness(1.08) saturate(1.12);
}
.fmt-stories__item:focus-visible {
  outline: none;
}
.fmt-stories__thumb img,
.fmt-stories__ph {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  transition: filter 0.25s ease;
}
.fmt-stories__ph {
  background: linear-gradient(145deg, #2a2a2a, #1a1a1a 55%, #3a1010);
}
.fmt-stories__item.is-seen .fmt-stories__ring {
  background: #4a4a4a;
  box-shadow: none;
  animation: none;
  filter: none;
}
.fmt-stories__item.is-seen:hover .fmt-stories__ring,
.fmt-stories__item.is-seen:focus-visible .fmt-stories__ring {
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.12);
  filter: brightness(1.15);
}
.fmt-stories__title {
  font-size: 11.5px;
  line-height: 1.25;
  color: var(--fmt-ink);
  max-width: 100%;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.fmt-stories__empty {
  color: var(--fmt-muted);
  font-size: 13px;
  text-align: center;
  padding: 18px 8px 12px;
  margin: 0;
}
.fmt-stories__nav {
  display: none;
  position: absolute;
  top: 28px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--fmt-ring);
  background: rgba(22, 22, 22, 0.88);
  color: #fff;
  cursor: pointer;
  z-index: 2;
  align-items: center;
  justify-content: center;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: none;
}
.fmt-stories button.fmt-stories__nav,
.fmt-stories button.fmt-stories__nav:hover,
.fmt-stories button.fmt-stories__nav:focus,
.fmt-stories button.fmt-stories__nav:focus-visible,
.fmt-stories button.fmt-stories__nav:active {
  appearance: none !important;
  -webkit-appearance: none !important;
  background: rgba(22, 22, 22, 0.88) !important;
  background-color: rgba(22, 22, 22, 0.88) !important;
  background-image: none !important;
  box-shadow: none !important;
  color: #fff !important;
  outline: none;
}
.fmt-stories button.fmt-stories__nav:hover,
.fmt-stories button.fmt-stories__nav:focus-visible {
  border-color: var(--fmt-accent) !important;
  background: rgba(22, 22, 22, 0.95) !important;
  background-color: rgba(22, 22, 22, 0.95) !important;
}
.fmt-stories__nav.is-disabled {
  display: none;
}
.fmt-stories__nav--prev {
  inset-inline-start: -4px;
}
.fmt-stories__nav--next {
  inset-inline-end: -4px;
}
.fmt-stories__nav svg {
  width: 14px;
  height: 14px;
  display: block;
}
@keyframes fmt-ring-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (min-width: 768px) {
  .fmt-stories {
    --fmt-gap: 14px;
    --fmt-pad: 15px;
    padding: 20px 0 16px;
  }
  .fmt-stories__item {
    flex-basis: calc((100% - (5 * var(--fmt-gap))) / 6);
    max-width: calc((100% - (5 * var(--fmt-gap))) / 6);
  }
  .fmt-stories__avatar {
    width: min(92px, 78%);
  }
  .fmt-stories__title {
    font-size: 12.5px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .fmt-stories__ring {
    animation: none;
  }
  .fmt-stories__avatar {
    transition: none;
  }
  .fmt-stories__item:hover .fmt-stories__avatar {
    transform: none;
  }
  .fmt-story-viewer__progress-fill {
    transition: none;
  }
}
.fmt-story-viewer {
  --btn-bgcolor: transparent;
  --btn-bgcolor-hover: transparent;
  --btn-color: #fff;
  --btn-color-hover: #fff;
  --btn-brd-color: transparent;
  --btn-brd-color-hover: transparent;
  --btn-box-shadow-hover: none;
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  background: rgba(10, 10, 10, 0.98);
  display: none;
  align-items: center;
  justify-content: center;
  font-family: IRansansX, IRANSansX, Tahoma, sans-serif;
  color: #f3f3f3;
  direction: rtl;
}
.fmt-story-viewer.is-open {
  display: flex;
}
.fmt-story-viewer__stage {
  position: relative;
  width: min(100%, 520px);
  height: min(100%, 920px);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  padding: 12px 12px 18px;
}
.fmt-story-viewer__progress {
  display: flex;
  gap: 4px;
  margin: 0 0 10px;
}
.fmt-story-viewer__tick {
  flex: 1;
  height: 3px;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 99px;
  overflow: hidden;
}
.fmt-story-viewer__progress-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: #fff;
  transform-origin: right center;
}
.fmt-story-viewer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.fmt-story-viewer__name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fmt-story-viewer__tools {
  display: flex;
  gap: 6px;
  flex: 0 0 auto;
}
.fmt-story-viewer__btn {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.fmt-story-viewer__btn:hover,
.fmt-story-viewer__btn:focus-visible {
  background: rgba(212, 0, 0, 0.9);
  outline: none;
}
.fmt-story-viewer__btn svg {
  width: 18px;
  height: 18px;
  display: block;
}
.fmt-story-viewer__frame {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111;
  border-radius: 12px;
  overflow: hidden;
}
.fmt-story-viewer__video {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  background: #111;
}
.fmt-story-viewer__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}
.fmt-story-viewer__poster.is-image-slide {
  z-index: 2;
  background: #000;
}
.fmt-story-viewer__video[hidden] {
  display: none !important;
}
.fmt-story-viewer__msg {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  color: #f3f3f3;
  font-size: 14px;
  z-index: 4;
  background: rgba(12, 12, 12, 0.72);
  pointer-events: none;
}
.fmt-story-viewer__msg.is-visible {
  display: flex;
}
body.fmt-story-lock {
  overflow: hidden;
}
body.fmt-story-lock .whb-header,
body.fmt-story-lock .wd-toolbar {
  visibility: hidden;
}
.fmt-story-viewer__hit {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  z-index: 5;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background: rgba(0, 0, 0, 0.45) !important;
  background-color: rgba(0, 0, 0, 0.45) !important;
  background-image: none !important;
  border: 1px solid rgba(255, 255, 255, 0.28) !important;
  border-radius: 50% !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  color: #fff !important;
  cursor: pointer;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  outline: none;
  filter: none;
  -webkit-tap-highlight-color: transparent;
}
.fmt-story-viewer button.fmt-story-viewer__hit:hover,
.fmt-story-viewer button.fmt-story-viewer__hit:focus,
.fmt-story-viewer button.fmt-story-viewer__hit:focus-visible,
.fmt-story-viewer button.fmt-story-viewer__hit:active {
  appearance: none !important;
  -webkit-appearance: none !important;
  background: rgba(212, 0, 0, 0.9) !important;
  background-color: rgba(212, 0, 0, 0.9) !important;
  background-image: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
  color: #fff !important;
  outline: none;
  transform: translateY(-50%);
}
.fmt-story-viewer__hit::-moz-focus-inner {
  border: 0;
  padding: 0;
}
.fmt-story-viewer__hit svg {
  width: 18px;
  height: 18px;
  display: block;
  pointer-events: none;
}
/* Physical sides: left = next, right = previous. */
.fmt-story-viewer__hit--prev {
  right: 10px;
  left: auto;
}
.fmt-story-viewer__hit--next {
  left: 10px;
  right: auto;
}
.fmt-story-viewer__hit--prev svg {
  transform: scaleX(-1);
}
.fmt-story-viewer__status {
  margin-top: 8px;
  font-size: 12px;
  color: #b5b5b5;
  min-height: 1.2em;
}
@media (max-width: 767px) {
  .fmt-stories__item:nth-child(n + 5) {
    display: none !important;
  }
  .fmt-story-viewer__stage {
    width: 100%;
    height: 100%;
    padding: 10px 8px 16px;
  }
  .fmt-story-viewer__frame {
    border-radius: 0;
  }
}
