/* ==========================================================
   GAYZZEE LIVESTREAM LIVEKIT
========================================================== */

.livestream-live-toolbar {
  display: flex;
  align-items: center;
  gap: 7px;
}

.livestream-live-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;

  min-height: 34px;
  padding: 0 11px;

  border: 1px solid rgba(185, 88, 255, .52);
  border-radius: 9px;

  color: #fff;
  background:
    linear-gradient(
      135deg,
      #572276,
      #311442
    );

  font: inherit;
  font-size: 9px;
  font-weight: 800;

  cursor: pointer;
}

.livestream-live-action span {
  font-size: 13px;
}

.livestream-live-action strong {
  color: inherit !important;
  font-size: inherit !important;
  text-transform: none !important;
}

.livestream-live-action:hover:not(:disabled) {
  border-color: #ef55d4;

  background:
    linear-gradient(
      135deg,
      #7c2ca0,
      #4c1b69
    );
}

.livestream-live-action:disabled {
  color: #76697f;

  border-color:
    rgba(130, 92, 149, .2);

  background:
    linear-gradient(
      135deg,
      #211827,
      #18111e
    );

  cursor: default;
}

.livestream-live-action.is-active {
  border-color:
    rgba(255, 67, 190, .9);

  background:
    linear-gradient(
      135deg,
      #922164,
      #64226e
    );
}

#livestreamMicButton.is-active {
  border-color:
    rgba(67, 212, 255, .8);

  background:
    linear-gradient(
      135deg,
      #165b78,
      #493076
    );
}

#livestreamSwitchCamButton {
  background:
    linear-gradient(
      135deg,
      #263f79,
      #3e245e
    );
}


/* ==========================================================
   HOOFDLAYOUT
========================================================== */

.stream-arena {
  grid-template-rows:
    112px
    minmax(0, 1fr)
    112px
    54px !important;

  gap: 10px;
}

.main-stream {
  grid-row: 2;

  width: 88%;
  max-width: 1050px;

  justify-self: center;
}

.livestream-live-row {
  position: relative;
  z-index: 6;

  display: grid;

  grid-template-columns:
    repeat(4, minmax(0, 1fr));

  gap: 10px;

  min-width: 0;
  min-height: 0;

  transition:
    opacity 180ms ease;
}

.livestream-live-row-top {
  grid-row: 1;
}

.livestream-live-row-bottom {
  grid-row: 3;
}

.stream-info-strip {
  grid-row: 4;
}

.stream-arena.is-cams-hidden {
  grid-template-rows:
    0
    minmax(0, 1fr)
    0
    54px !important;
}

.stream-arena.is-cams-hidden .livestream-live-row {
  opacity: 0;
  pointer-events: none;
}

.stream-arena.is-cams-hidden .main-stream {
  width: 96%;
}


/* ==========================================================
   LEGE CAM
========================================================== */

.livestream-live-slot {
  position: relative;

  min-width: 0;
  min-height: 0;

  overflow: hidden;

  border:
    1px solid rgba(179, 92, 229, .3);

  border-radius: 14px;

  background:
    linear-gradient(
      145deg,
      rgba(37, 20, 49, .97),
      rgba(14, 9, 20, .99)
    );

  box-shadow:
    0 8px 25px rgba(0, 0, 0, .22);

  transition:
    border-color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.livestream-live-empty {
  position: absolute;
  inset: 0;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  gap: 6px;

  color: #877692;

  font-size: 8px;
}

.livestream-live-empty span {
  display: grid;
  place-items: center;

  width: 35px;
  height: 35px;

  border:
    1px solid rgba(175, 102, 211, .19);

  border-radius: 11px;

  background:
    rgba(147, 65, 188, .07);

  font-size: 15px;
}


/* ==========================================================
   ACTIEVE CAM
========================================================== */

.livestream-live-slot.has-camera {
  cursor: pointer;
}

.livestream-live-slot.has-camera:hover {
  border-color:
    rgba(239, 74, 205, .86);

  box-shadow:
    0 0 28px rgba(207, 65, 213, .23),
    0 10px 28px rgba(0, 0, 0, .3);

  transform:
    translateY(-2px);
}

.livestream-live-slot.is-speaking {
  border-color: #46e7bb;

  box-shadow:
    0 0 0 1px rgba(70, 231, 187, .3),
    0 0 28px rgba(70, 231, 187, .3);
}

.livestream-live-slot.is-selected {
  border-color: #ef4bc8;
}

.livestream-live-cam {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  padding: 0;
  border: 0;

  background: #09060d;

  overflow: hidden;
  cursor: pointer;
}

.livestream-live-media {
  position: absolute;
  inset: 0;

  display: grid;
  place-items: center;

  overflow: hidden;
}

.livestream-live-video {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  object-fit: cover;
}

.livestream-live-avatar {
  display: grid;
  place-items: center;

  width: 100%;
  height: 100%;

  color: #f4eaff;

  background:
    radial-gradient(
      circle at 50% 35%,
      rgba(156, 68, 210, .4),
      rgba(23, 12, 31, .98) 68%
    );

  font-size: 27px;
  font-weight: 800;
}

.livestream-live-badge {
  position: absolute;

  top: 8px;
  left: 9px;

  z-index: 5;

  padding: 3px 7px;

  border-radius: 7px;

  color: #fff;

  background:
    rgba(5, 3, 8, .72);

  font-size: 7px;
  font-weight: 800;
}

.livestream-live-badge::before {
  content: "";

  display: inline-block;

  width: 6px;
  height: 6px;

  margin-right: 5px;

  border-radius: 50%;

  background: #2de293;

  box-shadow:
    0 0 8px rgba(45, 226, 147, .8);
}

.livestream-live-overlay {
  position: absolute;

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

  z-index: 5;

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

  padding: 18px 10px 8px;

  background:
    linear-gradient(
      transparent,
      rgba(3, 2, 6, .9)
    );
}

.livestream-live-name {
  overflow: hidden;

  color: #fff;

  font-size: 9px;
  font-weight: 800;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.livestream-live-mic {
  color: #fff;
  font-size: 10px;
}


/* ==========================================================
   TV LOGO
========================================================== */

#mainStream .livestream-tv-watermark {
  top: 18px !important;
  right: 18px !important;

  width:
    clamp(
      90px,
      8.5%,
      165px
    ) !important;

  max-width: 165px !important;

  z-index: 30 !important;
}


/* ==========================================================
   ONDERSTE PLAYER CONTROLS
========================================================== */

#mainPlayButton {
  padding-left: 2px;
}


