/* ============================================================
   broadcast.css — Broadcast Ops page styles
   Mirrors infrastructure.css patterns with bcast- prefix.
   Reuses pulse panel classes from infrastructure.css where possible.
   ============================================================ */

/* ---- Page Container ---- */
#broadcast-view {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  background: #FFF7ED;
  color: #475569;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  overflow: hidden;
}

body.broadcast-active #expanded-title,
body.broadcast-active #bg-layer,
body.broadcast-active #c4-link {
  display: none !important;
}

/* ---- Body + Scroll Container ---- */
.bcast-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px 10cm;
}

/* ---- Team Hero Panel ---- */
.bcast-team-hero {
  padding: 32px 28px 24px;
  text-align: center;
  background: linear-gradient(180deg, #fff7ed 0%, #fff 100%);
  border-bottom: 1px solid #e5e7eb;
}

.bcast-team-mission {
  font-size: 0.88rem;
  color: #64748b;
  margin-bottom: 20px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.bcast-team-mission--bold {
  font-weight: 700;
  font-style: italic;
  color: #1e293b;
  font-size: 1rem;
}

.bcast-team-lineup {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.bcast-team-member {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 100px;
}

.bcast-team-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1), 0 0 0 2px rgba(234,88,12,0.2);
  transition: transform 0.2s, box-shadow 0.2s;
}
.bcast-team-avatar:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15), 0 0 0 3px rgba(234,88,12,0.3);
}

.bcast-team-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: #1e293b;
}

.bcast-team-role {
  font-size: 0.7rem;
  font-weight: 500;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.bcast-team-strapline {
  font-size: 0.68rem;
  color: #94a3b8;
  font-style: italic;
  max-width: 160px;
  text-align: center;
}

.bcast-team-modes {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.bcast-mode-pill {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 14px;
  background: #ea580c;
  color: #fff;
  font-size: 0.72rem;
  font-family: 'Cascadia Code', 'Fira Code', monospace;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
}
.bcast-mode-pill:hover {
  background: #c2410c;
}

/* ---- Broadcast Pulse Panel ---- */
/* Reuses .pulse-panel, .pulse-cell, .pulse-label, .pulse-value, .pulse-detail,
   .pulse-footer, .pulse-freshness, .pulse-refresh-btn from infrastructure.css
   with broadcast-specific IDs */

#bcast-pulse-panel {
  display: flex;
  align-items: stretch;
  gap: 1px;
  max-width: 820px;
  margin: 16px auto 0;
  background: #e5e7eb;
  border-radius: 6px;
  overflow: hidden;
  font-size: 0.7rem;
  min-height: 56px;
}

.bcast-pulse-cell {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 6px;
  background: #fafbfc;
  text-align: center;
  position: relative;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  user-select: none;
}
.bcast-pulse-cell:hover {
  background: #f1f5f9;
}

.bcast-pulse-cell[data-state="ok"] {
  color: #94a3b8;
}
.bcast-pulse-cell[data-state="ok"] .bcast-pulse-value {
  color: #94a3b8;
}
.bcast-pulse-cell[data-state="warn"] {
  background: #fffbeb;
  box-shadow: inset 0 -2px 0 #f59e0b;
}
.bcast-pulse-cell[data-state="warn"] .bcast-pulse-label,
.bcast-pulse-cell[data-state="warn"] .bcast-pulse-value {
  color: #b45309;
}
.bcast-pulse-cell[data-state="act"] {
  background: #fef2f2;
  box-shadow: inset 0 -2px 0 #ef4444;
  animation: pulse-glow 2s infinite;
}
.bcast-pulse-cell[data-state="act"] .bcast-pulse-label,
.bcast-pulse-cell[data-state="act"] .bcast-pulse-value {
  color: #dc2626;
}
.bcast-pulse-cell[data-state="stale"] {
  background: repeating-linear-gradient(
    -45deg,
    #f1f5f9 0px,
    #f1f5f9 4px,
    #e2e8f0 4px,
    #e2e8f0 5px
  );
}
.bcast-pulse-cell[data-state="stale"]::after {
  content: 'STALE';
  position: absolute;
  bottom: 2px;
  right: 4px;
  font-size: 0.4rem;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.08em;
}

.bcast-pulse-label {
  font-size: 0.5rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  margin-bottom: 2px;
}

.bcast-pulse-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.1;
}

.bcast-pulse-detail {
  font-size: 0.45rem;
  color: #94a3b8;
  margin-top: 1px;
}

.bcast-pulse-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 820px;
  margin: 4px auto 0;
  font-size: 0.5rem;
  color: #cbd5e1;
}

.bcast-pulse-alert {
  display: none;
  max-width: 820px;
  margin: 6px auto 0;
  background: #dc2626;
  color: #fff;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 600;
  animation: slideIn 0.3s ease;
}
.bcast-pulse-alert--visible {
  display: block;
}

