/* YT Custom Player v2.2.0 */

.ytcp-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: var(--ytcp-radius, 8px);
  overflow: hidden;
  cursor: pointer;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-user-select: none; user-select: none;
  display: block;
}

.ytcp-wrapper iframe {
  position: absolute;
  inset: 0;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
  pointer-events: none;
  z-index: 1;
}

/* ── Thumbnail antes do play ── */
.ytcp-thumb {
  position: absolute;
  inset: 0;
  z-index: 3;
  background-color: #000;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  transition: opacity .25s ease, visibility .25s ease;
  pointer-events: none;
}
.ytcp-thumb.ytcp-thumb-hidden,
.ytcp-wrapper.ytcp-playing .ytcp-thumb {
  opacity: 0;
  visibility: hidden;
}

/* ─────────────────────────────────────────────────────────────
   BLOQUEADOR DE PAUSE — cobre 100% do iframe quando pausado
   Fica entre o iframe (z:1) e os controles (z:5)
   No estado .ytcp-playing ele some; no pause ele volta
   ───────────────────────────────────────────────────────────── */
.ytcp-pause-shield {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: #000;
  opacity: 1;
  pointer-events: none;
  transition: opacity .18s ease;
}
/* Quando tocando: some completamente (iframe fica visível) */
.ytcp-wrapper.ytcp-playing .ytcp-pause-shield {
  opacity: 0;
}

/* ── Overlay de clique ── */
.ytcp-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  cursor: pointer;
}

/* ── BOTÃO CENTRAL DE PLAY ── */
.ytcp-icon {
  display: flex !important;
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(1);
  width: 105px; height: 68px;
  border-radius: 8px;
  background: #FCCA4C !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
  align-items: center;
  justify-content: center;
  z-index: 6;
  pointer-events: none;
  opacity: 1 !important;
  visibility: visible !important;
  transition: transform .25s cubic-bezier(.4,0,.2,1), opacity .25s ease, visibility .25s ease;
}
.ytcp-icon svg {
  width: 28px; height: 28px;
  fill: #000 !important;
  margin-left: 4px;
}
.ytcp-wrapper.ytcp-playing .ytcp-icon,
.ytcp-icon.ytcp-fade,
.ytcp-wrapper:not(.ytcp-idle).ytcp-playing .ytcp-icon {
  opacity: 0 !important;
  visibility: hidden !important;
  display: none !important;
  transform: translate(-50%, -50%) scale(.7) !important;
}

/* ── Barra de controles ── */
.ytcp-controls {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 5;
  padding: 24px 14px 10px;
  background: var(--ytcp-bg-controls, rgba(0,0,0,.85)) !important;
  display: flex; flex-direction: column; gap: 6px;
  transition: opacity .3s ease;
}
.ytcp-wrapper.ytcp-idle .ytcp-controls {
  opacity: 0; pointer-events: none;
}

/* ── Barra de progresso ── */
.ytcp-prog-wrap {
  position: relative;
  width: 100%; height: 14px;
  display: flex; align-items: center;
  cursor: pointer;
}
.ytcp-prog-track {
  position: absolute;
  left: 0; right: 0;
  height: var(--ytcp-bar-height, 4px);
  background: rgba(255,255,255,.25) !important;
  border-radius: 99px;
  overflow: hidden;
  transition: height .15s ease;
}
.ytcp-prog-wrap:hover .ytcp-prog-track {
  height: calc(var(--ytcp-bar-height, 4px) + 2px);
  background: rgba(255,255,255,.35) !important;
}
.ytcp-prog-buf {
  position: absolute; left: 0;
  height: 100%; width: 0%;
  background: rgba(255,255,255,.2) !important;
  border-radius: 99px;
}
.ytcp-prog-fill {
  position: absolute; left: 0;
  height: 100%; width: 0%;
  background: #FCCA4C !important;
  border-radius: 99px;
  transition: width .1s linear;
}
.ytcp-prog-thumb {
  position: absolute; top: 50%; left: 0%;
  transform: translate(-50%,-50%) scale(0);
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #FCCA4C !important;
  box-shadow: 0 0 4px rgba(0,0,0,.6);
  transition: transform .15s ease;
  pointer-events: none;
}
.ytcp-prog-wrap:hover .ytcp-prog-thumb {
  transform: translate(-50%,-50%) scale(1);
}
.ytcp-tooltip {
  position: absolute;
  bottom: calc(var(--ytcp-bar-height, 4px) + 16px);
  transform: translateX(-50%);
  background: rgba(0,0,0,.85) !important;
  color: #fff !important; font-size: 11px;
  padding: 2px 7px; border-radius: 4px;
  white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity .15s;
}
.ytcp-prog-wrap:hover .ytcp-tooltip { opacity: 1; }