/* ==========================================================
   FLOATING PIP
========================================================== */

.livestream-cam-pip {
  position: fixed;

  right: 24px;
  bottom: 24px;

  z-index: 9999;

  display: grid;

  grid-template-rows:
    minmax(0, 1fr)
    39px;

  width:
    clamp(
      235px,
      28vw,
      330px
    );

  aspect-ratio: 16 / 10;

  overflow: hidden;

  border:
    1px solid rgba(243, 80, 209, .72);

  border-radius: 14px;

  background: #07040a;

  box-shadow:
    0 18px 52px rgba(0, 0, 0, .68),
    0 0 30px rgba(224, 67, 209, .23);
}

.livestream-cam-pip[hidden] {
  display: none !important;
}

.livestream-cam-pip.is-speaking {
  border-color: #46e7bb;
}

.livestream-pip-media {
  position: relative;

  min-height: 0;

  overflow: hidden;
}

.livestream-pip-media video {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  object-fit: cover;
}

.livestream-pip-avatar {
  position: absolute;
  inset: 0;

  display: grid;
  place-items: center;

  color: #eadcf2;

  font-size: 34px;
  font-weight: 800;
}

.livestream-pip-top {
  position: absolute;

  top: 7px;
  left: 8px;
  right: 8px;

  z-index: 5;

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

  cursor: move;
}

.livestream-pip-top strong {
  padding: 4px 7px;

  border-radius: 7px;

  color: #fff;

  background:
    rgba(4, 3, 7, .72);

  font-size: 9px;
}

.livestream-pip-close {
  display: grid;
  place-items: center;

  width: 26px;
  height: 26px;

  border:
    1px solid rgba(255, 255, 255, .14);

  border-radius: 50%;

  color: #fff;

  background:
    rgba(6, 4, 10, .82);

  font-size: 17px;

  cursor: pointer;
}

.livestream-pip-controls {
  display: flex;
  align-items: center;

  gap: 5px;

  padding: 5px 7px;

  background: #120a18;
}

.livestream-pip-controls button {
  height: 28px;

  min-width: 32px;

  padding: 0 7px;

  border:
    1px solid rgba(179, 90, 218, .32);

  border-radius: 7px;

  color: #fff;

  background: #2a1536;

  cursor: pointer;
}

.livestream-pip-controls input {
  min-width: 55px;

  flex: 1;

  accent-color: #e04ac9;
}


/* ==========================================================
   OUDE ZIJDE STREAM CONTROLS
========================================================== */

.studio-sidebar .stream-controls {
  display: none;
}


@media (max-width: 1380px) {
  .stream-arena {
    grid-template-rows:
      102px
      minmax(0, 1fr)
      102px
      54px !important;
  }

  .livestream-live-action {
    padding: 0 8px;
  }
}


@media (max-width: 900px) {
  .livestream-live-action strong {
    display: none;
  }

  #livestreamSwitchCamButton {
    display: none;
  }

  .stream-arena {
    grid-template-rows:
      minmax(0, 1fr)
      88px
      48px !important;
  }

  .livestream-live-row-top {
    display: none;
  }

  .main-stream {
    grid-row: 1;

    width: 100%;
  }

  .livestream-live-row-bottom {
    grid-row: 2;
  }

  .stream-info-strip {
    grid-row: 3;
  }
}


/* GAYZZEE_DESKTOP_AV_STABLE_V1
   Alleen desktop: stabiele camvideo, geen initiaal over actief beeld,
   en betrouwbare pointerbediening van de PiP-regelaars. */
@media (min-width: 980px) {
  .livestream-live-media,
  .livestream-pip-media {
    isolation: isolate;
  }

  .livestream-live-video,
  .livestream-pip-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 2;
  }

  .livestream-live-avatar[hidden],
  .livestream-pip-avatar[hidden] {
    display: none !important;
  }

  .livestream-pip-controls,
  .livestream-pip-controls button,
  .livestream-pip-volume {
    position: relative;
    z-index: 20;
    pointer-events: auto;
    touch-action: manipulation;
  }

  .livestream-pip-volume {
    cursor: pointer;
  }
}
