/* Голосование — конкурс талантов */

.avod-vote {
  margin-top: 8px;
  --avod-vote-gap: 16px;
  --avod-vote-per-view: 1;
}

.avod-vote__slider {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

.avod-vote__viewport {
  min-width: 0;
  overflow: visible;
  border-radius: 22px;
  cursor: default;
}

.avod-vote__viewport.is-dragging {
  cursor: grabbing;
  user-select: none;
}

.avod-vote__viewport.is-static {
  cursor: default;
}

.avod-vote__track {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  justify-content: center;
  gap: 24px;
}

.avod-vote__track.is-dragging {
  transition: none;
}

.avod-vote__slide {
  min-width: 0;
  box-sizing: border-box;
}

.avod-vote__card {
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 22px;
  overflow: hidden;
}

.avod-vote__photo {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  max-height: 420px;
  background: linear-gradient(180deg, rgba(1, 171, 255, 0.08), rgba(246, 251, 255, 1));
}

.avod-vote__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.avod-vote__photo--has-video {
  cursor: pointer;
}

.avod-vote__play.video-card__play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(1, 171, 255, 0.35);
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  box-shadow: 0 8px 24px rgba(16, 41, 64, 0.14);
  z-index: 1;
}

.avod-vote__play.video-card__play:hover {
  transform: scale(1.06);
  background: #fff;
  border-color: #01abff;
}

.avod-vote__play .video-card__play-icon {
  display: block;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 14px solid #01abff;
  margin-left: 3px;
}

.avod-vote__video-viewer {
  position: fixed;
  inset: 0;
  z-index: 10060;
  display: none;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.92);
}

.avod-vote__video-viewer.is-open {
  display: flex;
}

.avod-vote__video-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  max-height: 100%;
}

.avod-vote__video {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  background: #000;
  border-radius: 15px;
}

.avod-vote__video-stage:fullscreen,
.avod-vote__video-stage:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  background: #000;
}

.avod-vote__video-stage:fullscreen .avod-vote__video,
.avod-vote__video-stage:-webkit-full-screen .avod-vote__video {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  border-radius: 0;
}

/* Встроенный плеер RuTube */
.avod-vote__video-embed {
  display: none;
  border: 0;
  border-radius: 15px;
  background: #000;
}

.avod-vote__video-viewer.is-embed .avod-vote__video,
.avod-vote__video-viewer.is-embed .avod-vote__video-controls,
.avod-vote__video-viewer.is-embed .avod-vote__video-bigplay {
  display: none;
}

.avod-vote__video-viewer.is-embed .avod-vote__video-embed {
  display: block;
  width: min(92vw, 1180px);
  max-width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 86vh;
}

/* Вертикальные ролики RuTube (shorts) — портретный формат 9:16 */
.avod-vote__video-viewer.is-embed.is-embed-vertical .avod-vote__video-embed {
  width: min(92vw, 48vh);
  aspect-ratio: 9 / 16;
  max-height: 90vh;
}

/* Кастомное меню управления видео */
.avod-vote__video-bigplay {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 76px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  cursor: pointer;
  z-index: 2;
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.avod-vote__video-bigplay svg {
  width: 40px;
  height: 40px;
  fill: currentColor;
  margin-left: 4px;
}

.avod-vote__video-bigplay:hover {
  background: rgba(0, 0, 0, 0.62);
  transform: scale(1.05);
}

.avod-vote__video-viewer.is-playing .avod-vote__video-bigplay {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8);
}

.avod-vote__video-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 28px 14px 12px;
  box-sizing: border-box;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0));
  border-radius: 0 0 15px 15px;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.avod-vote__video-stage:fullscreen .avod-vote__video-controls,
.avod-vote__video-stage:-webkit-full-screen .avod-vote__video-controls {
  border-radius: 0;
  padding-bottom: calc(14px + env(safe-area-inset-bottom));
}