/* ── Linha de botões ── */
.ytcp-bottom {
  display: flex; align-items: center; gap: 8px;
}
.ytcp-spacer { flex: 1; }

.ytcp-btn-play,
.ytcp-btn-rw,
.ytcp-btn-ff,
.ytcp-btn-mute,
.ytcp-btn-fs {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: #fff !important;
  transition: transform .12s, opacity .12s;
}
.ytcp-btn-play  { width: 32px; height: 32px; }
.ytcp-btn-rw,
.ytcp-btn-ff    { width: 28px; height: 28px; opacity: .8; }
.ytcp-btn-mute  { width: 28px; height: 28px; }
.ytcp-btn-fs    { width: 26px; height: 26px; opacity: .8; }
.ytcp-btn-play  svg { width: 20px; height: 20px; fill: #fff !important; }
.ytcp-btn-rw    svg,
.ytcp-btn-ff    svg { width: 18px; height: 18px; fill: #fff !important; }
.ytcp-btn-mute  svg { width: 18px; height: 18px; fill: #fff !important; }
.ytcp-btn-fs    svg { width: 17px; height: 17px; fill: #fff !important; }
.ytcp-btn-play:hover,
.ytcp-btn-rw:hover,
.ytcp-btn-ff:hover,
.ytcp-btn-mute:hover,
.ytcp-btn-fs:hover {
  transform: scale(1.15);
  opacity: 1 !important;
  background: transparent !important;
  color: #fff !important;
}

/* Tempo */
.ytcp-time {
  color: #fff !important; font-size: 12px;
  white-space: nowrap; flex-shrink: 0;
  letter-spacing: .3px;
}
.ytcp-dur { color: rgba(255,255,255,.55) !important; }

/* Volume */
.ytcp-vol-wrap { display: flex; align-items: center; gap: 6px; }
.ytcp-vol-slider {
  width: 72px; height: 18px;
  display: flex; align-items: center;
  cursor: pointer; position: relative;
  background: transparent !important;
}
.ytcp-vol-track {
  position: absolute; left: 0; right: 0;
  height: var(--ytcp-bar-height, 4px);
  background: rgba(255,255,255,.25) !important;
  border-radius: 99px; overflow: hidden;
}
.ytcp-vol-fill {
  height: 100%; width: 100%;
  background: #FCCA4C !important;
  border-radius: 99px;
}
.ytcp-vol-thumb {
  position: absolute; top: 50%;
  transform: translate(-50%,-50%) scale(0);
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #FCCA4C !important;
  transition: transform .15s; pointer-events: none;
}
.ytcp-vol-slider:hover .ytcp-vol-thumb {
  transform: translate(-50%,-50%) scale(1);
}
.ytcp-vol-slider:hover .ytcp-vol-track {
  background: rgba(255,255,255,.35) !important;
}

/* Velocidade */
.ytcp-speed-wrap {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #fff !important;
  font-size: 12px;
  line-height: 1;
  cursor: default;
}
.ytcp-speed-label { opacity: .75; }
.ytcp-speed {
  appearance: auto;
  -webkit-appearance: menulist;
  background: rgba(255,255,255,.12) !important;
  color: #fff !important;
  border: 1px solid rgba(255,255,255,.22) !important;
  border-radius: 6px !important;
  padding: 3px 6px !important;
  font-size: 12px !important;
  height: auto !important;
  min-height: 24px !important;
  line-height: 1.2 !important;
  outline: none !important;
  box-shadow: none !important;
  cursor: pointer;
}
.ytcp-speed option { color: #000; background: #fff; }

/* ── Fullscreen ── */
.ytcp-wrapper:fullscreen,
.ytcp-wrapper:-webkit-full-screen {
  aspect-ratio: unset;
  width: 100vw; height: 100vh;
  border-radius: 0;
}
.ytcp-wrapper:fullscreen iframe,
.ytcp-wrapper:-webkit-full-screen iframe {
  inset: 0; top: 0; left: 0; width: 100%; height: 100%;
}

/* ── Mobile ── */
@media (max-width: 600px) {
  .ytcp-controls { padding: 12px 10px 6px; gap: 4px; }
  .ytcp-icon { width: 82px; height: 52px; }
  .ytcp-icon svg { width: 20px; height: 20px; margin-left: 3px; }
  .ytcp-prog-wrap { height: 10px; }
  .ytcp-btn-play { width: 26px; height: 26px; }
  .ytcp-btn-play svg { width: 15px; height: 15px; }
  .ytcp-btn-mute { width: 24px; height: 24px; }
  .ytcp-btn-mute svg { width: 14px; height: 14px; }
  .ytcp-time { font-size: 11px; }
  .ytcp-vol-slider { width: 45px; }
  .ytcp-speed-label { display: none; }
  .ytcp-speed { font-size: 11px !important; padding: 2px 4px !important; min-height: 22px !important; }
}
