/* slider */

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  visibility: hidden;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal {
  position: relative;
  /* width: 90%; */
  height: 80%;
  max-width: 500px;
  background: none;
  padding: 20px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #fff;
  transform: translateX(10px);
}

.progress-container {
  display: flex;
  width: 100%;
  height: 4px;
  position: absolute;
  top: 0;
  left: 0;
}

#progressBar {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 10px;
  position: relative;
  z-index: 100;
  margin-top: -10px;
}

.progress-segment {
  flex: 1;
  height: 2px;
  background: #ddd;
  margin: 0 2px;
  border-radius: 2px;
  /* Разделяет полоски */
  transition: background 0.3s;
}

.progress-fill {
  width: 0%;
  height: 100%;
  background: var(--mainBlue);
  transition: width linear;
}

.progress-segment.active {
  background: var(--mainBlue);
}

.slider-container {
  width: 100%;
  height: 100%;
  position: relative;
}

.slider {
  list-style: none;
  width: 100%;
  display: flex;
  height: 100%;
  align-items: center;
}

.slick-prev:hover,
.slick-prev:focus,
.slick-next:hover,
.slick-next:focus {
  background: none;
  color: #000;
}

.slick-initialized .slick-slide {
  display: flex;
}

.slider li {
  width: 100%;
  height: 300px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.slider img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 10px;
}

.slick-prev,
.slick-next {
  position: absolute;
  top: 95%;
  transform: translateY(-50%);
  background: none;
  color: #000;
  border: none;
  padding: 10px;
  cursor: pointer;
  z-index: 10;
  font-size: 24px;
}

.slider-stories .slick-prev:before,
.slider-stories .slick-next:before {
  font-size: 46px;
}

.slider-stories .slick-prev,
.slider-stories .slick-next {
  top: 100% !important;
  transform: translate(0, 0) !important;
  width: auto;
  height: auto;
}

.slider-stories .slick-list {
  z-index: 15;
}

.slider-stories .slick-next {
  right: 0;
}

.slider-stories .slick-prev {
  left: 0;
}

#closeModal {
  top: 0;
  right: 0;
  font-size: 46px;
  z-index: 17 !important;
  height: 34px;
  width: 34px;
  background: #202020;
  border-radius: 30%;
  border: 1px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
}

#pausePlayBtn {
  position: absolute;
  top: 100%;
  left: 50%;
  background: none;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  font-size: 24px;
  z-index: 15;
}

.slide-action {
  position: absolute;
  bottom: 4%;
  background: #fff;
  border: none;
  padding: 10px;
  border-radius: 20px;
  font-size: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 15;
  cursor: pointer;
  box-shadow: 4px 4px 8px 0px rgba(34, 60, 80, 0.2);
}

.modal-page {
  position: absolute;
  left: 50%;
  transform: translateX(-50%) translateY(200%);
  z-index: 100;
  transition: all .3s;
  opacity: 0;
  z-index: 13;
}

.modal-page.active {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  width: 100%;
  height: 100%;
  background: #fff;
  z-index: 18;
  border-top-left-radius: 30px;
  border-top-right-radius: 30px;
  margin-top: 10px;
}

.modal-close {
  display: flex;
  justify-content: center;
  justify-self: flex-end;
  align-items: center;
  background-color: #000;
  border: 1px solid #fff;
  padding: 5px;
  border-radius: 10px;
  margin: 15px;
  margin-bottom: 5px;
}

.modal-content p {
  font-size: 20px;
  text-align: center;
}

.slick-prev {
  left: 25%;
}

.slick-next {
  right: 45%;
}

.stories-subtext {
  font-size: 30px;
  max-width: 1200px;
  margin: 0 auto;
  color: #000;
  margin-bottom: 100px;
}

.story-buttons {
  display: flex;
  gap: 50px;
  padding-bottom: 50px;
  padding-left: 100px;

  overflow-x: auto;
  cursor: grab;

  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding-right: 60px;
}

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

.story-buttons {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.story-buttons>* {
  flex: 0 0 auto;
  scroll-snap-align: start;
  -webkit-user-select: none;
  user-select: none;
}

.story-buttons>* .circle {
  width: 132px;
  height: 132px;
  min-width: 132px;
  min-height: 132px;
}

.story-buttons.dragging {
  cursor: grabbing;
  cursor: -webkit-grabbing;
}

.circle-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
  max-width: 130px;
}

.circle {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background-size: cover;
  border: 3px solid #334cdb;
  background-position: center;
  background-repeat: no-repeat;
  transition: all 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  background: #ececec;
  position: relative;
  z-index: 1;
}



.circle img {
  max-width: 122px;
  max-height: 122px;
}

.circle-text {
  margin-top: 10px;
  font-size: 16px;
  -webkit-box-ordinal-group: 3;
  -ms-flex-order: 2;
  order: 2;
  margin-top: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-family: 'Gilroy', sans-serif;
  font-style: normal;
  font-weight: 500;
  font-size: 14px;
  line-height: 17px;
  text-align: center;
  letter-spacing: -.02em;
  color: #202020;
  white-space: initial;
  max-width: 130px
}

.stories-modal .slider img {
  max-height: 790px;
  height: 100%;
  width: 100%;
}

/*Вероятная причина того что картинки не отображаются при первом открытии
из-за того что контейнеры слайдера не становятся максимальной ширины и принимают width: 0px;
Также вместо display:none; используем теперь visibility: hidden; у родительского блока чтобы не мешать slick создавать слайдер*/
.stories-modal .slick-track, 
.stories-modal .slick-list,
.stories-modal .story-slide {
  width: 100%;
}

.stories-modal .slick-slide {
  max-height: 790px;
  height: 100%;
}

.circle.clicked {
  border-color: gray;
}

/*Modal fix: 6.02.26*/
.stories-modal .modal {
  width: 100%;
  max-width: 500px;
  height: auto;
  max-height: 90vh;
  margin: auto;
  display: flex;
  flex-direction: column;
}

.stories-modal .slick-slide {
  height: 70vh;
  max-height: 70vh;
  min-height: 300px;
}

.stories-modal .slider img {
  height: 70vh;
  /* max-height: 70vh; */
  object-fit: contain;
}

.stories-modal .slider img,
.slider-stories .slick-list,
.slider-stories .slick-track,
.stories-modal .slick-slide {
  height: 100% !important;
  min-height: 80vh;
}
.stories-modal .slick-slide,
.stories-modal .slider img {
  max-height: unset !important;
}

@media (max-width: 800px) {
  .stories-modal .slick-slide {
    height: 65vh;
    max-height: 65vh;
  }
  
  .stories-modal .slider img {
    height: 65vh;
    max-height: 65vh;
  }

  .slider-stories .slick-prev,
  .slider-stories .slick-next{
    top: 0 !important;
    transform: none !important;
    width: 30%;
    position: absolute;
    font-size: 0;
    max-height: 790px;
    min-height: 100%;
    z-index: 16;
    height: auto;
  }

  .modal {
    max-width: 100vw;
    padding: 0;
  }

  #closeModal {
    top: 25px;
    right: 25px;
    font-size: 35px;
    transform: none;
    z-index: 17;
  }

  #pausePlayBtn {
    font-size: 0;
    width: 40%;
    transform: translateX(-50%);
    height: 86%;
    top: 2%;
  }
 
}

@media (max-width: 600px) {
  .stories-modal .slick-slide {
    height: 55vh;
    max-height: 55vh;
  }

  
  
  .stories-modal .slider img {
    height: 55vh;
    max-height: 55vh;
  }
}
/*Modal fix: 6.02.26*/