.avod-vote__video-viewer.is-controls-hidden .avod-vote__video-controls {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

.avod-vote__video-viewer.is-controls-hidden .avod-vote__video-close {
  opacity: 0;
  pointer-events: none;
}

.avod-vote__video-viewer.is-controls-hidden {
  cursor: none;
}

.avod-vote__vctrl {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.avod-vote__vctrl:hover {
  background: rgba(255, 255, 255, 0.18);
}

.avod-vote__vctrl:active {
  transform: scale(0.92);
}

.avod-vote__vctrl svg {
  display: block;
  width: 24px;
  height: 24px;
  fill: currentColor;
  pointer-events: none;
}

.avod-vote__video-time {
  flex-shrink: 0;
  min-width: 42px;
  color: #fff;
  font-size: 13px;
  line-height: 1;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.avod-vote__video-bar {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.28);
}

.avod-vote__video-bar-buffered,
.avod-vote__video-bar-played {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  border-radius: 3px;
  pointer-events: none;
}

.avod-vote__video-bar-buffered {
  background: rgba(255, 255, 255, 0.42);
}

.avod-vote__video-bar-played {
  background: #01abff;
}

.avod-vote__video-seek {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  height: 20px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.avod-vote__video-seek::-webkit-slider-runnable-track {
  background: transparent;
}

.avod-vote__video-seek::-moz-range-track {
  background: transparent;
}

.avod-vote__video-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border: none;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}

.avod-vote__video-seek::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: none;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}

.avod-vote__video-volume {
  flex-shrink: 0;
  width: 84px;
  height: 6px;
  margin: 0;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.avod-vote__video-volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border: none;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.avod-vote__video-volume::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: none;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.avod-vote__video-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease;
}

.avod-vote__video-close::before,
.avod-vote__video-close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 2px;
  background: currentColor;
}

.avod-vote__video-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.avod-vote__video-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.avod-vote__video-close:hover {
  background: rgba(255, 255, 255, 0.28);
}

body.avod-vote-video-open {
  overflow: hidden;
}

body.avod-vote-video-open jdiv,
body.avod-vote-video-open [class*="jdiv"] {
  display: none !important;
}

