/* FreshNews Embed Widget Styles */
/* Host sites can override these with their own CSS */

.fn-embed {
  font-family: var(--fn-font-body, system-ui, -apple-system, sans-serif);
  line-height: var(--fn-body-leading, 1.6);
}

.fn-embed-loading,
.fn-embed-empty,
.fn-embed-error {
  padding: 1rem;
  text-align: center;
  color: var(--fn-text-muted, #6b7280);
}

.fn-embed-error {
  color: var(--fn-accent, #dc2626);
}

/* Skeleton screens for instant loading feel */
.fn-skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: fn-pulse 1.5s infinite;
  border-radius: 4px;
  margin-bottom: 10px;
}

/* Dark mode skeleton animation - check container theme */
html.dark .fn-skeleton,
html[data-theme="dark"] .fn-skeleton,
.dark .fn-skeleton,
[data-theme="dark"] .fn-skeleton,
[data-freshnews-widget][data-theme="dark"] .fn-skeleton {
  background: linear-gradient(90deg, #334155 25%, #475569 50%, #334155 75%) !important;
  background-size: 200% 100%;
}

@keyframes fn-pulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.fn-skeleton-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.fn-skeleton-thumb {
  flex-shrink: 0;
  width: 120px;
  height: 80px;
}

/* Dark mode skeleton thumb - check container theme */
html.dark .fn-skeleton-thumb,
html[data-theme="dark"] .fn-skeleton-thumb,
.dark .fn-skeleton-thumb,
[data-theme="dark"] .fn-skeleton-thumb,
[data-freshnews-widget][data-theme="dark"] .fn-skeleton-thumb {
  background: linear-gradient(90deg, #334155 25%, #475569 50%, #334155 75%) !important;
  background-size: 200% 100%;
}

.fn-skeleton-content {
  flex: 1;
}

.fn-skeleton-title {
  height: 20px;
  margin-bottom: 8px;
  width: 80%;
}

.fn-skeleton-dek {
  height: 16px;
  margin-bottom: 4px;
  width: 100%;
}

.fn-skeleton-dek:nth-child(3) {
  width: 60%;
}

.fn-skeleton-meta {
  height: 12px;
  width: 40%;
  margin-top: 8px;
}

/* Grid skeleton for cards layout */
.fn-skeleton-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--fn-card-gap, 18px);
}

@media (min-width: 768px) {
  .fn-skeleton-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.fn-skeleton-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--fn-radius, 16px);
  overflow: hidden;
  border: var(--fn-card-border, 1px solid var(--fn-border, #e2e8f0));
  background-color: var(--fn-bg-elevated, var(--fn-bg, #ffffff));
}

/* Dark mode skeleton card - check container theme */
html.dark .fn-skeleton-card,
html[data-theme="dark"] .fn-skeleton-card,
.dark .fn-skeleton-card,
[data-theme="dark"] .fn-skeleton-card,
[data-freshnews-widget][data-theme="dark"] .fn-skeleton-card {
  background-color: #1e293b !important; /* slate-800 - dark background */
  border-color: #334155 !important; /* slate-700 - darker border */
}

.fn-skeleton-card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 192px;
}

/* Dark mode skeleton card image - check container theme */
html.dark .fn-skeleton-card-image,
html[data-theme="dark"] .fn-skeleton-card-image,
.dark .fn-skeleton-card-image,
[data-theme="dark"] .fn-skeleton-card-image,
[data-freshnews-widget][data-theme="dark"] .fn-skeleton-card-image {
  background: linear-gradient(90deg, #334155 25%, #475569 50%, #334155 75%) !important;
  background-size: 200% 100%;
}

.fn-skeleton-card-content {
  padding: 1rem;
}

.fn-skeleton-card-meta {
  height: 12px;
  width: 30%;
  margin-bottom: 8px;
}

.fn-skeleton-card-title {
  height: 20px;
  margin-bottom: 8px;
  width: 90%;
}

.fn-skeleton-card-dek {
  height: 16px;
  margin-bottom: 4px;
  width: 100%;
}

.fn-skeleton-card-dek:nth-child(4) {
  width: 70%;
}

/* Insights List */
.fn-embed-insights-list {
  width: 100%;
}

.fn-embed-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Grid layout for cards/magazine style */
.fn-embed-list-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--fn-card-gap, 18px);
}

@media (min-width: 768px) {
  .fn-embed-list-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Card layout for grid style */
.fn-embed-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--fn-radius, 16px);
  border: var(--fn-card-border, 1px solid var(--fn-border, #e2e8f0));
  box-shadow: var(--fn-card-shadow, 0 2px 4px rgba(0, 0, 0, 0.1));
  background-color: var(--fn-bg-elevated, var(--fn-bg, #ffffff));
  transition: transform 0.2s, box-shadow 0.2s;
}

/* Dark mode support for cards */
html.dark .fn-embed-card,
html[data-theme="dark"] .fn-embed-card,
.dark .fn-embed-card,
[data-theme="dark"] .fn-embed-card {
  background-color: #1e293b !important; /* slate-800 - dark background */
  border-color: #334155 !important; /* slate-700 - darker border */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
}

.fn-embed-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--fn-card-shadow, 0 4px 8px rgba(0, 0, 0, 0.15));
}

/* Dark mode hover state for cards */
html.dark .fn-embed-card:hover,
html[data-theme="dark"] .fn-embed-card:hover,
.dark .fn-embed-card:hover,
[data-theme="dark"] .fn-embed-card:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5) !important;
}

.fn-embed-card-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.fn-embed-card-image {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 192px;
  overflow: hidden;
}

.fn-embed-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.fn-embed-card:hover .fn-embed-card-image img {
  transform: scale(1.05);
}

.fn-embed-card-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
}

