/* live-window.css — LiveWindow component styles for Live Everywhere engine.
   Sizes: mini (240×135), medium (480×270), full (100% width).
   Design: dark bg, coral LIVE badge, cyan accents. */

/* ---- Base LiveWindow ---- */
.live-window {
  position: relative;
  background: #0a0a0f;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0, 229, 255, 0.15);
  transition: all 200ms ease;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  z-index: 100;
}
.live-window:hover { border-color: rgba(0, 229, 255, 0.35); }

/* ---- Size Variants ---- */
.live-window--mini { width: 240px; height: 135px; }
.live-window--medium { width: 480px; height: 270px; }
.live-window--full { width: 100%; aspect-ratio: 16/9; max-height: 500px; }

/* ---- Video Area ---- */
.live-window__video {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #0d0d1a 0%, #1a0a1a 50%, #0a0a1a 100%);
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.live-window__video video { width: 100%; height: 100%; object-fit: cover; }
.live-window__video-placeholder {
  color: rgba(255,255,255,0.3); font-size: 14px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.live-window__video-placeholder .pulse-dot {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255, 77, 109, 0.3);
  animation: livePulse 2s ease-in-out infinite;
}

/* ---- Overlay Bar (bottom) ---- */
.live-window__overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  padding: 12px; display: flex; align-items: center; gap: 8px;
  z-index: 2;
}
.live-window--mini .live-window__overlay { padding: 6px 8px; gap: 6px; }

/* ---- Creator Info ---- */
.live-window__avatar {
  width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid #00E5FF; object-fit: cover; flex-shrink: 0;
}
.live-window--mini .live-window__avatar { width: 24px; height: 24px; }
.live-window__info { flex: 1; min-width: 0; }
.live-window__name {
  color: #fff; font-size: 13px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.live-window--mini .live-window__name { font-size: 11px; }
.live-window__title {
  color: rgba(255,255,255,0.6); font-size: 11px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: block;
}
.live-window--mini .live-window__title { display: none; }

/* ---- LIVE Badge ---- */
.live-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: #FF4D6D; color: #fff;
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  padding: 2px 6px; border-radius: 4px; letter-spacing: 0.5px;
  white-space: nowrap;
}
.live-badge__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #fff; animation: livePulse 1.5s ease-in-out infinite;
}

/* ---- Viewer Count ---- */
.live-window__viewers {
  display: flex; align-items: center; gap: 3px;
  color: #fff; font-size: 11px; font-weight: 500;
  white-space: nowrap;
}
.live-window__viewers svg { width: 14px; height: 14px; opacity: 0.8; }

/* ---- Controls ---- */
.live-window__controls { display: flex; gap: 4px; }
.live-window__btn {
  background: rgba(255,255,255,0.1); border: none; color: #fff;
  width: 28px; height: 28px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background 150ms;
}
.live-window__btn:hover { background: rgba(255,255,255,0.2); }
.live-window__btn svg { width: 16px; height: 16px; }
.live-window--mini .live-window__btn { width: 22px; height: 22px; }
.live-window--mini .live-window__btn svg { width: 12px; height: 12px; }

/* ---- Dismiss Button ---- */
.live-window__dismiss {
  position: absolute; top: 6px; right: 6px;
  background: rgba(0,0,0,0.6); border: none; color: #fff;
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 3; font-size: 14px; line-height: 1;
  opacity: 0; transition: opacity 150ms;
}
.live-window:hover .live-window__dismiss { opacity: 1; }

/* ---- Floating PiP Player ---- */
.live-pip {
  position: fixed; bottom: 20px; right: 20px;
  z-index: 9999; box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  cursor: grab; user-select: none;
  animation: pipSlideIn 300ms ease-out;
}
.live-pip:active { cursor: grabbing; }
.live-pip .live-window { border: 2px solid rgba(255, 77, 109, 0.5); }

/* ---- Fixed Top-Right (Feed) ---- */
.live-window--fixed-tr {
  position: fixed; top: 80px; right: 20px; z-index: 900;
  box-shadow: 0 4px 24px rgba(0,0,0,0.5);
  animation: pipSlideIn 300ms ease-out;
}

