/* ========================================================
   VYDI - Infinite Vertical Feed
   ======================================================== */

.vydiView {
  padding: 0 !important;
  overflow: hidden !important;
  background: #09090b;
}


.vydiHeader {
  height: 48px;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  border-bottom:
    1px solid rgba(255,255,255,.07);

  box-sizing: border-box;
}


.vydiHeader strong {
  font-size: 18px;
}


.vydiHeader span {
  font-size: 12px;
  opacity: .45;
}


.vydiStage {
  position: relative;

  height:
    calc(100dvh - 120px);

  min-height: 420px;

  overflow: hidden;

  overscroll-behavior: contain;

  touch-action: none;

  background: #09090b;
}


.vydiTrack {
  width: 100%;
  height: 100%;

  transform:
    translateY(-100%);

  will-change:
    transform;
}


.vydiTrack.animating {
  transition:
    transform .28s
    cubic-bezier(.2,.8,.2,1);
}


.vydiSlide {
  width: 100%;
  height: 100%;

  display: grid;
  place-items: center;

  box-sizing: border-box;

  padding:
    8px 65px 8px 8px;
}


.vydiPlayerShell {
  position: relative;

  height:
    min(
      calc(100dvh - 145px),
      780px
    );

  max-width:
    min(
      440px,
      calc(100vw - 320px)
    );

  aspect-ratio:
    9 / 16;

  overflow: hidden;

  border-radius:
    18px;

  background: #000;

  box-shadow:
    0 20px 60px
    rgba(0,0,0,.45);
}


.vydiVideo {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: contain;

  background: #000;

  cursor: pointer;
}


.vydiShade {
  position: absolute;

  inset: 0;

  pointer-events: none;

  background:
    linear-gradient(
      to bottom,
      transparent 45%,
      rgba(0,0,0,.78) 100%
    );
}


.vydiMeta {
  position: absolute;

  z-index: 4;

  left: 15px;
  right: 65px;
  bottom: 18px;

  color: white;
}


.vydiChannel {
  display: flex;
  align-items: center;
  gap: 9px;

  padding: 0;

  border: 0;

  background: transparent;

  color: white;

  cursor: pointer;

  text-align: left;
}


.vydiAvatar,
.vydiAvatarFallback {
  width: 38px;
  height: 38px;

  border-radius: 50%;

  flex: 0 0 38px;
}


.vydiAvatar {
  object-fit: cover;
}


.vydiAvatarFallback {
  display: grid;
  place-items: center;

  background:
    rgba(255,255,255,.18);

  font-weight: 800;
}


.vydiChannelText {
  display: flex;
  flex-direction: column;

  min-width: 0;
}


.vydiChannelText strong {
  font-size: 14px;
}


.vydiChannelText small {
  font-size: 11px;
  opacity: .65;
}


.vydiTitle {
  margin-top: 9px;

  font-size: 14px;
  line-height: 1.4;

  text-shadow:
    0 2px 8px #000;
}


.vydiActions {
  position: absolute;

  z-index: 5;

  right: 10px;
  bottom: 18px;

  display: flex;
  flex-direction: column;
  gap: 11px;
}


.vydiActions button {
  width: 48px;
  min-height: 48px;

  display: flex;
  flex-direction: column;

  align-items: center;
  justify-content: center;

  gap: 3px;

  padding: 5px;

  border: 0;
  border-radius: 15px;

  background:
    rgba(18,18,22,.72);

  color: white;

  cursor: pointer;

  backdrop-filter:
    blur(12px);
}


.vydiActions button:hover {
  background:
    rgba(50,50,55,.9);
}


.vydiActions .icon {
  font-size: 20px;
  line-height: 1;
}


.vydiActions small {
  max-width: 44px;

  overflow: hidden;

  text-overflow: ellipsis;

  white-space: nowrap;

  font-size: 9px;
}


.vydiCenterPlay {
  position: absolute;

  z-index: 7;

  left: 50%;
  top: 50%;

  transform:
    translate(-50%, -50%);

  width: 62px;
  height: 62px;

  display: grid;
  place-items: center;

  border-radius: 50%;

  background:
    rgba(0,0,0,.55);

  color: white;

  font-size: 25px;

  pointer-events: none;
}


