﻿@font-face {
  font-family: "Bold";
  font-weight: normal;
  src: url("../fonts/Num-Bold.woff") format("woff");
}

@font-face {
  font-family: "Medium";
  font-weight: normal;
  src: url("../fonts/Num-Medium.woff") format("woff");
}

@font-face {
  font-family: "Light";
  font-weight: normal;
  src: url("../fonts/Num-Light.woff") format("woff");
}

.story-bar-wrapper {
  padding: 15px 10px;
  position: relative;
  margin: 10px auto;
  width: 100%;
}

.story-bar {
  display: flex;
  gap: 16px;
  cursor: grab;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 16px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  direction: rtl;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.story-bar::-webkit-scrollbar {
  display: none;
}

.story-bar:active {
  cursor: grabbing;
}

.story-circle-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  flex-shrink: 0;
}

.story-circle {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  transition: transform 0.2s ease;
}

.story-circle-wrap:hover .story-circle,
.story-circle-wrap:focus .story-circle {
  transform: scale(1.05);
}

.story-circle img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  display: block;
}

.story-circle-wrap.seen .story-circle {
  background: #ddd;
}

.story-cat-name {
  font-family: "Light";
  font-size: 14px;
  color: #222;
  max-width: 70px;
  text-align: center;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.story-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.story-modal.active {
  display: flex;
}

.story-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
}

.story-modal-content {
  position: relative;
  width: 100%;
  max-width: 400px;
  height: 90vh;
  max-height: 700px;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  z-index: 1;
}

.story-progress-bar {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  height: 3px;
  display: flex;
  flex-direction: row;
  direction: rtl;
  gap: 4px;
  z-index: 10;
}

.story-progress-segment {
  flex: 1;
  height: 100%;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.story-progress-fill {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 0%;
  background: #fff;
  border-radius: 3px;
}

.story-progress-segment.completed .story-progress-fill {
  width: 100%;
  transition: none;
}

.story-progress-segment.active .story-progress-fill {
  transition: width linear;
}

.story-close,
.story-prev,
.story-next {
  background: rgba(0, 0, 0, 0.11);
  backdrop-filter: blur(6px);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  color: white;
  padding: 0;
  z-index: 10;
}

.story-close:hover,
.story-prev:hover,
.story-next:hover,
.story-video-mute-icon:hover {
  background: rgba(0, 0, 0, 0.34);
}

.story-close {
  position: absolute;
  top: 30px;
  right: 16px;
}

.story-prev {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
}

.story-next {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
}

.story-slide {
  width: 100%;
  height: 100%;
  position: relative;
}

.story-slide-img {
  width: 100%;
  height: 100% !important;
  object-fit: cover;
  display: block;
}

.story-slide-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 16px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
  color: #fff;
  direction: rtl;
  text-align: right;
}

.story-slide-title {
  margin: 0 0 6px;
  font-family: "Bold";
  font-size: 16px;
  background: rgba(6, 6, 6, 0.46);
  backdrop-filter: blur(10px);
  padding: 5px 10px;
  width: auto;
  line-height: 1.7;
  border-radius: 4px;
  display: inline-block;
  border: 2px solid rgba(6, 6, 6, 0.15);
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

.story-slide-text {
  margin: 0 0 10px;
  font-family: "Medium";
  font-size: 12px;
  line-height: 1.6;
  opacity: 0.9;
  backdrop-filter: blur(10px);
  background: rgba(173, 173, 173, 0.15);
  padding: 10px;
  border-radius: 4px;
  color: #fff;
  text-align: justify;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(173, 173, 173, 0.15);
}

.story-slide-link {
  display: inline-block;
  background: rgb(255, 255, 255);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #0f0e0e;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 12px;
  text-decoration: none;
  float: left;
}

.story-slide-link:hover {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.42);
}

.story-slide-link:empty {
  display: none;
}

.story-video-mute-icon {
  position: absolute;
  top: 30px;
  left: 20px;
  z-index: 20;
  background: rgba(0, 0, 0, 0.11);
  backdrop-filter: blur(4px);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 24px;
  color: white;
}

.story-video-mute-icon svg {
  width: 24px;
  height: 24px;
  fill: white;
}

@media (max-width: 480px) {
  .story-modal-content {
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
  }
}