/* ---- Live Now Row (Explore) ---- */
.live-now-row {
  display: flex; gap: 12px; overflow-x: auto;
  padding: 12px 0; scrollbar-width: none;
}
.live-now-row::-webkit-scrollbar { display: none; }
.live-now-tile {
  flex: 0 0 180px; background: #0a0a0f; border-radius: 10px;
  overflow: hidden; cursor: pointer; border: 1px solid rgba(0,229,255,0.1);
  transition: transform 150ms, border-color 150ms;
}
.live-now-tile:hover { transform: scale(1.03); border-color: rgba(0,229,255,0.3); }
.live-now-tile__thumb {
  width: 180px; height: 101px;
  background: linear-gradient(135deg, #0d0d1a, #1a0a1a);
  position: relative; display: flex; align-items: center; justify-content: center;
}
.live-now-tile__thumb .pulse-dot {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,77,109,0.3); animation: livePulse 2s ease-in-out infinite;
}
.live-now-tile__badge {
  position: absolute; top: 6px; left: 6px;
}
.live-now-tile__viewers {
  position: absolute; bottom: 6px; right: 6px;
  background: rgba(0,0,0,0.7); color: #fff;
  font-size: 10px; padding: 2px 6px; border-radius: 4px;
  display: flex; align-items: center; gap: 3px;
}
.live-now-tile__info { padding: 8px; display: flex; align-items: center; gap: 8px; }
.live-now-tile__avatar {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid #00E5FF; object-fit: cover;
}
.live-now-tile__name {
  color: #fff; font-size: 12px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---- Profile LIVE Banner ---- */
.live-profile-banner {
  background: linear-gradient(135deg, #FF4D6D 0%, #FF6B6B 50%, #FF4D6D 100%);
  padding: 12px 20px; border-radius: 12px; margin-bottom: 16px;
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; animation: bannerPulse 3s ease-in-out infinite;
}
.live-profile-banner__left {
  display: flex; align-items: center; gap: 10px; color: #fff;
}
.live-profile-banner__dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: #fff; animation: livePulse 1.5s ease-in-out infinite;
}
.live-profile-banner__text { font-size: 16px; font-weight: 700; }
.live-profile-banner__viewers {
  color: rgba(255,255,255,0.9); font-size: 13px; font-weight: 500;
}
.live-profile-banner__cta {
  background: #fff; color: #FF4D6D; border: none;
  padding: 8px 16px; border-radius: 8px; font-weight: 600;
  font-size: 13px; cursor: pointer; transition: transform 100ms;
}
.live-profile-banner__cta:hover { transform: scale(1.05); }

/* ---- DM Live Prompt ---- */
.live-dm-prompt {
  background: linear-gradient(90deg, rgba(255,77,109,0.1), rgba(0,229,255,0.05));
  border: 1px solid rgba(255,77,109,0.2); border-radius: 8px;
  padding: 8px 12px; margin-bottom: 8px;
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  transition: background 150ms;
}
.live-dm-prompt:hover { background: rgba(255,77,109,0.15); }
.live-dm-prompt__text { color: #fff; font-size: 12px; flex: 1; }
.live-dm-prompt__text strong { color: #FF6B6B; }

/* ---- Shopping Banner (Store) ---- */
.live-shopping-banner {
  background: linear-gradient(90deg, rgba(0,229,255,0.08), rgba(255,77,109,0.08));
  border: 1px solid rgba(0,229,255,0.2); border-radius: 12px;
  padding: 8px 16px; margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.live-shopping-banner__label {
  display: inline-flex; align-items: center; gap: 4px;
  color: #00E5FF; font-size: 13px; font-weight: 600;
}

/* ---- Explore Section Header ---- */
.live-now-section { margin-bottom: 24px; }
.live-now-section__header {
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
}
.live-now-section__title {
  color: #fff; font-size: 18px; font-weight: 700; margin: 0;
}
.live-now-section__count {
  background: #FF4D6D; color: #fff; font-size: 11px;
  padding: 2px 8px; border-radius: 10px; font-weight: 600;
}

/* ---- Full-Screen Overlay ---- */
.live-fullscreen-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(0,0,0,0.95);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 200ms ease;
}
.live-fullscreen-overlay__close {
  position: absolute; top: 16px; right: 16px;
  background: rgba(255,255,255,0.1); border: none; color: #fff;
  width: 36px; height: 36px; border-radius: 50%;
  font-size: 18px; cursor: pointer; z-index: 2;
  display: flex; align-items: center; justify-content: center;
}
.live-fullscreen-overlay__close:hover { background: rgba(255,255,255,0.2); }
.live-fullscreen-overlay .live-window { border-radius: 0; max-height: 100vh; }

/* ---- Animations ---- */
@keyframes livePulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.15); }
}
@keyframes pipSlideIn {
  from { opacity: 0; transform: translateY(20px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes bannerPulse {
  0%, 100% { box-shadow: 0 0 0 rgba(255,77,109,0); }
  50% { box-shadow: 0 0 20px rgba(255,77,109,0.3); }
}

/* ---- Hide when empty ---- */
.live-window--hidden { display: none !important; }
.live-now-section--empty { display: none; }
