/* === Reset & Base === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --gold: #C8A44E;
  --gold-light: #D4B96A;
  --gold-dark: #A8883A;
  --bg-dark: #1A1714;
  --bg-card: #252220;
  --bg-card-hover: #2E2A27;
  --bg-nav: #131110;
  --text-cream: #F0E8D8;
  --text-muted: #9B9080;
  --text-body: #D4CABC;
  --border: #3A3530;
  --danger: #C44E4E;
  --radius: 8px;
  --radius-lg: 12px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-dark);
  color: var(--text-body);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--text-cream);
  line-height: 1.3;
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--gold-light);
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: 780px;
}

.section {
  padding: 64px 0;
}

/* === Navigation === */
.main-nav {
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-cream);
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.1rem;
}

.nav-logo img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-cream);
  transition: transform 0.3s;
}

/* === Hero === */
.hero {
  text-align: center;
  padding: 80px 24px;
  background: linear-gradient(180deg, var(--bg-nav) 0%, var(--bg-dark) 100%);
}

.hero--compact {
  padding: 40px 24px;
  text-align: left;
}

.hero-top {
  display: flex;
  align-items: center;
  gap: 32px;
  max-width: 800px;
  margin: 0 auto;
}

.hero-text {
  flex: 1;
}

.hero-content {
  max-width: 700px;
  margin: 0 auto;
}

.hero--compact .hero-content {
  max-width: 900px;
}

.hero-logo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 3px solid var(--gold);
  box-shadow: 0 0 40px rgba(200, 164, 78, 0.2);
  margin-bottom: 24px;
}

.hero--compact .hero-logo {
  width: 140px;
  height: 140px;
  margin-bottom: 0;
  flex-shrink: 0;
}

.hero h1 {
  font-size: 2.8rem;
  margin-bottom: 8px;
}

.hero--compact h1 {
  font-size: 2.2rem;
  margin-bottom: 4px;
}

.hero-tagline {
  font-size: 1.25rem;
  color: var(--gold);
  font-weight: 500;
  margin-bottom: 20px;
}

.hero--compact .hero-tagline {
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.hero-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.hero-meta a {
  color: var(--gold);
}

.hero-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 14px;
}

.hero-badge {
  display: inline-block;
  padding: 6px 20px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.hero-platforms {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hero--compact .hero-platforms {
  justify-content: flex-start;
  gap: 10px;
}

.hero--compact .platform-link {
  padding: 6px 16px;
  font-size: 0.8rem;
}

.platform-link {
  display: inline-block;
  padding: 10px 24px;
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  color: var(--gold);
  font-weight: 500;
  font-size: 0.9rem;
  transition: background 0.2s, color 0.2s;
}

.platform-link:hover {
  background: var(--gold);
  color: var(--bg-dark);
}

/* === About Blurb (Home) === */
.about-blurb {
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.about-blurb h2 {
  font-size: 2rem;
  margin-bottom: 16px;
}

.about-blurb p {
  max-width: 680px;
  margin: 0 auto;
  font-size: 1.05rem;
}

/* === Interact Section (Home) === */
.interact-section {
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}

.interact-section h2 {
  text-align: center;
  font-size: 1.4rem;
  margin-bottom: 16px;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.interact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.interact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: border-color 0.2s, background 0.2s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  text-align: left;
}

.interact-card:hover {
  border-color: var(--gold-dark);
  background: var(--bg-card-hover);
  color: inherit;
}

.interact-icon {
  color: var(--gold);
  flex-shrink: 0;
  display: flex;
}

.interact-info h3 {
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.interact-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

.interact-info .sms-disclosure {
  font-size: 0.7rem;
  opacity: 0.8;
  margin-top: 6px;
  line-height: 1.35;
}

.interact-info .sms-disclosure a {
  color: inherit;
  text-decoration: underline;
}

@media (max-width: 768px) {
  .hero-top {
    flex-direction: column;
    text-align: center;
  }

  .hero--compact .hero-platforms {
    justify-content: center;
  }

  .interact-grid {
    grid-template-columns: 1fr;
  }
}

/* === Episode Cards === */
.episodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.episode-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color 0.2s, background 0.2s;
}

.episode-card:hover {
  border-color: var(--gold-dark);
  background: var(--bg-card-hover);
}

.episode-card-header {
  margin-bottom: 12px;
}

.episode-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.episode-duration {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: 4px;
}

.live-status-banner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin: 8px 0;
  border: 1px solid transparent;
}

.live-status-banner--on {
  background: rgba(220, 38, 38, 0.12);
  color: #dc2626;
  border-color: rgba(220, 38, 38, 0.3);
}

.live-status-banner--off {
  background: rgba(100, 100, 100, 0.08);
  color: var(--text-muted);
  border-color: rgba(100, 100, 100, 0.2);
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.live-status-banner--on .live-dot {
  animation: live-pulse 1.6s infinite;
}

.live-topic {
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.5); }
  50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(220, 38, 38, 0); }
}

