/* Player chrome alinhado ao app (media_kit / player_screen) */
.player-page {
  background: #000 !important;
  background-image: none !important;
}

.player-page.dubla-player-enhanced .player-bar {
  display: none !important;
}

/* Mantem o fixed/inset da folha base: trocar por relative colapsa a altura
   da pagina enquanto o video ainda nao tem metadados. */
.player-page.dubla-player-enhanced {
  position: fixed;
  inset: 0;
}

.player-page.dubla-player-enhanced video {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  height: 100%;
  max-height: none !important;
  object-fit: contain;
  background: #000;
  cursor: none;
}

.player-page.dubla-player-enhanced.dubla-show-cursor video {
  cursor: pointer;
}

.player-page.dubla-player-enhanced.dubla-fit-cover video {
  object-fit: cover;
}

.dubla-player-ui {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  background: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.72) 0%,
      transparent 28%
    ),
    linear-gradient(to top, rgba(0, 0, 0, 0.82) 0%, transparent 36%);
}

.player-page.dubla-player-enhanced.dubla-controls-visible .dubla-player-ui {
  opacity: 1;
}

.dubla-player-ui * {
  pointer-events: auto;
}

.dubla-player-top,
.dubla-player-bottom {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1rem;
}

.dubla-player-top {
  padding-top: calc(0.75rem + env(safe-area-inset-top));
}

.dubla-player-bottom {
  flex-wrap: wrap;
  padding-bottom: calc(0.85rem + env(safe-area-inset-bottom));
}

/* Volume à esquerda; ajuste / velocidade / fullscreen à direita. */
.dubla-volume {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-right: auto;
  min-width: 0;
}

.dubla-volume input[data-volume] {
  width: 5.5rem;
  max-width: 28vw;
  accent-color: var(--brand, #e02735);
  height: 0.35rem;
  cursor: pointer;
}

@media (max-width: 520px) {
  .dubla-volume input[data-volume] {
    width: 3.75rem;
  }
}

.dubla-player-title {
  flex: 1;
  min-width: 0;
  font-family: var(--font-display, "Bebas Neue", Impact, sans-serif);
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #f5f5f7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dubla-live-badge {
  display: none;
  align-items: center;
  gap: 0.35rem;
  border-radius: 0.25rem;
  background: var(--brand, #e02735);
  padding: 0.2rem 0.45rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #fff;
}

.dubla-live-badge.is-on {
  display: inline-flex;
}

.dubla-live-badge::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: #fff;
}

.dubla-player-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: #fff;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.dubla-player-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.dubla-player-btn svg {
  width: 1.35rem;
  height: 1.35rem;
  fill: currentColor;
}

.dubla-player-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.dubla-player-center .dubla-player-btn {
  width: 3.4rem;
  height: 3.4rem;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.dubla-player-center .dubla-play-main {
  width: 4.4rem;
  height: 4.4rem;
  background: rgba(224, 39, 53, 0.92);
  border-color: transparent;
}

.dubla-seek {
  flex: 1 1 100%;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.15rem;
}

.dubla-seek input[type="range"] {
  flex: 1;
  accent-color: var(--brand, #e02735);
  height: 0.35rem;
  cursor: pointer;
}

.dubla-time {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.dubla-player-menu {
  position: absolute;
  right: 1rem;
  bottom: 4.5rem;
  min-width: 11rem;
  border-radius: 0.5rem;
  background: rgba(11, 11, 15, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.35rem;
  display: none;
  z-index: 6;
}

.dubla-player-menu.is-open {
  display: block;
}

.dubla-player-menu button {
  width: 100%;
  appearance: none;
  border: 0;
  background: transparent;
  color: #fff;
  text-align: left;
  padding: 0.65rem 0.75rem;
  border-radius: 0.35rem;
  font-size: 0.875rem;
  cursor: pointer;
}

.dubla-player-menu button:hover,
.dubla-player-menu button.is-active {
  background: rgba(224, 39, 53, 0.28);
}

/* O pill de loading fica logo abaixo do bloco central para nao colidir
   com o botao de play. */
.player-page.dubla-player-enhanced .player-loading {
  top: 50%;
  transform: translate(-50%, 3.6rem);
  border: 0;
  background: rgba(0, 0, 0, 0.55);
  box-shadow: none;
}

@media (max-width: 640px) {
  .dubla-player-center {
    gap: 0.85rem;
  }
  .dubla-player-center .dubla-player-btn {
    width: 2.9rem;
    height: 2.9rem;
  }
  .dubla-player-center .dubla-play-main {
    width: 3.6rem;
    height: 3.6rem;
  }
}
