/**
 * Khatutik Platform — Live Cam Portal View Styles
 * Follows Design Standards: Fredoka (Headings), Nunito (Body), JetBrains Mono (Badges)
 */

.live-portal-body {
  background-color: var(--color-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.portal-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border-light);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.portal-header-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.portal-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
}

.portal-brand img {
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.portal-brand-text {
  display: flex;
  flex-direction: column;
}

.portal-brand-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.1;
}

.portal-brand-subtitle {
  font-size: 0.78rem;
  color: var(--color-muted);
  font-weight: 600;
}

.portal-user-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #F1F5F9;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-text);
  border: 1px solid var(--color-border-light);
}

.btn-header-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-header-link.admin-link {
  background: var(--color-primary-light);
  color: var(--color-primary);
  border: 1px solid rgba(2, 132, 199, 0.25);
}

.btn-header-link.admin-link:hover {
  background: var(--color-primary);
  color: #FFFFFF;
}

.btn-header-link.logout-link {
  background: transparent;
  color: var(--color-muted);
  border: 1px solid var(--color-border);
}

.btn-header-link.logout-link:hover {
  background: var(--color-danger-light);
  color: var(--color-danger);
  border-color: var(--color-danger);
}

/* Main Container */
.portal-main {
  flex: 1;
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}


/* Portal Title Bar */
.portal-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.portal-page-heading {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-text);
}

.portal-page-desc {
  font-size: 0.92rem;
  color: var(--color-muted);
  margin-top: 0.2rem;
}

/* Streaming State Offline Banner */
.streaming-offline-card {
  background: #FFFFFF;
  border: 2px dashed #CBD5E1;
  border-radius: var(--radius-lg);
  padding: 4rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
}

.offline-icon {
  font-size: 3rem;
  line-height: 1;
}

.streaming-offline-card h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: #64748B;
}

.streaming-offline-card p {
  color: var(--color-muted);
  max-width: 480px;
  line-height: 1.6;
}

/* Stream Tabs Navigation */
.stream-tabs-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  overflow-x: auto;
  padding: 0.5rem 0.25rem;
  scrollbar-width: thin;
}

.stream-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-full);
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}

.stream-tab-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: translateY(-1px);
}

.stream-tab-btn.active {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
  color: #FFFFFF;
  border-color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}

.stream-tab-btn .tab-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #CBD5E1;
}

.stream-tab-btn.active .tab-dot {
  background: #A7F3D0;
  box-shadow: 0 0 8px #10B981;
}

/* Stream Viewer Card */
.stream-viewport-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
}


.stream-card-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: #F8FAFC;
  border-bottom: 1px solid var(--color-border-light);
}

.stream-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.active-stream-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-text);
}

.stream-meta-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--color-muted);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* Video Stage */
.video-stage-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-stage-container video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Privacy Audio Muted Pill (Requirement 4) */
.audio-privacy-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #F1F5F9;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  pointer-events: none;
  z-index: 10;
}

.video-live-pill {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(220, 38, 38, 0.9);
  color: #FFFFFF;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  z-index: 10;
}

.video-live-pill .pulse-dot {
  width: 6px;
  height: 6px;
  background: #FFFFFF;
  border-radius: 50%;
  animation: pulseLive 1.5s infinite;
}

@keyframes pulseLive {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
  100% { opacity: 1; transform: scale(1); }
}

/* Schedule Offline Overlay */
.schedule-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2rem;
  text-align: center;
  color: #FFFFFF;
  z-index: 15;
}

.schedule-overlay h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: #F59E0B;
}

.schedule-overlay p {
  color: #CBD5E1;
  max-width: 440px;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Player Controls Bar */
.player-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  background: #0F172A;
  color: #CBD5E1;
  border-top: 1px solid #1E293B;
}

.controls-left, .controls-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-player-action {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #F8FAFC;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.15s ease;
}

.btn-player-action:hover {
  background: rgba(255, 255, 255, 0.18);
}