.live-questions-panel {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.06), rgba(59, 130, 246, 0.04));
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.live-questions-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
}

.live-questions-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: #7c3aed;
}

.live-questions-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.live-questions-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
}

.live-questions-empty {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
  padding: 8px 0;
}

.live-question-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.9rem;
  line-height: 1.45;
}

.live-question-card--new {
  animation: live-question-appear 0.4s ease-out;
}

@keyframes live-question-appear {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.live-question-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.live-question-time {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.live-question-dismiss {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  border-radius: 4px;
}

.live-question-dismiss:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text);
}

.live-question-text {
  color: var(--text);
}

.episode-card h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.episode-card h3 a {
  color: var(--text-cream);
}

.episode-card h3 a:hover {
  color: var(--gold);
}

.episode-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.episode-link {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-top: 12px;
}

.episodes-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.episode-card-wide {
  max-width: 100%;
}

/* === Audio Player === */
.audio-player {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius);
}

.audio-player-large {
  padding: 16px 20px;
  margin-bottom: 32px;
}

.play-btn {
  background: var(--gold);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s;
}

.play-btn:hover {
  background: var(--gold-light);
}

.play-btn-large {
  width: 48px;
  height: 48px;
}

.play-btn svg {
  width: 16px;
  height: 16px;
  fill: var(--bg-dark);
}

.play-btn-large svg {
  width: 20px;
  height: 20px;
}

.progress-bar {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  cursor: pointer;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 3px;
  width: 0%;
  transition: width 0.1s;
}

.time-display {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  min-width: 40px;
  text-align: right;
  flex-shrink: 0;
}

/* === Page Headers === */
.page-header {
  padding: 48px 0 32px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg-nav) 0%, var(--bg-dark) 100%);
}

.page-header h1 {
  font-size: 2.2rem;
  margin-bottom: 8px;
}

.page-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.back-link {
  display: inline-block;
  font-size: 0.85rem;
  margin-bottom: 12px;
  color: var(--text-muted);
}

.back-link:hover {
  color: var(--gold);
}

/* === About Page === */
.about-hero {
  text-align: center;
  margin-bottom: 40px;
}

.about-logo {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 3px solid var(--gold);
}

.about-content h2 {
  font-size: 1.6rem;
  margin: 32px 0 12px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.about-content h2:first-child {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.about-content p {
  margin-bottom: 12px;
}

.topic-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 12px 0;
}

.topic-list li {
  padding: 12px 16px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border-left: 3px solid var(--gold);
}

.host-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
}

.hosts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.host-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--border);
  margin: 0 auto 16px;
}

.host-title {
  color: var(--gold);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 12px;
}

/* === Show Notes === */
.episode-description,
.show-notes {
  margin-bottom: 32px;
}

.episode-description h2,
.show-notes h2 {
  font-size: 1.4rem;
  margin-bottom: 12px;
}

.show-notes-content {
  padding: 20px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border-left: 3px solid var(--gold);
}

.show-notes-content a {
  color: var(--gold);
}

