/* Central do Player v2 — organiza controles sem alterar o Player 1. */

.epg-container { position: relative; }

.live-player-status {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  max-width: 230px;
  padding: 0 11px;
  border: 1px solid rgba(255, 204, 0, .34);
  border-radius: 10px;
  background: rgba(5, 10, 18, .72);
  color: #fff3bd;
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-player-status::before {
  content: '';
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: #9aa5b1;
  box-shadow: 0 0 0 3px rgba(154, 165, 177, .12);
  flex: 0 0 auto;
}

.live-player-status[data-tone="protected"]::before { background: #36d576; box-shadow: 0 0 0 3px rgba(54, 213, 118, .15); }
.live-player-status[data-tone="alternative"]::before { background: #58bcff; box-shadow: 0 0 0 3px rgba(88, 188, 255, .15); }
.live-player-status[data-tone="loading"]::before { background: #ffcc00; animation: liveCentralPulse 1s ease-in-out infinite; }
.live-player-status[data-tone="warning"]::before { background: #ff9b42; box-shadow: 0 0 0 3px rgba(255, 155, 66, .15); }
.live-player-status[data-tone="error"]::before { background: #ff5964; box-shadow: 0 0 0 3px rgba(255, 89, 100, .15); }

@keyframes liveCentralPulse { 50% { opacity: .35; transform: scale(.72); } }

.live-player-tools-btn { white-space: nowrap; }

.live-player-tools-panel {
  /* Janela flutuante: não fica presa ao overflow da grade/EPG. */
  position: fixed;
  z-index: 10050;
  top: 50%;
  right: auto;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(560px, calc(100vw - 28px));
  max-height: calc(100dvh - 28px);
  overflow: auto;
  padding: 14px;
  border: 1px solid rgba(255, 204, 0, .44);
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(18, 25, 39, .98), rgba(5, 9, 16, .99));
  box-shadow: 0 18px 48px rgba(0, 0, 0, .54);
  backdrop-filter: blur(16px);
}

.live-player-tools-panel[hidden] { display: none !important; }
body.live-player-tools-open .epg-container { overflow: visible !important; }

.live-player-tools-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, .11);
  color: #fff;
}

.live-player-tools-heading strong { font-size: 14px; }
.live-player-tools-heading button {
  width: 31px;
  height: 31px;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 9px;
  background: rgba(255, 255, 255, .05);
  color: #fff;
  cursor: pointer;
}

.live-player-tools-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.live-player-tools-group:last-of-type { border-bottom: 0; }
.live-player-tools-label {
  width: 100%;
  color: #aab6c5;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.live-player-info-badge {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  box-sizing: border-box;
  padding: 0 10px;
  border: 1px solid rgba(255, 204, 0, .45);
  border-radius: 9px;
  background: rgba(0, 0, 0, .25);
  color: #ffcc00;
  font-size: 12px;
  font-weight: 800;
}

.live-player-tools-note {
  margin: 3px 0 0;
  color: #cbd5e1;
  font-size: 11px;
  line-height: 1.45;
}

.live-player-tools-note i { color: #36d576; margin-right: 5px; }

@media (max-width: 768px) {
  body.tv-active:not(.mobile-fullscreen) .live-player-status {
    min-height: 38px !important;
    max-width: 144px;
    padding: 0 9px;
    font-size: 10px;
    flex: 0 0 auto;
  }

  body.tv-active:not(.mobile-fullscreen) .live-player-tools-btn {
    min-height: 38px !important;
    height: 38px !important;
    padding: 0 10px !important;
    border-radius: 999px !important;
    font-size: 11px !important;
    flex: 0 0 auto !important;
  }

  body.live-player-tools-open.tv-active:not(.mobile-fullscreen) .main-content { overflow: visible !important; }

  body.tv-active:not(.mobile-fullscreen) .live-player-tools-panel {
    position: fixed;
    z-index: 10050;
    top: 50%;
    right: auto;
    left: 50%;
    transform: translate(-50%, -50%);
    width: calc(100vw - 24px);
    max-height: calc(100dvh - 24px);
    overflow: auto;
    padding: 13px;
    border-radius: 15px;
  }

  .live-player-tools-group { gap: 7px; }
  .live-player-tools-panel .secondary-player-btn,
  .live-player-tools-panel .secondary-quality-select,
  .live-player-tools-panel .live-player-info-badge {
    min-height: 38px !important;
    height: 38px !important;
    font-size: 11px !important;
  }
}