.vydiCounter {
  position: absolute;

  z-index: 6;

  top: 12px;
  right: 12px;

  padding:
    5px 9px;

  border-radius: 999px;

  color: white;

  background:
    rgba(0,0,0,.45);

  font-size: 11px;
}


.vydiEmpty {
  height:
    calc(100dvh - 120px);

  display: grid;
  place-items: center;

  opacity: .55;
}


@media (max-width: 950px) {

  .vydiStage {
    height:
      calc(100dvh - 100px);
  }


  .vydiSlide {
    padding: 0;
  }


  .vydiPlayerShell {
    width: 100%;
    max-width: 100%;

    height: 100%;
    max-height: none;

    aspect-ratio: auto;

    border-radius: 0;
  }


  .vydiVideo {
    object-fit: contain;
  }
}

/* VYDI ACTIONS V11 */

.vydiActions button:disabled {
  opacity: .65;
  cursor: default;
}

.vydiActions button[data-action="subscribe"] {
  font-weight: 700;
}

.vydiCommentsDrawer {
  position: fixed;
  z-index: 10050;

  top: 72px;
  right: 18px;
  bottom: 18px;

  width: min(420px, calc(100vw - 36px));

  display: flex;
  flex-direction: column;

  overflow: hidden;

  border: 1px solid rgba(255,255,255,.10);
  border-radius: 18px;

  background: #151518;
  color: white;

  box-shadow: 0 20px 70px rgba(0,0,0,.55);
}

.vydiCommentsDrawer.hidden {
  display: none !important;
}

.vydiCommentsHeader {
  min-height: 56px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0 15px;

  border-bottom: 1px solid rgba(255,255,255,.08);
}

.vydiCommentsHeader button {
  width: 36px;
  height: 36px;

  border: 0;
  border-radius: 50%;

  background: rgba(255,255,255,.08);
  color: white;

  cursor: pointer;
}

.vydiCommentsList {
  flex: 1;

  overflow-y: auto;

  padding: 14px;
}

.vydiComment {
  display: flex;
  gap: 10px;

  padding: 11px 0;

  border-bottom: 1px solid rgba(255,255,255,.06);
}

.vydiCommentAvatar {
  width: 36px;
  height: 36px;

  flex: 0 0 36px;

  display: grid;
  place-items: center;

  border-radius: 50%;

  background: rgba(255,255,255,.12);

  font-weight: 800;
}

.vydiCommentText {
  min-width: 0;
}

.vydiCommentText strong {
  font-size: 13px;
}

.vydiCommentText p {
  margin: 5px 0 0;

  line-height: 1.4;

  overflow-wrap: anywhere;
}

.vydiNoComments {
  margin-top: 25px;

  text-align: center;

  opacity: .55;
}

.vydiCommentForm {
  display: flex;
  gap: 8px;

  padding: 12px;

  border-top: 1px solid rgba(255,255,255,.08);
}

.vydiCommentForm textarea {
  flex: 1;

  min-height: 44px;
  max-height: 110px;

  box-sizing: border-box;

  resize: vertical;

  padding: 10px;

  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;

  background: rgba(255,255,255,.07);
  color: white;
}

.vydiCommentForm button {
  align-self: flex-end;

  min-height: 42px;

  padding: 0 14px;

  border: 0;
  border-radius: 12px;

  cursor: pointer;

  font-weight: 700;
}

#vydiNotice {
  position: fixed;
  z-index: 12000;

  left: 50%;
  bottom: 28px;

  transform: translate(-50%, 18px);

  padding: 10px 16px;

  border-radius: 999px;

  background: #17171a;
  color: white;

  opacity: 0;

  pointer-events: none;

  transition: .18s ease;
}

#vydiNotice.show {
  opacity: 1;

  transform: translate(-50%, 0);
}

@media (max-width: 700px) {

  .vydiCommentsDrawer {
    top: auto;

    left: 0;
    right: 0;
    bottom: 0;

    width: 100%;
    height: 68dvh;

    border-radius: 20px 20px 0 0;
  }

}