/* ---- Pulse Detail Panel ---- */
.bcast-detail-panel {
  max-width: 820px;
  margin: 6px auto 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 0.7rem;
  animation: slideIn 0.25s ease;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Tab Navigation Pills ---- */
.bcast-tab-nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.bcast-tab-pill {
  padding: 4px 11px;
  border-radius: 16px;
  border: 1px solid #E5E7EB;
  background: #fff;
  font-size: 0.72rem;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s;
}
.bcast-tab-pill:hover {
  background: #FFF7ED;
  border-color: #EA580C;
}
.bcast-tab-pill--active {
  background: #EA580C;
  color: #fff;
  border-color: #EA580C;
  font-weight: 600;
}

/* ---- Section Containers ---- */
.bcast-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bcast-section-heading {
  font-size: 0.88rem;
  font-weight: 700;
  color: #EA580C;
  margin: 18px 0 4px 0;
  padding-bottom: 6px;
  border-bottom: 2px solid rgba(234,88,12,0.13);
}

/* ---- Collapsible Sections (reuses infra pattern) ---- */
.bcast-collapsible {
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 8px;
}

.bcast-collapsible-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #172351;
  background: #F8FAFC;
  border: none;
  width: 100%;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}
.bcast-collapsible-toggle:hover {
  background: #FFF7ED;
}

.bcast-collapsible-arrow {
  font-size: 0.7rem;
  color: #EA580C;
  flex-shrink: 0;
}

.bcast-collapsible-body {
  max-height: 0;
  overflow: hidden;
  padding: 0 16px;
  transition: max-height 0.3s ease, padding 0.3s;
}
.bcast-collapsible-body.open {
  max-height: 4000px;
  padding: 12px 16px 16px;
}

/* ---- Platform Health Grid ---- */
.bcast-platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.bcast-platform-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  transition: box-shadow 0.15s;
}
.bcast-platform-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.bcast-platform-card--linkedin {
  grid-column: span 2;
  border-color: #0A66C2;
  border-width: 2px;
}

.bcast-platform-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  width: 28px;
  text-align: center;
}

.bcast-platform-info {
  flex: 1;
  min-width: 0;
}

.bcast-platform-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bcast-platform-status {
  font-size: 0.6rem;
  margin-top: 2px;
}

.bcast-platform-meta {
  font-size: 0.55rem;
  color: #94a3b8;
  margin-top: 3px;
}