.share-links {
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.share-links h3 {
  margin-bottom: 12px;
}

.share-btn {
  display: inline-block;
  padding: 8px 20px;
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  color: var(--gold);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.share-btn:hover {
  background: var(--gold);
  color: var(--bg-dark);
}

/* === Contact Page === */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.contact-card h2 {
  font-size: 1.3rem;
  margin-bottom: 16px;
}

.platform-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.platform-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-radius: var(--radius);
  color: var(--text-body);
  transition: background 0.2s;
}

.platform-item:hover {
  background: rgba(200, 164, 78, 0.1);
  color: var(--gold);
}

.contact-note {
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* === Buttons === */
.btn {
  display: inline-block;
  padding: 12px 28px;
  background: var(--gold);
  color: var(--bg-dark);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s;
  text-align: center;
}

.btn:hover {
  background: var(--gold-light);
  color: var(--bg-dark);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
}

.btn-outline:hover {
  background: var(--gold);
  color: var(--bg-dark);
}

.btn-sm {
  padding: 6px 16px;
  font-size: 0.85rem;
}

.btn-danger {
  background: var(--danger);
}

.btn-danger:hover {
  background: #D46060;
}

.section-cta {
  text-align: center;
  margin-top: 16px;
}

/* === Admin === */
.admin-login {
  max-width: 400px;
  margin: 0 auto;
}

.admin-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.admin-form h2 {
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-cream);
  margin-bottom: 6px;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-body);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.form-group input[type="file"] {
  color: var(--text-body);
}

.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.alert-error {
  background: rgba(196, 78, 78, 0.15);
  border: 1px solid var(--danger);
  color: #F0A0A0;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.admin-section-title {
  margin: 40px 0 20px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.admin-episodes {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-episode-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.admin-episode-info {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.admin-episode-info h3 {
  font-size: 1.1rem;
}

.episode-file {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: monospace;
}

.admin-episode-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.admin-edit-form {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* === Empty State === */
.empty-state {
  text-align: center;
  padding: 48px;
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* === Footer === */
.site-footer {
  background: var(--bg-nav);
  border-top: 1px solid var(--border);
  padding: 48px 0 0;
  margin-top: auto;
}

.footer-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}

.footer-logo {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-location {
  font-size: 0.85rem;
}

.footer-affiliate {
  font-size: 0.8rem;
  margin-top: 4px;
}

.footer-links h4 {
  font-size: 0.95rem;
  margin-bottom: 12px;
  color: var(--gold);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
}

.footer-links a {
  display: block;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 4px 0;
}

.footer-links a:hover {
  color: var(--gold);
}

.footer-bottom {
  text-align: center;
  padding: 20px;
  margin-top: 40px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-legal {
  margin-top: 8px;
}

.footer-legal a {
  color: var(--text-muted);
  transition: color 0.2s;
}

.footer-legal a:hover {
  color: var(--gold);
}

/* === Legal Pages === */
.legal-content h2 {
  margin-top: 32px;
  margin-bottom: 12px;
  font-size: 1.3rem;
}

.legal-content h3 {
  margin-top: 20px;
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.legal-content p,
.legal-content ul {
  margin-bottom: 12px;
}

.legal-content ul {
  padding-left: 24px;
}

.legal-content li {
  margin-bottom: 6px;
}

.legal-updated {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-style: italic;
}

/* === Mobile === */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-nav);
    flex-direction: column;
    padding: 16px 24px;
    gap: 0;
    border-bottom: 1px solid var(--border);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li a {
    display: block;
    padding: 12px 0;
    border-bottom: none;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-logo {
    width: 150px;
    height: 150px;
  }

  .episodes-grid {
    grid-template-columns: 1fr;
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .admin-episode-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* === Chat Widget === */
.chat-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.chat-fab {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gold);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: background 0.2s, transform 0.2s;
  position: relative;
  color: var(--bg-dark);
}

.chat-fab:hover {
  background: var(--gold-light);
  transform: scale(1.05);
}

.chat-fab svg {
  width: 24px;
  height: 24px;
}

.chat-fab--open {
  background: var(--bg-card);
  color: var(--gold);
  border: 1px solid var(--border);
}

.chat-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--danger);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

.chat-panel {
  position: absolute;
  bottom: 68px;
  right: 0;
  width: 360px;
  height: 480px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.chat-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-header-title {
  font-weight: 600;
  color: var(--text-cream);
  font-size: 0.95rem;
}

.chat-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-topic {
  font-size: 0.75rem;
  color: var(--gold);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.chat-close:hover {
  color: var(--text-cream);
}

.chat-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}

.chat-live-dot--on {
  background: #4CAF50;
  box-shadow: 0 0 8px rgba(76, 175, 80, 0.6);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

.chat-offline-overlay {
  position: absolute;
  inset: 0;
  background: rgba(26, 23, 20, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

.chat-offline-content {
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
}

.chat-offline-content svg {
  color: var(--gold);
  margin-bottom: 12px;
}

.chat-offline-content h3 {
  font-size: 1rem;
  color: var(--text-cream);
  margin-bottom: 8px;
}

.chat-offline-content p {
  font-size: 0.85rem;
}

.chat-message {
  padding: 6px 0;
}

.chat-message--new {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-message-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.chat-sender {
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--gold);
}

.chat-sender--host {
  color: var(--gold-light);
  background: rgba(200, 164, 78, 0.15);
  padding: 1px 6px;
  border-radius: 4px;
}

.chat-channel-badge {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: 0.3px;
}

.chat-channel--email {
  background: rgba(255, 152, 0, 0.2);
  color: #FFB74D;
}

.chat-channel--sms {
  background: rgba(76, 175, 80, 0.2);
  color: #81C784;
}

.chat-time {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-left: auto;
}

.chat-text {
  font-size: 0.85rem;
  color: var(--text-body);
  word-break: break-word;
}

.chat-reply-block {
  margin-top: 4px;
  padding: 6px 10px;
  background: rgba(200, 164, 78, 0.08);
  border-left: 2px solid var(--gold);
  border-radius: 0 4px 4px 0;
}

.chat-reply-context {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-left: 6px;
}

.chat-reply-text {
  font-size: 0.8rem;
  color: var(--text-body);
}

.chat-notice {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 4px;
  animation: fadeIn 0.3s ease;
}

.chat-input-area {
  padding: 12px 16px;
  background: var(--bg-nav);
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.chat-name-input {
  width: 100%;
  padding: 6px 10px;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-body);
  font-size: 0.8rem;
  font-family: inherit;
}

.chat-name-input:focus {
  outline: none;
  border-color: var(--gold);
}

.chat-message-row {
  display: flex;
  gap: 8px;
}

.chat-message-input {
  flex: 1;
  padding: 8px 12px;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-body);
  font-size: 0.85rem;
  font-family: inherit;
}

.chat-message-input:focus {
  outline: none;
  border-color: var(--gold);
}

.chat-message-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.chat-send-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  background: var(--gold);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg-dark);
  flex-shrink: 0;
  transition: background 0.2s;
}

.chat-send-btn:hover:not(:disabled) {
  background: var(--gold-light);
}

.chat-send-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* === Admin Chat Dashboard === */
.admin-chat-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-chat-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-chat-topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.admin-chat-topbar-right {
  display: flex;
  gap: 8px;
}

.live-toggle-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--bg-card);
  border: 2px solid var(--danger);
  color: var(--danger);
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.3s;
}

.live-toggle-btn--on {
  border-color: #4CAF50;
  color: #4CAF50;
  background: rgba(76, 175, 80, 0.1);
}

.live-toggle-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--danger);
}

.live-toggle-btn--on .live-toggle-dot {
  background: #4CAF50;
  box-shadow: 0 0 8px rgba(76, 175, 80, 0.6);
  animation: pulse-dot 2s infinite;
}

.admin-topic-group {
  display: flex;
  gap: 8px;
  align-items: center;
}

.admin-topic-input {
  padding: 8px 12px;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-body);
  font-family: inherit;
  font-size: 0.85rem;
  width: 240px;
}

.admin-topic-input:focus {
  outline: none;
  border-color: var(--gold);
}

.admin-chat-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-nav);
  padding: 4px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.admin-chat-tab {
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.admin-chat-tab:hover {
  color: var(--text-cream);
  background: rgba(255, 255, 255, 0.05);
}

.admin-chat-tab.active {
  background: var(--bg-card);
  color: var(--gold);
}

.tab-badge {
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--danger);
  color: #fff;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.tab-badge:empty {
  display: none;
}

.admin-message-feed {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 600px;
  overflow-y: auto;
  padding: 4px;
}

.admin-message {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  transition: border-color 0.2s, background 0.2s;
}

.admin-message--unread {
  border-left: 3px solid var(--gold);
}

.admin-message--starred {
  border-left: 3px solid #FFD700;
  background: rgba(255, 215, 0, 0.03);
}

.admin-message--new {
  animation: fadeIn 0.3s ease;
}

.admin-message-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.admin-channel-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.admin-channel--chat {
  background: rgba(100, 149, 237, 0.2);
  color: #82B1FF;
}

.admin-channel--email {
  background: rgba(255, 152, 0, 0.2);
  color: #FFB74D;
}

.admin-channel--sms {
  background: rgba(76, 175, 80, 0.2);
  color: #81C784;
}

.admin-sender {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-cream);
}

.admin-identifier {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: monospace;
}

.admin-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: auto;
}