.avod-vote__like {
  --avod-heart: #ff3b5c;
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 24px rgba(16, 41, 64, 0.14);
  cursor: pointer;
  color: rgba(15, 44, 64, 0.92);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.avod-vote__like:hover {
  transform: translateY(-1px);
}

.avod-vote__like:active {
  transform: scale(0.96);
}

.avod-vote__like.is-active {
  color: var(--avod-heart);
}

.avod-vote__like:disabled {
  opacity: 0.65;
  cursor: wait;
}

.avod-vote__like-icon {
  position: relative;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23ff3b5c' stroke-width='2' d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Заполненное сердце — появляется при активном лайке */
.avod-vote__like-icon::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23ff3b5c' d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/%3E%3C/svg%3E") center / contain no-repeat;
  transform: scale(0);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

/* Кольцо-вспышка вокруг сердца */
.avod-vote__like-icon::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px solid var(--avod-heart);
  transform: scale(0.3);
  opacity: 0;
  pointer-events: none;
}

.avod-vote__like.is-active .avod-vote__like-icon::before {
  opacity: 1;
  transform: scale(1);
  animation: avodHeartPop 0.5s cubic-bezier(0.2, 0.8, 0.3, 1.2);
}

.avod-vote__like.is-active .avod-vote__like-icon::after {
  animation: avodHeartBurst 0.55s ease-out;
}

@keyframes avodHeartPop {
  0% {
    transform: scale(0);
  }
  40% {
    transform: scale(1.35);
  }
  65% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes avodHeartBurst {
  0% {
    transform: scale(0.3);
    opacity: 0.55;
  }
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .avod-vote__like-icon::before {
    transition: none;
  }

  .avod-vote__like.is-active .avod-vote__like-icon::before,
  .avod-vote__like.is-active .avod-vote__like-icon::after {
    animation: none;
  }
}

.avod-vote__desc {
  padding: 16px 18px 20px;
  font-size: 15px;
  line-height: 1.55;
  color: rgba(34, 48, 62, 0.88);
  text-align: center;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
  /* максимум 2 строки — без многоточия и без бесконечного роста блока;
     JS дополнительно уменьшает шрифт, чтобы длинный текст уместился */
  max-height: calc(1.55em * 2 + 36px);
}

.avod-vote__arrow {
  position: relative;
  z-index: 3;
  flex-shrink: 0;
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: #01abff;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(16, 41, 64, 0.08);
  transition: background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.avod-vote__arrow-icon {
  display: block;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  pointer-events: none;
}

.avod-vote__arrow:hover:not(:disabled) {
  background: rgb(43 185 255);
}

.avod-vote__arrow:hover:not(:disabled) svg {
    color: #fff;
}

.avod-vote__arrow:disabled {
  opacity: 0.35;
  cursor: default;
}

.avod-vote__slider.is-static .avod-vote__arrow {
  display: none;
}

.avod-vote__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: none;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 0;
  margin: 0 auto;
  overflow: hidden;
}

/* Динамическая пагинация (много слайдов): окно из нескольких точек со скользящей лентой */
.avod-vote__dots.is-dynamic {
  justify-content: flex-start;
  flex-wrap: nowrap;
}

.avod-vote__dots-track {
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.3s ease;
  will-change: transform;
}

.avod-vote__slider.is-static .avod-vote__dots {
  display: none;
}

.avod-vote__dot {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(1, 171, 255, 0.25);
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}

.avod-vote__dot:hover {
  background: rgba(1, 171, 255, 0.45);
}

.avod-vote__dot.is-edge {
  transform: scale(0.66);
}

.avod-vote__dot.is-edge-sm {
  transform: scale(0.4);
}

.avod-vote__dot.is-active {
  background: #01abff;
  transform: scale(1.15);
}

.avod-vote__dot.is-active.is-edge,
.avod-vote__dot.is-active.is-edge-sm {
  transform: scale(1.15);
}

.avod-vote__toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 10050;
  max-width: min(92vw, 420px);
  padding: 12px 18px;
  border-radius: 12px;
  background: rgba(15, 44, 64, 0.94);
  color: #fff;
  font-size: 14px;
  line-height: 1.45;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.avod-vote__toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 768px) {
    .avod-vote__video-viewer {
      padding: 24px;
    }

  .avod-vote__video-volume {
    display: none;
  }

  .avod-vote__video-controls {
    gap: 4px;
    padding: 26px 8px 10px;
  }

  .avod-vote__vctrl {
    width: 38px;
    height: 38px;
  }

  .avod-vote__video-time {
    min-width: 36px;
    font-size: 12px;
  }
  .avod-vote.is-mobile-slider .avod-vote__slider {
    display: block;
    padding-bottom: 28px;
  }

  .avod-vote.is-mobile-slider .avod-vote__viewport {
    width: 100%;
    min-width: 0;
    overflow: hidden;
    cursor: grab;
    touch-action: pan-y;
  }

  .avod-vote.is-mobile-slider .avod-vote__track {
    display: flex;
    grid-template-columns: none;
    justify-content: flex-start;
    gap: 0;
    width: 100%;
    min-width: 100%;
    transition: transform 0.45s ease;
    will-change: transform;
  }

  .avod-vote.is-mobile-slider .avod-vote__slide {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 8px;
  }

  .avod-vote.is-mobile-slider .avod-vote__card,
  .avod-vote.is-mobile-slider .avod-vote__photo {
    width: 100%;
    max-width: none;
  }

  .avod-vote.is-mobile-slider .avod-vote__photo {
    max-height: none;
  }

  .avod-vote.is-mobile-slider .avod-vote__arrow {
    position: absolute;
    top: 50%;
    display: flex;
    width: 40px;
    height: 40px;
    transform: translateY(-50%);
  }

  .avod-vote.is-mobile-slider .avod-vote__arrow--prev {
    left: 0;
  }

  .avod-vote.is-mobile-slider .avod-vote__arrow--next {
    right: 0;
  }

  .avod-vote.is-mobile-slider .avod-vote__dots {
    display: flex;
  }

  .avod-vote.is-mobile-slider .avod-vote__play.video-card__play {
    width: 46px;
    height: 46px;
  }
}