.fn-embed-card-content .fn-embed-meta {
  margin: 0;
  margin-bottom: 0.25rem;
}

.fn-embed-card-content .fn-embed-title {
  margin: 0;
}

.fn-embed-card-content .fn-embed-dek {
  margin: 0;
  margin-top: 0.25rem;
}

/* Dark mode support for card content text */
html.dark .fn-embed-card-content .fn-embed-dek,
html[data-theme="dark"] .fn-embed-card-content .fn-embed-dek,
.dark .fn-embed-card-content .fn-embed-dek,
[data-theme="dark"] .fn-embed-card-content .fn-embed-dek {
  color: #cbd5e1 !important; /* slate-300 - lighter text for dark mode */
}

html.dark .fn-embed-card-content .fn-embed-meta,
html[data-theme="dark"] .fn-embed-card-content .fn-embed-meta,
.dark .fn-embed-card-content .fn-embed-meta,
[data-theme="dark"] .fn-embed-card-content .fn-embed-meta {
  color: #94a3b8 !important; /* slate-400 - muted text for dark mode */
}

/* Dark mode support for hero section meta */
html.dark .fn-embed-hero-section .fn-embed-meta,
html[data-theme="dark"] .fn-embed-hero-section .fn-embed-meta,
.dark .fn-embed-hero-section .fn-embed-meta,
[data-theme="dark"] .fn-embed-hero-section .fn-embed-meta {
  color: #94a3b8 !important; /* slate-400 - muted text for dark mode */
}

.fn-embed-item {
  margin: 0 0 1.5rem 0;
  padding: 0;
}

.fn-embed-link {
  display: flex;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s;
}

.fn-embed-link:hover {
  opacity: 0.8;
}

.fn-embed-thumb {
  flex-shrink: 0;
  width: 120px;
  height: 80px;
  overflow: hidden;
  border-radius: 4px;
}

.fn-embed-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fn-embed-content {
  flex: 1;
  min-width: 0;
}

