/* ── PVS Player v2.0 ───────────────────────────────────────────────────── */

/* Wrapper — full width, black background, no overflow */
.pvs-player-wrap {
  width: 100%;
  background: #000;
  border-radius: 4px 4px 0 0;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Source bar ────────────────────────────────────────────────────────── */
.pvs-source-bar {
  display: flex;
  align-items: stretch;
  background: #111;
  border-bottom: 1px solid #1e1e1e;
  flex-wrap: nowrap;
  overflow-x: auto;
  /* Hide scrollbar on small screens but allow scroll */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.pvs-source-bar::-webkit-scrollbar {
  display: none;
}

.pvs-btn {
  flex-shrink: 0;
  background: transparent;
  border: none;
  border-top: 3px solid transparent;
  border-bottom: none;
  color: #888;
  padding: 11px 20px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  transition: color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.pvs-btn:hover {
  color: #ddd;
}

.pvs-btn.pvs-active {
  color: #fff;
  border-top-color: #E83D67; /* matches Porn62 accent colour */
}

/* Emergency Backup — right-aligned, orange */
.pvs-emergency {
  margin-left: auto;
  color: #c2622a;
  border-left: 1px solid #1e1e1e;
  padding-left: 20px;
}

.pvs-emergency:hover {
  color: #f97316;
}

.pvs-emergency.pvs-active {
  color: #f97316;
  border-top-color: #f97316;
}

/* ── Video wrap — relative for notification overlay ────────────────────── */
.pvs-video-wrap {
  position: relative;
  background: #000;
}

/* ── The video element ─────────────────────────────────────────────────── */
.pvs-video {
  width: 100%;
  display: block;
  background: #000;
  /* Cap height so very tall viewport doesn't stretch it weirdly */
  max-height: 75vh;
  /* Prevent blue outline on focus (controls are still keyboard-accessible) */
  outline: none;
}

/* ── Notification overlay ──────────────────────────────────────────────── */
.pvs-notification {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 8px 14px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(10, 10, 10, 0.88);
  color: #e2e8f0;
  opacity: 0;
  transform: translateX(16px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
  z-index: 10;
  max-width: 260px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.pvs-notification.pvs-notif-show {
  opacity: 1;
  transform: translateX(0);
}

.pvs-notif-warn {
  border-left: 3px solid #f59e0b;
}

.pvs-notif-info {
  border-left: 3px solid #3b82f6;
}

/* ── Error card (replaces video when all sources fail) ─────────────────── */
.pvs-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
  background: #090909;
  color: #888;
  text-align: center;
  min-height: 240px;
}

.pvs-error-icon {
  font-size: 40px;
  color: #dc2626;
  margin-bottom: 14px;
  line-height: 1;
}

.pvs-error-title {
  font-size: 17px;
  font-weight: 700;
  color: #ccc;
  margin-bottom: 8px;
}

.pvs-error-msg {
  font-size: 13px;
  color: #666;
  margin-bottom: 22px;
  max-width: 320px;
}

.pvs-retry-btn {
  padding: 10px 28px;
  background: #1c1c2e;
  border: 1px solid #2d2d3e;
  color: #e2e8f0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.15s ease;
}

.pvs-retry-btn:hover {
  background: #2a2a40;
}

/* ── "Unavailable" fallback (no sources at all) ────────────────────────── */
.pvs-unavailable {
  padding: 40px 20px;
  background: #090909;
  color: #555;
  text-align: center;
  font-size: 14px;
  border-radius: 4px;
}

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .pvs-btn {
    padding: 10px 14px;
    font-size: 12px;
  }

  .pvs-notification {
    right: 8px;
    top: 8px;
    font-size: 11px;
    padding: 6px 10px;
    max-width: calc(100% - 16px);
  }

  .pvs-error {
    padding: 40px 16px;
    min-height: 180px;
  }
}
