/* Video-player popup — header + close always visible; demo runs in fixed viewport */

.he-demo-player-open {
  overflow: hidden;
}

.he-demo-player-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 48px 16px 16px;
  background: rgba(4, 8, 24, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.he-demo-player-backdrop.is-open {
  display: flex;
}

.he-demo-player-backdrop[hidden]:not(.is-open) {
  display: none !important;
}

/* Always-visible close — stays above the player shell during the tour */
.he-demo-player-float-close {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 2147483002;
  display: none;
  align-items: center;
  gap: 6px;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(251, 113, 133, 0.45);
  background: rgba(30, 10, 20, 0.92);
  color: #fecdd3;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.he-demo-player-backdrop.is-open .he-demo-player-float-close {
  display: inline-flex;
}

.he-demo-player-float-close:hover {
  background: rgba(251, 113, 133, 0.22);
  border-color: rgba(251, 113, 133, 0.65);
}

.he-demo-player-shell {
  width: min(100%, 900px);
  height: min(calc(100vh - 64px), 720px);
  max-height: calc(100vh - 64px);
  border-radius: 16px;
  overflow: hidden;
  background: #060c1e;
  border: 1px solid rgba(0, 229, 207, 0.28);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
}

.he-demo-player-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: #0a1020;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex: 0 0 auto;
  z-index: 2;
}

.he-demo-player-header-copy {
  min-width: 0;
}

.he-demo-player-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.he-demo-player-title {
  font-family: "Manrope", sans-serif;
  font-size: 0.88rem;
  font-weight: 800;
  color: #f8fafc;
  margin: 0;
}

.he-demo-player-subtitle {
  font-size: 0.68rem;
  color: #94a3b8;
  margin: 2px 0 0;
}

.he-demo-player-close-text {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.4rem 0.7rem;
  border-radius: 10px;
  cursor: pointer;
}

.he-demo-player-close-text:hover {
  background: rgba(251, 113, 133, 0.14);
  border-color: rgba(251, 113, 133, 0.35);
}

.he-demo-player-close {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.he-demo-player-close:hover {
  background: rgba(251, 113, 133, 0.15);
  border-color: rgba(251, 113, 133, 0.35);
}

.he-demo-player-screen-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  background: #040810;
}

.he-demo-player-screen {
  position: relative;
  width: 100%;
  height: 100%;
  background: #040810;
}

.he-demo-player-screen iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #040810;
}

.he-demo-player-controls {
  flex: 0 0 auto;
  padding: 8px 12px 10px;
  background: #0a1020;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.he-demo-player-progress-wrap {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
  margin-bottom: 8px;
}

.he-demo-player-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #00e5cf, #4f8cff);
  border-radius: inherit;
  transition: width 0.45s ease;
}

.he-demo-player-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.he-demo-player-toolbar button {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  cursor: pointer;
}

.he-demo-player-toolbar button:hover {
  background: rgba(0, 229, 207, 0.12);
  border-color: rgba(0, 229, 207, 0.3);
}

.he-demo-player-toolbar button.he-demo-primary {
  background: #00e5cf;
  color: #060c1e;
  border-color: transparent;
}

.he-demo-player-step-label {
  flex: 1;
  min-width: 120px;
  font-size: 0.68rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.he-demo-player-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.he-demo-player-nav a {
  font-size: 0.68rem;
  font-weight: 700;
  color: #94a3b8;
  text-decoration: none;
  padding: 0.3rem 0.55rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.he-demo-player-nav a:hover {
  color: #00e5cf;
  border-color: rgba(0, 229, 207, 0.28);
  background: rgba(0, 229, 207, 0.08);
}

.he-demo-watch-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 11px 22px;
  border-radius: 12px;
  border: 1px solid rgba(0, 229, 207, 0.35);
  background: rgba(0, 229, 207, 0.08);
  color: var(--accent-cyan, #00e5cf);
  font-weight: 800;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.he-demo-watch-btn:hover {
  background: rgba(0, 229, 207, 0.16);
  transform: translateY(-1px);
}

.he-demo-watch-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 229, 207, 0.18);
  font-size: 0.75rem;
}

@media (max-width: 640px) {
  .he-demo-player-backdrop {
    padding: 44px 8px 8px;
  }
  .he-demo-player-shell {
    height: calc(100vh - 52px);
    max-height: calc(100vh - 52px);
    border-radius: 12px;
  }
  .he-demo-player-close-text {
    display: none;
  }
  .he-demo-player-nav {
    display: none;
  }
}