.admin-message-body {
  font-size: 0.9rem;
  color: var(--text-body);
  line-height: 1.5;
  word-break: break-word;
}

.admin-reply-display {
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(200, 164, 78, 0.08);
  border-left: 2px solid var(--gold);
  border-radius: 0 4px 4px 0;
  font-size: 0.85rem;
  color: var(--text-body);
}

.admin-reply-label {
  font-weight: 600;
  color: var(--gold);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.admin-message-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.admin-action-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.8rem;
  transition: all 0.2s;
}

.admin-action-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.star-btn {
  font-size: 1rem;
  padding: 2px 8px;
}

.admin-reply-form {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.admin-reply-input {
  flex: 1;
  padding: 8px 12px;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-body);
  font-family: inherit;
  font-size: 0.85rem;
}

.admin-reply-input:focus {
  outline: none;
  border-color: var(--gold);
}

.admin-empty-state {
  text-align: center;
  padding: 48px;
  color: var(--text-muted);
  font-size: 1rem;
}

.admin-header-actions {
  display: flex;
  gap: 8px;
}

/* === Chat Widget Mobile === */
@media (max-width: 768px) {
  .chat-widget {
    bottom: 16px;
    right: 16px;
  }

  .chat-panel {
    position: fixed;
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    height: 70vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }

  .chat-fab--open + .chat-panel {
    bottom: 0;
  }

  .admin-chat-topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-chat-topbar-right {
    flex-wrap: wrap;
  }

  .admin-topic-input {
    width: 160px;
  }

  .admin-chat-tabs {
    flex-wrap: wrap;
  }
}
