/* Встраиваемый плеер плейлиста. Не привязан к странице. */

.uv-player {
  box-sizing: border-box;
  background: #fff;
  padding: 2rem 1rem;
  min-height: 360px;
}

.uv-player[hidden] {
  display: none;
}

.uv-player *,
.uv-player *::before,
.uv-player *::after {
  box-sizing: border-box;
}

.uv-player__inner {
  max-width: 1180px;
  margin: 0 auto;
}

.uv-player__title {
  margin: 0 0 1rem;
  color: #815583;
  font-family: var(--t-text-font, "TildaSans", "Tilda Sans", Arial, sans-serif);
  font-size: 30px;
  font-weight: 400;
  line-height: 1.3;
  text-align: center;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.uv-player__layout {
  display: flex;
  flex-direction: column;
}

.uv-player__stage {
  min-width: 0;
  margin: 0 0 16px;
}

.uv-player__frame {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%;
  overflow: hidden;
  border: 1px solid rgba(129, 85, 131, 0.12);
  border-radius: 24px;
  background: #f4eee9;
  background: linear-gradient(180deg, #fbf7f3 0%, #f4eee9 100%);
  box-shadow: 0 16px 36px rgba(129, 85, 131, 0.08);
}

.uv-player__slot,
.uv-player__iframe,
.uv-player__loading {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

.uv-player__slot {
  z-index: 1;
  top: -1px;
  right: -1px;
  bottom: -1px;
  left: -1px;
  overflow: hidden;
}

.uv-player__iframe {
  z-index: 2;
  width: 100%;
  height: 100%;
  border: 0;
}

.uv-player__loading {
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 1.5rem;
  color: #815583;
  font-family: var(--t-text-font, "TildaSans", "Tilda Sans", Arial, sans-serif);
  font-size: 22px;
  font-weight: 300;
  line-height: 1.3;
  text-align: center;
}

.uv-player__loading[hidden] {
  display: none;
}

.uv-player__loading-cover {
  position: absolute;
  z-index: 4;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 16px;
  box-sizing: border-box;
  background: #fbf7f3;
  text-align: center;
  transform: translateZ(0);
}

.uv-player__loading-cover[hidden] {
  display: none;
}

.uv-player__loading-cover-text {
  margin: 0;
  color: #815583;
  font-family: "TildaSans", "Tilda Sans", Arial, sans-serif;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.35;
}

.uv-player__loading-cover-gif {
  display: block;
  width: 72px;
  height: auto;
}

.uv-player__loading-cover-gif[hidden] {
  display: none;
}

.uv-player__loading-retry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 12px 22px;
  border: 0;
  border-radius: 20px;
  background: #815583;
  color: #fff;
  font-family: "TildaSans", "Tilda Sans", Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.25;
  cursor: pointer;
}

.uv-player__loading-retry[hidden] {
  display: none;
}

.uv-player__loading-retry:hover {
  background: #7a527b;
}

.uv-player__loading-retry:focus-visible {
  outline: 2px solid #815583;
  outline-offset: 2px;
}

.uv-player__next {
  position: absolute;
  z-index: 5;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 16px;
  background: #fbf7f3;
  text-align: center;
}

.uv-player__next[hidden] {
  display: none;
}

.uv-player__next-text {
  margin: 0;
  max-width: 16em;
  min-height: 2.7em;
  visibility: hidden;
  color: #815583;
  font-family: "TildaSans", "Tilda Sans", Arial, sans-serif;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.35;
}

.uv-player__next-text.is-shown {
  visibility: visible;
}

.uv-player__next-invite {
  margin: 0;
  max-width: 16em;
  color: #815583;
  font-family: "TildaSans", "Tilda Sans", Arial, sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.35;
}

.uv-player__next-invite[hidden] {
  display: none;
}

.uv-player__next-invite-link {
  color: #815583;
  font-weight: 500;
  text-underline-offset: 3px;
}

.uv-player__next-invite-link:hover,
.uv-player__next-invite-link:focus {
  text-decoration: none;
}

.uv-player__next-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: #815583;
  font-family: "TildaSans", "Tilda Sans", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.3;
  cursor: pointer;
}

.uv-player__next-toggle[hidden] {
  display: none;
}

.uv-player__next-check {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.uv-player__next-switch {
  position: relative;
  flex: 0 0 auto;
  width: 52px;
  height: 28px;
  border-radius: 999px;
  background: #cfc6cf;
  -webkit-transition: background-color 0.2s ease;
  transition: background-color 0.2s ease;
}

.uv-player__next-switch:before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(90, 60, 90, 0.28);
  -webkit-transition: -webkit-transform 0.2s ease;
  transition: transform 0.2s ease;
}

.uv-player__next-check:checked + .uv-player__next-switch {
  background: #815583;
}

.uv-player__next-check:checked + .uv-player__next-switch:before {
  -webkit-transform: translateX(24px);
  transform: translateX(24px);
}

.uv-player__next-check:focus + .uv-player__next-switch {
  outline: 2px solid #815583;
  outline-offset: 3px;
}

.uv-player__sources {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  margin-top: 16px;
}

.uv-player__toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.uv-player__tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 1 auto;
  min-height: 48px;
  margin: 0 8px 8px 0;
  padding: 0.75rem 1.25rem;
  color: #815583;
  background: #f4eee9;
  border: 1px solid rgba(129, 85, 131, 0.18);
  border-radius: 20px;
  cursor: pointer;
  font-family: "TildaSans", "Tilda Sans", Arial, sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  touch-action: manipulation;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.uv-player__toggle:checked + .uv-player__tab {
  color: #fff;
  background: #815583;
  border-color: #815583;
  box-shadow: 0 10px 22px rgba(129, 85, 131, 0.18);
}

.uv-player__toggle:disabled + .uv-player__tab {
  color: #8f7592;
  background: #f7f3ef;
  border-color: rgba(129, 85, 131, 0.12);
  cursor: default;
  box-shadow: none;
}

.uv-player__toggle:focus + .uv-player__tab {
  outline: 2px solid #815583;
  outline-offset: 2px;
}

.uv-player__playlist {
  min-width: 0;
  max-height: 50vh;
  padding: 12px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(129, 85, 131, 0.48);
  border-radius: 24px;
  background: #fbf7f3;
  scrollbar-width: thin;
  scrollbar-color: rgba(129, 85, 131, 0.4) transparent;
}

/* Свой скролл есть: колесо над списком не двигает страницу. */
.uv-player__playlist.is-scrollable {
  overscroll-behavior: contain;
}

.uv-player__playlist::-webkit-scrollbar {
  width: 8px;
}

.uv-player__playlist::-webkit-scrollbar-thumb {
  background: rgba(129, 85, 131, 0.35);
  border-radius: 8px;
}

.uv-player__playlist-head {
  padding: 6px 8px 10px;
}

.uv-player__playlist-title {
  margin: 0;
  color: #815583;
  font-family: "TildaSans", "Tilda Sans", Arial, sans-serif;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.3;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.uv-player__count {
  margin: 2px 0 0;
  color: #815583;
  font-family: "TildaSans", "Tilda Sans", Arial, sans-serif;
  font-size: 14px;
  font-weight: 300;
  line-height: 1.3;
}

.uv-player--single .uv-player__count,
.uv-player--single .uv-player__playlist {
  display: none;
}

.uv-player__list {
  list-style: none;
  margin: 0;
  padding: 2px;
}

.uv-player__list li {
  margin: 0 0 4px;
}

.uv-player__list li:last-child {
  margin-bottom: 0;
}

.uv-player__item {
  display: flex;
  align-items: flex-start;
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 10px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: #815583;
  cursor: pointer;
  font-family: "TildaSans", "Tilda Sans", Arial, sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
  text-align: left;
  -webkit-appearance: none;
  appearance: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.uv-player__item::-moz-focus-inner {
  border: 0;
}

.uv-player__item.is-active {
  background: #815583;
  color: #fff;
}

.uv-player__item:focus {
  outline: 2px solid #815583;
  outline-offset: -2px;
}

.uv-player__item.is-active:focus {
  outline-color: #fff;
}

.uv-player__index {
  display: inline-block;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  margin: 0 10px 0 0;
  border-radius: 50%;
  background: rgba(129, 85, 131, 0.12);
  font-size: 13px;
  font-weight: 500;
  line-height: 28px;
  text-align: center;
}

.uv-player__item.is-active .uv-player__index {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.uv-player__item-title {
  flex: 1 1 auto;
  min-width: 0;
  padding-top: 4px;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.uv-player__empty,
.uv-player__fallback {
  margin: 0;
  color: #815583;
  font-family: var(--t-text-font, "TildaSans", "Tilda Sans", Arial, sans-serif);
  font-size: 20px;
  font-weight: 300;
  line-height: 1.4;
  text-align: center;
}

.uv-player__fallback a {
  color: #815583;
  margin: 0 0.75rem;
}

.uv-player__fallback a:hover,
.uv-player__fallback a:focus {
  text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
  .uv-player__tab:hover {
    border-color: rgba(129, 85, 131, 0.32);
  }

  .uv-player__toggle:checked + .uv-player__tab:hover {
    border-color: #815583;
  }

  .uv-player__toggle:disabled + .uv-player__tab:hover {
    border-color: rgba(129, 85, 131, 0.12);
  }

  .uv-player__item:hover {
    background: rgba(129, 85, 131, 0.08);
  }

  .uv-player__item.is-active:hover {
    background: #815583;
  }
}

@supports selector(:focus-visible) {
  .uv-player__toggle:focus:not(:focus-visible) + .uv-player__tab {
    outline: none;
  }

  .uv-player__item:focus:not(:focus-visible) {
    outline: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .uv-player__tab,
  .uv-player__item,
  .uv-player__next-switch,
  .uv-player__next-switch:before {
    -webkit-transition: none;
    transition: none;
  }
}

@media (forced-colors: active) {
  .uv-player__item.is-active,
  .uv-player__toggle:checked + .uv-player__tab {
    outline: 2px solid CanvasText;
  }
}

@media screen and (min-width: 960px) {
  .uv-player {
    min-height: 520px;
  }

  .uv-player__layout {
    flex-direction: row;
    align-items: flex-start;
  }

  .uv-player__stage {
    flex: 1 1 auto;
    margin: 0 16px 0 0;
  }

  .uv-player--single .uv-player__stage {
    margin-right: 0;
  }

  .uv-player__playlist {
    flex: 0 0 300px;
    width: 300px;
    max-height: calc(100vh - 80px);
    position: -webkit-sticky;
    position: sticky;
    top: 12px;
  }
}

@media screen and (max-width: 639px) {
  .uv-player__title {
    font-size: 26px;
  }

  .uv-player__tab {
    flex: 1 1 40%;
    min-width: 0;
    padding: 0.75rem 1rem;
  }

  .uv-player__loading {
    font-size: 20px;
  }
}

@media screen and (max-width: 479px) {
  .uv-player {
    padding: 1.5rem 0.75rem;
  }

  .uv-player__title {
    font-size: 24px;
  }

  .uv-player__tab {
    flex-basis: 100%;
    margin-right: 0;
  }

  .uv-player__frame,
  .uv-player__playlist {
    border-radius: 18px;
  }

  .uv-player__empty,
  .uv-player__fallback {
    font-size: 18px;
  }
}

/* Лента превью. Обычный плеер эти классы не использует. */

.uv-player.uv-player--reel {
  min-height: 0;
  padding: 1.35rem 0 1rem;
  background: #f4eee9;
  overflow: hidden;
}

.uv-player--reel .uv-player__inner {
  max-width: none;
}

.uv-player__reel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1100px;
  margin: 0 auto 0.85rem;
  padding: 0 16px;
}

.uv-player--reel .uv-player__title {
  flex: 1 1 auto;
  margin: 0;
  font-size: 22px;
  text-align: left;
}

.uv-player__reel-sources {
  flex: 0 0 auto;
  margin: 0;
}

.uv-player--reel .uv-player__tab {
  flex: 0 0 auto;
  min-height: 36px;
  margin: 0 0 0 8px;
  padding: 0.35rem 0.75rem;
  border-radius: 16px;
  font-size: 13px;
  transition: opacity 0.25s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.uv-player__reel-window {
  overflow: hidden;
  touch-action: pan-y;
}

.uv-player__reel-pager {
  position: relative;
}

.uv-player__reel-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 36px;
  height: 36px;
  margin-top: -18px;
  padding: 0;
  border: 1px solid #d4c0d9;
  border-radius: 50%;
  background: #fff;
  color: #815583;
  font-family: "TildaSans", "Tilda Sans", Arial, sans-serif;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  -webkit-transition: opacity 0.25s ease;
  transition: opacity 0.25s ease;
}

.uv-player--reel:hover .uv-player__reel-nav {
  opacity: 1;
  pointer-events: auto;
}

.uv-player__reel-nav--prev { left: 16px; }
.uv-player__reel-nav--next { right: 16px; }

.uv-player__reel-nav:hover {
  border-color: #b07eb2;
}

.uv-player__reel-nav:focus-visible {
  outline: 2px solid #815583;
  outline-offset: 2px;
}

.uv-player__reel-track {
  display: flex;
  width: max-content;
  -webkit-animation: uv-reel-move var(--uv-reel-duration, 87s) linear infinite;
  animation: uv-reel-move var(--uv-reel-duration, 87s) linear infinite;
}

.uv-player__reel-group {
  display: flex;
  align-items: flex-start;
  flex: 0 0 auto;
  padding: 18px 0 10px;
}

.uv-player__reel-seq {
  display: flex;
  align-items: flex-start;
  flex: 0 0 auto;
}

.uv-player__reel-card {
  display: block;
  flex: 0 0 296px;
  width: 296px;
  max-width: 296px;
  margin: 0 0 0 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #815583;
  cursor: pointer;
  font-family: "TildaSans", "Tilda Sans", Arial, sans-serif;
  text-align: left;
  -webkit-appearance: none;
  appearance: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  -webkit-transition: -webkit-transform 0.55s cubic-bezier(0.34, 1.45, 0.64, 1);
  transition: transform 0.55s cubic-bezier(0.34, 1.45, 0.64, 1);
}

.uv-player__reel-card--highlight {
  flex: 0 0 auto;
  width: auto;
  max-width: none;
  margin: -8px 0 0 12px;
  padding: 8px 18px 6px;
  border-radius: 22px;
  background: #e4dce4;
}

.uv-player__reel-card--highlight .uv-player__reel-caption {
  width: 296px;
}

.uv-player__reel-media {
  display: block;
  width: 296px;
  height: 165px;
  overflow: hidden;
  border-radius: 25px;
  background: #fbf7f3;
  box-shadow: 0 3px 8px rgba(129, 85, 131, 0.1);
}

.uv-player__reel-img,
.uv-player__reel-fallback {
  display: block;
  width: 100%;
  height: 100%;
}

.uv-player__reel-img {
  border: 0;
  object-fit: cover;
}

.uv-player__reel-fallback {
  display: block;
  padding: 0 8px;
  overflow: hidden;
  color: #815583;
  font-size: 15.6px;
  font-weight: 500;
  line-height: 165px;
  text-align: center;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.uv-player__reel-caption {
  display: block;
  width: 100%;
  height: 1.3em;
  margin-top: 7px;
  overflow: hidden;
  color: #815583;
  font-size: 15.6px;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.uv-player__reel-card.is-active .uv-player__reel-media {
  box-shadow: 0 0 0 2px #815583, 0 3px 8px rgba(129, 85, 131, 0.12);
}

.uv-player__reel-card:focus {
  outline: 2px solid #815583;
  outline-offset: 3px;
}

.uv-player__reel-stage {
  max-width: 800px;
  margin: 1rem auto 0;
  padding: 0 16px;
}

.uv-player__reel-stage[hidden] {
  display: none;
}

.uv-player__reel-empty {
  max-width: 1100px;
  padding: 0 16px;
}

.uv-player--reel.is-static .uv-player__reel-track {
  -webkit-animation: none;
  animation: none;
  -webkit-transform: none;
  transform: none;
}

.uv-player--reel.is-static .uv-player__reel-window {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  overscroll-behavior-y: auto;
  touch-action: pan-x pan-y;
}

.uv-player--reel.is-static .uv-player__reel-group[data-uv-reel-copy],
.uv-player--reel.is-static .uv-player__reel-seq[data-uv-reel-repeat] {
  display: none;
}

@-webkit-keyframes uv-reel-move {
  from { -webkit-transform: translate3d(0, 0, 0); }
  to { -webkit-transform: translate3d(-50%, 0, 0); }
}

@keyframes uv-reel-move {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}

@media (hover: hover) and (pointer: fine) {
  .uv-player--reel .uv-player__tab {
    opacity: 0.5;
  }

  .uv-player--reel .uv-player__tab:hover,
  .uv-player--reel .uv-player__tab:focus {
    opacity: 1;
  }

  .uv-player__reel-card:hover,
  .uv-player__reel-card:focus {
    z-index: 2;
    -webkit-transform: scale(1.06);
    transform: scale(1.06);
  }
}

@media (prefers-reduced-motion: reduce) {
  .uv-player__reel-track {
    -webkit-animation: none;
    animation: none;
  }

  .uv-player__reel-group[data-uv-reel-copy],
  .uv-player__reel-seq[data-uv-reel-repeat] {
    display: none;
  }

  .uv-player__reel-window {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    overscroll-behavior-y: auto;
    touch-action: pan-x pan-y;
  }

  .uv-player__reel-card {
    -webkit-transition: none;
    transition: none;
  }
}

@media screen and (max-width: 639px) {
  .uv-player__reel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .uv-player--reel .uv-player__title {
    font-size: 20px;
  }

  .uv-player__reel-sources {
    margin-left: -8px;
  }
}

@media screen and (min-width: 960px) {
  .uv-player.uv-player--reel {
    min-height: 0;
  }
}

@supports selector(:focus-visible) {
  .uv-player__reel-card:focus:not(:focus-visible) {
    outline: none;
  }
}