/* ---- Status Pills ---- */
.bcast-status {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.bcast-status--connected  { background: #DCFCE7; color: #166534; }
.bcast-status--oauth      { background: #DBEAFE; color: #1E40AF; }
.bcast-status--pending    { background: #FEF3C7; color: #92400E; }
.bcast-status--blocked    { background: #FEE2E2; color: #991B1B; }
.bcast-status--broken     { background: #FEE2E2; color: #991B1B; }
.bcast-status--manual     { background: #F3F4F6; color: #6B7280; }
.bcast-status--not-connected { background: #F3F4F6; color: #6B7280; }

/* ---- Voice Badge ---- */
.bcast-voice-badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.bcast-voice-badge--eoin {
  background: #DBEAFE;
  color: #1E40AF;
}
.bcast-voice-badge--dargan {
  background: #E0E7FF;
  color: #4338CA;
}

/* ---- Content Queue Table ---- */
.bcast-queue-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.75rem;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.bcast-queue-table th {
  background: #F1F5F9;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  font-weight: 600;
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}
.bcast-queue-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #F1F5F9;
  vertical-align: middle;
  color: #334155;
}
.bcast-queue-table tr:hover td {
  background: #FAFBFC;
}

/* ---- Campaign Phase Tracker ---- */
.bcast-phases {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.bcast-phase {
  flex: 1;
  min-width: 140px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
}
.bcast-phase-num {
  font-size: 0.6rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.bcast-phase-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #1e293b;
  margin: 4px 0;
}
.bcast-phase-dates {
  font-size: 0.6rem;
  color: #64748b;
}
.bcast-phase-desc {
  font-size: 0.6rem;
  color: #94a3b8;
  margin-top: 6px;
}

.bcast-phase--complete {
  border-color: #22c55e;
  background: #f0fdf4;
}
.bcast-phase--complete .bcast-phase-num { color: #16a34a; }

.bcast-phase--active {
  border-color: #ea580c;
  background: #fff7ed;
  box-shadow: 0 0 0 2px rgba(234,88,12,0.15);
}
.bcast-phase--active .bcast-phase-num { color: #ea580c; }

.bcast-phase--upcoming {
  border-color: #e2e8f0;
  opacity: 0.7;
}

/* ---- Cadence Grid ---- */
.bcast-cadence-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}

.bcast-cadence-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.bcast-cadence-icon {
  font-size: 1.1rem;
  width: 28px;
  text-align: center;
  color: #64748b;
}

.bcast-cadence-info {
  flex: 1;
}

.bcast-cadence-name {
  font-size: 0.72rem;
  font-weight: 600;
  color: #1e293b;
}

.bcast-cadence-target {
  font-size: 0.6rem;
  color: #94a3b8;
}

.bcast-cadence-voices {
  font-size: 0.55rem;
  color: #64748b;
  margin-top: 2px;
}

/* ---- LinkedIn Deep Dive ---- */
.bcast-linkedin-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.bcast-linkedin-account {
  background: #fff;
  border: 2px solid #0A66C2;
  border-radius: 10px;
  padding: 14px;
  text-align: center;
}

.bcast-linkedin-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0A66C2;
  margin-bottom: 4px;
}

.bcast-linkedin-voice {
  font-size: 0.6rem;
  color: #64748b;
  margin-bottom: 8px;
}

.bcast-linkedin-metric {
  display: flex;
  justify-content: space-between;
  font-size: 0.65rem;
  color: #475569;
  padding: 3px 0;
  border-bottom: 1px solid #f1f5f9;
}

/* ---- Social Stream Cards ---- */
.bcast-stream-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}

.bcast-stream-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
}

.bcast-stream-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #f1f5f9;
}

.bcast-stream-icon {
  font-size: 1rem;
}

.bcast-stream-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: #1e293b;
}

.bcast-stream-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  text-align: center;
}

.bcast-stream-metric-value {
  font-size: 0.85rem;
  font-weight: 700;
  color: #1e293b;
}

.bcast-stream-metric-label {
  font-size: 0.5rem;
  color: #94a3b8;
  text-transform: uppercase;
}

/* ---- Findings (reuses pulse-finding pattern) ---- */
.bcast-finding {
  border-bottom: 1px solid #f1f5f9;
  padding: 3px 0;
}

.bcast-finding-summary {
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 4px 0;
  font-size: 0.7rem;
  color: #334155;
}
.bcast-finding-summary:hover {
  color: #1e293b;
}

.bcast-finding-detail {
  display: none;
  padding: 8px 0 8px 18px;
  border-left: 2px solid #e2e8f0;
  margin-left: 4px;
  margin-bottom: 6px;
  font-size: 0.65rem;
  color: #475569;
}

.bcast-traffic {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 3px;
}
.bcast-traffic--red    { background: #dc2626; box-shadow: 0 0 4px rgba(220,38,38,0.4); }
.bcast-traffic--amber  { background: #f59e0b; box-shadow: 0 0 4px rgba(245,158,11,0.4); }
.bcast-traffic--green  { background: #22c55e; box-shadow: 0 0 4px rgba(34,197,94,0.3); }

/* ---- Action Buttons (findings) ---- */
.bcast-action-btn {
  border: none;
  border-radius: 3px;
  padding: 3px 8px;
  font-size: 0.55rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
.bcast-action-btn:hover { opacity: 0.85; }
.bcast-action-note    { background: #0d9488; color: #fff; }
.bcast-action-task    { background: #3b82f6; color: #fff; }
.bcast-action-dismiss { background: #e2e8f0; color: #64748b; }

/* ---- Create Content Form ---- */
.bcast-create-form {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 12px;
}

.bcast-form-row {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.bcast-form-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: #475569;
  min-width: 60px;
}

.bcast-form-input {
  flex: 1;
  min-width: 180px;
  padding: 5px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  font-size: 0.72rem;
  font-family: inherit;
}

.bcast-form-select {
  padding: 5px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  font-size: 0.72rem;
  font-family: inherit;
  background: #fff;
}

.bcast-form-btn {
  padding: 5px 16px;
  border: none;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.bcast-form-btn--primary {
  background: #ea580c;
  color: #fff;
}
.bcast-form-btn--primary:hover {
  background: #c2410c;
}
.bcast-form-btn--secondary {
  background: #e2e8f0;
  color: #475569;
}

/* ---- Category Group Heading ---- */
.bcast-cat-heading {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  margin: 12px 0 6px;
  padding-bottom: 3px;
  border-bottom: 1px solid #f1f5f9;
}

/* ---- Tables (generic) ---- */
.bcast-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.78rem;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.bcast-table th {
  background: #F1F5F9;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  font-weight: 600;
  padding: 8px 12px;
  text-align: left;
}
.bcast-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #F1F5F9;
  vertical-align: middle;
}

/* ---- Filter Bar ---- */
.bcast-filter-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  align-items: center;
}

.bcast-filter-pill {
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-size: 0.65rem;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s;
}
.bcast-filter-pill:hover {
  border-color: #ea580c;
  color: #ea580c;
}
.bcast-filter-pill--active {
  background: #ea580c;
  color: #fff;
  border-color: #ea580c;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .bcast-body {
    padding: 16px 12px 10cm;
  }
  .bcast-team-lineup {
    gap: 24px;
  }
  .bcast-linkedin-grid {
    grid-template-columns: 1fr;
  }
  .bcast-platform-card--linkedin {
    grid-column: span 1;
  }
}