.fn-embed-title {
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.3;
  margin: 0 0 0.25rem 0;
  color: var(--fn-text, #111827);
  font-family: var(--fn-font-heading, var(--fn-font-body));
  letter-spacing: var(--fn-heading-tracking, -0.015em);
}

/* Dark mode support for widget embed */
html.dark .fn-embed-title,
html[data-theme="dark"] .fn-embed-title,
.dark .fn-embed-title,
[data-theme="dark"] .fn-embed-title {
  color: #e5e7eb !important; /* slate-200 - light text for dark mode */
}

.fn-embed-dek {
  font-size: 0.875rem;
  color: var(--fn-text-muted, #6b7280);
  margin: 0.25rem 0;
  line-height: var(--fn-body-leading, 1.4);
}

.fn-embed-meta {
  font-size: 0.75rem;
  color: var(--fn-text-meta, #9ca3af);
  margin-top: 0.25rem;
}

/* Article View */
.fn-embed-article {
  max-width: 100%;
  /* Match standalone article styling */
  font-family: var(--fn-font-body, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
  line-height: var(--fn-body-leading, 1.7);
  color: var(--fn-text, #0f172a); /* slate-900 - dark text for good contrast */
}

.fn-embed-article .fn-embed-title {
  font-size: calc(1.875rem * var(--fn-heading-scale, 1));
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
  color: var(--fn-text, #0f172a) !important; /* slate-900 - ensure dark text */
  font-family: var(--fn-font-heading, var(--fn-font-body));
  letter-spacing: var(--fn-heading-tracking, -0.015em);
}

/* Dark mode support for article title in widget embed */
html.dark .fn-embed-article .fn-embed-title,
html[data-theme="dark"] .fn-embed-article .fn-embed-title,
.dark .fn-embed-article .fn-embed-title,
[data-theme="dark"] .fn-embed-article .fn-embed-title {
  color: #f8fafc !important; /* slate-50 - very light text for dark mode */
}

@media (min-width: 768px) {
  .fn-embed-article .fn-embed-title {
    font-size: calc(2.25rem * 1);
  }
}

@media (min-width: 1024px) {
  .fn-embed-article .fn-embed-title {
    font-size: calc(3rem * 1);
  }
}

.fn-embed-article .fn-embed-dek {
  font-size: 1.125rem;
  line-height: var(--fn-body-leading, 1.55);
  color: var(--fn-text-muted, #475569) !important; /* slate-600 - darker for better contrast */
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .fn-embed-article .fn-embed-dek {
    font-size: 1.25rem;
  }
}

.fn-embed-hero {
  margin: 1.5rem 0 1.5rem 0;
  width: 100%;
  /* Fixed height for hero strip - matches standalone page */
  height: 220px;
  max-height: 220px;
  overflow: hidden;
  border-radius: 1rem;
  position: relative;
  /* Ensure content below is visible */
  margin-bottom: 1.5rem;
}

.fn-embed-hero img {
  width: 100%;
  height: 220px;
  max-height: 220px;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Hero caption - ensure it's visible and not cut off */
.fn-embed-hero-caption {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--fn-text-muted, #64748b);
  font-style: italic;
  line-height: 1.4;
}

/* Audio player (article view) - matches standalone ArticleAudioPlayer */
.fn-embed-audio,
.fn-embed-audio-player {
  margin: 1rem 0 1.5rem 0;
  padding: 1rem;
  border-radius: 0.75rem;
  border: 1px solid var(--fn-border, #e2e8f0);
  background: var(--fn-bg-elevated, #f8fafc);
}

html.dark .fn-embed-audio,
html.dark .fn-embed-audio-player,
html[data-theme="dark"] .fn-embed-audio,
html[data-theme="dark"] .fn-embed-audio-player,
.dark .fn-embed-audio,
.dark .fn-embed-audio-player,
[data-theme="dark"] .fn-embed-audio,
[data-theme="dark"] .fn-embed-audio-player {
  border-color: #334155;
  background: rgba(30, 41, 59, 0.5);
}

.fn-embed-audio-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.fn-embed-audio-label {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--fn-text, #1e293b);
}

html.dark .fn-embed-audio-label,
html[data-theme="dark"] .fn-embed-audio-label,
.dark .fn-embed-audio-label,
[data-theme="dark"] .fn-embed-audio-label {
  color: #e2e8f0;
}

.fn-embed-audio-duration {
  font-size: 0.75rem;
  color: var(--fn-text-muted, #64748b);
}

html.dark .fn-embed-audio-duration,
html[data-theme="dark"] .fn-embed-audio-duration,
.dark .fn-embed-audio-duration,
[data-theme="dark"] .fn-embed-audio-duration {
  color: #94a3b8;
}

.fn-embed-audio-element {
  display: block;
  width: 100%;
  margin-top: 0.75rem;
  border-radius: 0.5rem;
}

/* Podcast platform links */
.fn-embed-podcast-links,
.fn-embed-podcast-links-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.fn-embed-podcast-links a {
  display: inline-flex;
  height: 40px;
  width: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--fn-border, #e2e8f0);
  background: var(--fn-bg, #ffffff);
  color: var(--fn-text, #1e293b);
  text-decoration: none;
  transition: all 0.2s;
  flex-shrink: 0;
}

.fn-embed-podcast-links a:hover {
  background: var(--fn-bg-elevated, #f8fafc);
  border-color: var(--fn-border, #cbd5e1);
  transform: scale(1.05);
}

html.dark .fn-embed-podcast-links a,
html[data-theme="dark"] .fn-embed-podcast-links a {
  border-color: #475569;
  background: #1e293b;
  color: #e2e8f0;
}

html.dark .fn-embed-podcast-links a:hover,
html[data-theme="dark"] .fn-embed-podcast-links a:hover {
  background: #334155;
  border-color: #64748b;
}

.fn-embed-byline {
  font-weight: 500;
}

.fn-embed-highlights {
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--fn-bg-surface, #f9fafb);
  border-radius: var(--fn-radius, 8px);
}

.fn-embed-highlights h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
}

.fn-embed-highlights ul {
  margin: 0;
  padding-left: 1.5rem;
}

.fn-embed-highlights li {
  margin: 0.5rem 0;
}

.fn-embed-body {
  margin: 0;
  padding: 0;
  color: var(--fn-text, #0f172a); /* slate-900 - ensure body text is dark */
  /* Match standalone: space-y-8 = margin-top: 2rem on children except first */
}

.fn-embed-body > * + * {
  margin-top: 2rem; /* space-y-8 = 32px */
}

.fn-embed-section {
  margin: 0;
  padding: 0;
  /* Match standalone: space-y-4 = margin-top: 1rem on children except first */
}

.fn-embed-section > * + * {
  margin-top: 1rem; /* space-y-4 = 16px */
}

.fn-embed-section:last-child {
  margin-bottom: 0;
}

/* Section heading - matches standalone: text-2xl md:text-3xl font-semibold text-slate-900 dark:text-slate-100 mt-8 mb-4 */
/* In standalone: h2 has mt-8 mb-4, section has space-y-4 */
/* The h2 is first child, so space-y-4 doesn't add margin-top to it */
/* But h2 has mt-8 which adds margin-top: 2rem even as first child */
.fn-embed-section-heading {
  font-size: calc(1.5rem * var(--fn-heading-scale, 1)); /* text-2xl */
  font-weight: 600; /* font-semibold */
  color: var(--fn-text, #0f172a); /* text-slate-900 */
  margin-top: 2rem; /* mt-8 = 32px - applies even to first child */
  margin-bottom: 1rem; /* mb-4 = 16px */
  line-height: 1.3;
  margin-left: 0;
  margin-right: 0;
  padding: 0;
  font-family: var(--fn-font-heading, var(--fn-font-body));
  letter-spacing: var(--fn-heading-tracking, -0.015em);
}

@media (min-width: 768px) {
  .fn-embed-section-heading {
    font-size: 1.875rem; /* md:text-3xl */
  }
}

/* Block-level h2 (for h2 blocks within sections) */
.fn-embed-block-h2 {
  font-size: calc(1.25rem * var(--fn-heading-scale, 1)); /* text-xl */
  font-weight: 600; /* font-semibold */
  color: var(--fn-text, #0f172a); /* text-slate-900 */
  margin-top: 1.5rem; /* mt-6 = 24px */
  margin-bottom: 0.75rem; /* mb-3 = 12px */
  line-height: 1.3;
  font-family: var(--fn-font-heading, var(--fn-font-body));
  letter-spacing: var(--fn-heading-tracking, -0.015em);
}

@media (min-width: 768px) {
  .fn-embed-block-h2 {
    font-size: 1.5rem; /* md:text-2xl */
  }
}

/* Old h2 rules removed - using .fn-embed-section-heading class now */

/* Blocks container - matches standalone's nested space-y-4 div */
.fn-embed-blocks {
  margin: 0;
  padding: 0;
  /* Tailwind space-y-4 = margin-top: 1rem (16px) on children except first */
}

.fn-embed-blocks > * + * {
  margin-top: 1rem; /* space-y-4 = 16px */
}

/* Lists inside blocks are handled by .fn-embed-list class */

/* Paragraph - matches standalone: text-base md:text-lg text-slate-700 dark:text-slate-300 */
.fn-embed-paragraph {
  margin: 0;
  padding: 0;
  line-height: var(--fn-body-leading, 1.55);
  font-size: 1rem; /* text-base */
  color: var(--fn-text-muted, #1e293b) !important; /* slate-800 - much darker for better contrast */
}

@media (min-width: 768px) {
  .fn-embed-paragraph {
    font-size: 1.125rem; /* md:text-lg */
  }
}

/* List - matches standalone: list-disc list-inside space-y-2 ml-4 md:ml-6 text-base md:text-lg text-slate-700 dark:text-slate-300 */
.fn-embed-list {
  list-style-type: disc !important;
  list-style-position: inside !important;
  margin: 0 !important;
  padding: 0 !important;
  margin-left: 1rem !important; /* ml-4 = 16px */
  font-size: 1rem !important; /* text-base */
  color: var(--fn-text-muted, #1e293b) !important; /* slate-800 - darker for better contrast */
}

/* Tailwind space-y-2 = margin-top: 0.5rem (8px) on list items except first */
.fn-embed-list > li + li {
  margin-top: 0.5rem !important; /* space-y-2 = 8px */
}

.fn-embed-list > li {
  margin: 0 !important;
  padding: 0 !important;
  display: list-item !important;
}

@media (min-width: 768px) {
  .fn-embed-list {
    margin-left: 1.5rem !important; /* md:ml-6 = 24px */
    font-size: 1.125rem !important; /* md:text-lg */
  }
}

.fn-embed-list-item {
  margin: 0;
  padding: 0;
  display: list-item;
}

.fn-embed-section p:last-child,
.fn-embed-body p:last-child,
.fn-embed-article p:last-child,
.fn-embed-article .fn-embed-section p:last-child,
.fn-embed-article .fn-embed-body p:last-child {
  margin-bottom: 0 !important;
}

/* Customer Lens - matches standalone styling */
.fn-embed-customer-lens {
  margin: 0;
  padding: 1rem; /* p-4 */
  background: var(--fn-bg-surface, #f8fafc); /* bg-slate-50 */
  border-radius: var(--fn-radius-lg, 0.75rem); /* rounded-xl */
  display: flex;
  flex-direction: column;
  gap: 0.75rem; /* space-y-3 = 12px */
}

@media (min-width: 768px) {
  .fn-embed-customer-lens {
    padding: 1.25rem; /* md:p-5 */
  }
}

.fn-embed-customer-lens-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fn-text-muted, #64748b); /* slate-500 */
}

.fn-embed-customer-lens-text {
  font-size: 1rem;
  font-style: italic;
  line-height: var(--fn-body-leading, 1.55);
  color: var(--fn-text-muted, #334155); /* slate-700 */
  margin: 0;
}

@media (min-width: 768px) {
  .fn-embed-customer-lens {
    padding: 1.5rem;
  }

  .fn-embed-customer-lens-text {
    font-size: 1.125rem;
  }
}

/* Perspective Callout - matches standalone styling */
.fn-embed-perspective {
  margin-top: 2.5rem; /* mt-10 = 40px */
  margin-bottom: 0;
  padding: 1.25rem; /* p-5 */
  border: 1px solid var(--fn-border, #e2e8f0); /* border-slate-200 */
  border-radius: var(--fn-radius-lg, 0.75rem); /* rounded-xl */
  background: var(--fn-bg-surface, #f8fafc); /* bg-slate-50 */
  display: flex;
  flex-direction: column;
  gap: 0;
}

.fn-embed-perspective-title {
  font-size: calc(1.25rem * var(--fn-heading-scale, 1)); /* text-xl */
  font-weight: 600; /* font-semibold */
  color: var(--fn-text, #0f172a); /* text-slate-900 */
  margin: 0;
  line-height: 1.3;
  font-family: var(--fn-font-heading, var(--fn-font-body));
  letter-spacing: var(--fn-heading-tracking, -0.015em);
}

@media (min-width: 768px) {
  .fn-embed-perspective-title {
    font-size: 1.5rem; /* md:text-2xl */
  }
}

.fn-embed-perspective-byline {
  font-size: 0.875rem; /* text-sm */
  font-style: italic;
  color: var(--fn-text-muted, #64748b); /* text-slate-600 */
  margin-top: 0.5rem; /* mt-2 */
  margin-bottom: 0.75rem; /* mb-3 */
}

.fn-embed-perspective-body {
  font-size: 1rem; /* text-base */
  line-height: var(--fn-body-leading, 1.55); /* var(--fn-body-leading, 1.55) */
  color: var(--fn-text-muted, #334155); /* text-slate-700 */
  margin: 0;
}

@media (min-width: 768px) {
  .fn-embed-perspective-body {
    font-size: 1.125rem; /* md:text-lg */
  }
}

/* Legacy opinion styling (for backward compatibility) */
.fn-embed-opinion {
  margin: 2rem 0;
  padding: 1.5rem;
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
  border-radius: 4px;
}

.fn-embed-opinion p {
  margin: 0.75rem 0;
}

.fn-embed-sources {
  margin: 2rem 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--fn-border, #e5e7eb);
}

.fn-embed-sources h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.75rem 0;
  color: var(--fn-text, #0f172a);
  font-family: var(--fn-font-heading, var(--fn-font-body));
  letter-spacing: var(--fn-heading-tracking, -0.015em);
}

.fn-embed-sources ul {
  margin: 0;
  padding-left: 1.5rem;
  font-size: 0.875rem;
  color: var(--fn-text-muted, #6b7280);
}

.fn-embed-sources li {
  margin: 0.5rem 0;
}

/* Footer - matches standalone EmbedFooter styling */
.fn-embed-footer {
  border-top: 1px solid var(--fn-border, #e2e8f0);
  padding: 20px 0;
  margin-top: 2rem;
  background-color: transparent;
}

.fn-embed-footer-content {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--fn-text, #0f172a);
}

.fn-embed-footer-left {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.fn-embed-footer-right {
  display: flex;
  align-items: center;
}

.fn-embed-footer-link {
  color: var(--fn-accent, #2563eb);
  text-decoration: none;
}

.fn-embed-footer-link:hover {
  text-decoration: underline;
}

/* Footer buttons - styled as links */
button.fn-embed-footer-link {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-size: inherit;
  font-family: inherit;
  color: var(--fn-accent, #2563eb);
  text-decoration: none;
}

button.fn-embed-footer-link:hover {
  text-decoration: underline;
}

.fn-embed-footer-separator {
  color: var(--fn-border, #e2e8f0);
}

/* Report Issue Modal */
.fn-embed-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.fn-embed-modal {
  position: relative;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  background: white;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.fn-embed-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  background: white;
  z-index: 10;
}

.fn-embed-modal-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--fn-text, #0f172a);
  font-family: var(--fn-font-heading, var(--fn-font-body));
  letter-spacing: var(--fn-heading-tracking, -0.015em);
}

.fn-embed-modal-close {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  color: var(--fn-text-meta, #94a3b8);
  transition: color 0.2s;
}

.fn-embed-modal-close:hover {
  color: var(--fn-text-muted, #475569);
}

.fn-embed-modal-form {
  padding: 20px;
}

.fn-embed-modal-success {
  padding: 12px;
  margin-bottom: 16px;
  border-radius: 8px;
  background: #f0fdf4;
  border: 1px solid #86efac;
  color: #166534;
  font-size: 14px;
}

.fn-embed-modal-error {
  padding: 12px;
  margin-bottom: 16px;
  border-radius: 8px;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #991b1b;
  font-size: 14px;
}

.fn-embed-modal-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.fn-embed-modal-field {
  display: flex;
  flex-direction: column;
}

.fn-embed-modal-field label {
  font-size: 12px;
  font-weight: 500;
  color: var(--fn-text-muted, #334155);
  margin-bottom: 4px;
}

.fn-embed-modal-field .required {
  color: var(--fn-accent, #ef4444);
}

.fn-embed-modal-field .optional {
  color: var(--fn-text-meta, #94a3b8);
}

.fn-embed-modal-field input,
.fn-embed-modal-field select,
.fn-embed-modal-field textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--fn-border, #cbd5e1);
  border-radius: var(--fn-radius, 8px);
  font-size: 14px;
  font-family: var(--fn-font-body, inherit);
  color: var(--fn-text, #0f172a);
  background: var(--fn-bg, white);
}

.fn-embed-modal-field input:focus,
.fn-embed-modal-field select:focus,
.fn-embed-modal-field textarea:focus {
  outline: none;
  border-color: var(--fn-accent, #2563eb);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.fn-embed-modal-field textarea {
  resize: vertical;
  font-family: monospace;
  font-size: 12px;
}

.fn-embed-modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}

.fn-embed-modal-cancel {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--fn-text-muted, #334155);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s;
}

.fn-embed-modal-cancel:hover {
  color: var(--fn-text, #0f172a);
}

.fn-embed-modal-submit {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--fn-bg, white);
  background: var(--fn-accent, #2563eb);
  border: none;
  border-radius: var(--fn-radius, 8px);
  cursor: pointer;
  transition: opacity 0.2s;
}

.fn-embed-modal-submit:hover {
  opacity: 0.9;
}

.fn-embed-modal-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* About page styling */
.fn-embed-about {
  padding: 0;
}

.fn-embed-about-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

.fn-embed-sources a {
  color: var(--fn-accent, #2563eb);
  text-decoration: none;
}

.fn-embed-sources a:hover {
  text-decoration: underline;
}

/* Magazine Layout - Hero Section (for news pages) */
.fn-embed-hero-section {
  margin-bottom: 2rem;
  width: 100%;
}

/* Dark mode support for hero section */
html.dark .fn-embed-hero-section,
html[data-theme="dark"] .fn-embed-hero-section,
.dark .fn-embed-hero-section,
[data-theme="dark"] .fn-embed-hero-section {
  color: #e5e7eb; /* slate-200 - light text for dark mode */
}

.fn-embed-hero-image-container {
  position: relative;
  width: 100%;
  height: 240px;
  overflow: hidden;
  border-radius: var(--fn-radius-lg, 0.75rem);
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .fn-embed-hero-image-container {
    height: 300px;
  }
}

.fn-embed-hero-link {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
}

.fn-embed-hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.fn-embed-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.2) 50%, transparent 100%);
  pointer-events: none;
}

.fn-embed-hero-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.fn-embed-hero-title-link {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s;
}

.fn-embed-hero-title-link:hover {
  color: var(--fn-accent, #2563eb);
}

.fn-embed-hero-title {
  font-size: calc(1.875rem * var(--fn-heading-scale, 1));
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
  color: var(--fn-text, #0f172a);
  font-family: var(--fn-font-heading, var(--fn-font-body));
  letter-spacing: var(--fn-heading-tracking, -0.015em);
}

/* Dark mode support for hero title */
html.dark .fn-embed-hero-title,
html[data-theme="dark"] .fn-embed-hero-title,
.dark .fn-embed-hero-title,
[data-theme="dark"] .fn-embed-hero-title {
  color: #f8fafc !important; /* slate-50 - very light text for dark mode */
}

@media (min-width: 768px) {
  .fn-embed-hero-title {
    font-size: calc(2.25rem * var(--fn-heading-scale, 1));
  }
}

@media (min-width: 1024px) {
  .fn-embed-hero-title {
    font-size: calc(3rem * var(--fn-heading-scale, 1));
  }
}

.fn-embed-hero-dek {
  font-size: 1.125rem;
  line-height: var(--fn-body-leading, 1.55);
  color: var(--fn-text-muted, #64748b);
  margin: 0;
  max-width: 48rem;
}

/* Dark mode support for hero dek */
html.dark .fn-embed-hero-dek,
html[data-theme="dark"] .fn-embed-hero-dek,
.dark .fn-embed-hero-dek,
[data-theme="dark"] .fn-embed-hero-dek {
  color: #cbd5e1 !important; /* slate-300 - lighter text for dark mode */
}

@media (min-width: 768px) {
  .fn-embed-hero-dek {
    font-size: 1.25rem;
  }
}

/* Magazine Layout - Featured Card (for insights pages) */
.fn-embed-featured-card {
  margin-bottom: 1.5rem;
}

/* Dark mode support for featured card */
html.dark .fn-embed-featured-card,
html[data-theme="dark"] .fn-embed-featured-card,
.dark .fn-embed-featured-card,
[data-theme="dark"] .fn-embed-featured-card {
  background-color: #1e293b !important; /* slate-800 - dark background */
  border-color: #334155 !important; /* slate-700 - darker border */
}

.fn-embed-featured-card .fn-embed-card-image {
  aspect-ratio: 16 / 9;
  max-height: 320px;
}

.fn-embed-featured-card .fn-embed-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--fn-text, #111827);
}

/* Dark mode support for featured card title */
html.dark .fn-embed-featured-card .fn-embed-title,
html[data-theme="dark"] .fn-embed-featured-card .fn-embed-title,
.dark .fn-embed-featured-card .fn-embed-title,
[data-theme="dark"] .fn-embed-featured-card .fn-embed-title {
  color: #f8fafc !important; /* slate-50 - very light text for dark mode */
}

@media (min-width: 768px) {
  .fn-embed-featured-card .fn-embed-title {
    font-size: 1.75rem;
  }
}

/* FAQ List Embed */
.fn-embed-faq-list {
  max-width: 48rem;
  margin: 0 auto;
}

.fn-embed-faq-content {
  padding-bottom: 1rem;
}

.fn-embed-faq-hero {
  margin-bottom: 1.5rem;
}

.fn-embed-faq-title {
  font-size: calc(1.5rem * var(--fn-heading-scale, 1));
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.5rem;
  color: var(--fn-text, #0f172a);
  font-family: var(--fn-font-heading, var(--fn-font-body));
}

.fn-embed-faq-intro {
  font-size: 1rem;
  line-height: var(--fn-body-leading, 1.6);
  color: var(--fn-text-muted, #64748b);
  margin: 0;
}

.fn-embed-faq-section {
  margin-bottom: 1.5rem;
}

.fn-embed-faq-section-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  color: var(--fn-text, #0f172a);
  font-family: var(--fn-font-heading, var(--fn-font-body));
}

.fn-embed-faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.fn-embed-faq-item {
  border: 1px solid var(--fn-border, #e2e8f0);
  border-radius: var(--fn-radius, 8px);
  background-color: var(--fn-bg-elevated, #ffffff);
  overflow: hidden;
}

.fn-embed-faq-question {
  padding: 1rem 1.25rem;
  font-weight: 500;
  color: var(--fn-text, #0f172a);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.fn-embed-faq-question::-webkit-details-marker {
  display: none;
}

.fn-embed-faq-question::after {
  content: '';
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid var(--fn-text-muted, #64748b);
  border-bottom: 2px solid var(--fn-text-muted, #64748b);
  transform: rotate(45deg);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.fn-embed-faq-item[open] .fn-embed-faq-question::after {
  transform: rotate(-135deg);
}

.fn-embed-faq-question:hover {
  background-color: var(--fn-bg-hover, #f8fafc);
}

.fn-embed-faq-answer {
  padding: 0 1.25rem 1rem;
  padding-top: 0;
}

.fn-embed-faq-answer p {
  margin: 0 0 0.75rem;
  font-size: 0.9375rem;
  line-height: var(--fn-body-leading, 1.6);
  color: var(--fn-text-muted, #64748b);
}

.fn-embed-faq-answer p:last-child {
  margin-bottom: 0;
}

.fn-embed-faq-item-links {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.fn-embed-faq-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: white;
  background-color: var(--fn-accent, #2563eb);
  border-radius: 6px;
  text-decoration: none;
}

.fn-embed-faq-cta:hover {
  opacity: 0.9;
}

.fn-embed-faq-signals-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--fn-text-muted, #64748b);
  margin: 0.75rem 0 0.25rem;
}

.fn-embed-faq-signals-list {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.875rem;
}

.fn-embed-faq-signals-list li {
  margin-bottom: 0.25rem;
}

.fn-embed-faq-signal-link {
  color: var(--fn-accent, #2563eb);
  text-decoration: none;
}

.fn-embed-faq-signal-link:hover {
  text-decoration: underline;
}

.fn-embed-faq-explore {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--fn-border, #e2e8f0);
}

.fn-embed-faq-explore-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  color: var(--fn-text, #0f172a);
}

.fn-embed-faq-explore-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.fn-embed-faq-explore-links li {
  margin: 0;
}

.fn-embed-faq-skeleton {
  padding: 1rem 0;
}

.fn-embed-faq-skeleton-item {
  margin-bottom: 1.25rem;
  padding: 1rem;
  border: 1px solid var(--fn-border, #e2e8f0);
  border-radius: var(--fn-radius, 8px);
}

/* Dark mode - FAQ */
html.dark .fn-embed-faq-title,
html[data-theme="dark"] .fn-embed-faq-title,
.dark .fn-embed-faq-title,
[data-theme="dark"] .fn-embed-faq-title,
html.dark .fn-embed-faq-section-title,
html[data-theme="dark"] .fn-embed-faq-section-title,
.dark .fn-embed-faq-section-title,
[data-theme="dark"] .fn-embed-faq-section-title,
html.dark .fn-embed-faq-question,
html[data-theme="dark"] .fn-embed-faq-question,
.dark .fn-embed-faq-question,
[data-theme="dark"] .fn-embed-faq-question,
html.dark .fn-embed-faq-explore-title,
html[data-theme="dark"] .fn-embed-faq-explore-title,
.dark .fn-embed-faq-explore-title,
[data-theme="dark"] .fn-embed-faq-explore-title {
  color: #f8fafc !important;
}

html.dark .fn-embed-faq-intro,
html[data-theme="dark"] .fn-embed-faq-intro,
.dark .fn-embed-faq-intro,
[data-theme="dark"] .fn-embed-faq-intro,
html.dark .fn-embed-faq-answer p,
html[data-theme="dark"] .fn-embed-faq-answer p,
.dark .fn-embed-faq-answer p,
[data-theme="dark"] .fn-embed-faq-answer p,
html.dark .fn-embed-faq-signals-label,
html[data-theme="dark"] .fn-embed-faq-signals-label,
.dark .fn-embed-faq-signals-label,
[data-theme="dark"] .fn-embed-faq-signals-label {
  color: #cbd5e1 !important;
}

html.dark .fn-embed-faq-item,
html[data-theme="dark"] .fn-embed-faq-item,
.dark .fn-embed-faq-item,
[data-theme="dark"] .fn-embed-faq-item {
  border-color: #334155 !important;
  background-color: #1e293b !important;
}

html.dark .fn-embed-faq-question:hover,
html[data-theme="dark"] .fn-embed-faq-question:hover,
.dark .fn-embed-faq-question:hover,
[data-theme="dark"] .fn-embed-faq-question:hover {
  background-color: #334155 !important;
}

html.dark .fn-embed-faq-explore,
html[data-theme="dark"] .fn-embed-faq-explore,
.dark .fn-embed-faq-explore,
[data-theme="dark"] .fn-embed-faq-explore {
  border-color: #334155 !important;
}
