/* SERIS Custom Colors - Force generation */
.bg-seris-gray-50 { background-color: #f8f9fa; }

/* Navigation Header Fixes */
nav.bg-white {
  margin: 0;
  padding: 0;
}

nav.bg-white .flex.items-center {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
}

nav.bg-white a.flex.items-center {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 0.75rem; /* space-x-3 equivalent */
}

/* Global Button Cursor - All buttons should show pointer cursor */
button,
input[type="submit"],
input[type="button"],
input[type="reset"],
a.button,
.button,
[role="button"] {
  cursor: pointer !important;
}

/* Content Assets Table - Ensure no table border, only row dividers */
.bg-white.shadow-seris.rounded-lg table {
  border: none !important;
  border-collapse: separate;
  border-spacing: 0;
}

.bg-white.shadow-seris.rounded-lg table thead,
.bg-white.shadow-seris.rounded-lg table tbody,
.bg-white.shadow-seris.rounded-lg table tr {
  border: none !important;
}

.bg-white.shadow-seris.rounded-lg table th,
.bg-white.shadow-seris.rounded-lg table td {
  border: none !important;
  border-top: 1px solid #e5e7eb;
}

.bg-white.shadow-seris.rounded-lg table thead tr th {
  border-top: none !important;
}

.bg-white.shadow-seris.rounded-lg table tbody tr:first-child td {
  border-top: 1px solid #e5e7eb !important;
}

/* Stimulus Dialog Component Styles */
/* Prevent scrolling while dialog is open */
body:has(dialog[data-dialog-target="dialog"][open]) {
  overflow: hidden;
}

/* Customize the dialog backdrop */
dialog {
  box-shadow: 0 0 0 100vw rgb(0 0 0 / 0.5);
  border: none;
  border-radius: 0.5rem;
  padding: 0;
  max-width: 90vw;
  max-height: 90vh;
  margin: auto;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Dialog content styling */
dialog .dialog-content {
  padding: 1.5rem;
  background: white;
  border-radius: 0.5rem;
}

/* Dialog header */
dialog .dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e5e7eb;
}

dialog .dialog-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
  margin: 0;
}

/* Hide default details/summary marker */
details summary {
  list-style: none;
}

details summary::-webkit-details-marker {
  display: none;
}

/* Rotate chevron when details is open */
details[open] summary svg {
  transform: rotate(180deg);
}

/* Compact collapsible sections (company show, etc.) - collapsed by default */
.collapsible-section summary {
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  border-radius: 0.5rem;
  transition: background-color 0.15s;
}
.collapsible-section summary:hover {
  background-color: #f9fafb;
}
.collapsible-section[open] summary {
  border-bottom: 1px solid #e5e7eb;
  border-radius: 0.5rem 0.5rem 0 0;
}
.collapsible-section .collapsible-section-body {
  padding: 0.75rem 1rem;
}

dialog .dialog-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #6b7280;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 0.25rem;
  transition: color 0.2s;
}

dialog .dialog-close:hover {
  color: #374151;
}

/* Dialog body */
dialog .dialog-body {
  margin-bottom: 1.5rem;
}

/* Dialog footer */
dialog .dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
}

/* Dialog buttons */
dialog .dialog-button {
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-weight: 500;
  transition: all 0.2s;
  cursor: pointer;
  border: 1px solid transparent;
}

dialog .dialog-button--primary {
  background-color: #4f46e5;
  color: white;
}

dialog .dialog-button--primary:hover {
  background-color: #4338ca;
}

dialog .dialog-button--secondary {
  background-color: #f3f4f6;
  color: #374151;
  border-color: #d1d5db;
}

dialog .dialog-button--secondary:hover {
  background-color: #e5e7eb;
}

dialog .dialog-button--danger {
  background-color: #dc2626;
  color: white;
}

dialog .dialog-button--danger:hover {
  background-color: #b91c1c;
}

/* Animations */
@keyframes fade-in {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes fade-out {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.95);
  }
}

/* Add animations */
dialog[data-dialog-target="dialog"][open] {
  animation: fade-in 200ms forwards;
}

dialog[data-dialog-target="dialog"][closing] {
  animation: fade-out 200ms forwards;
}
.bg-seris-gray-100 { background-color: #f1f3f4; }
.bg-seris-gray-200 { background-color: #e8eaed; }
.bg-seris-gray-300 { background-color: #dadce0; }
.bg-seris-gray-400 { background-color: #bdc1c6; }
.bg-seris-gray-500 { background-color: #979dac; }
.bg-seris-gray-600 { background-color: #7d8597; }
.bg-seris-gray-700 { background-color: #5c677d; }
.bg-seris-gray-800 { background-color: #33415c; }
.bg-seris-gray-900 { background-color: #1a1a1a; }

.text-seris-gray-50 { color: #f8f9fa; }
.text-seris-gray-100 { color: #f1f3f4; }
.text-seris-gray-200 { color: #e8eaed; }
.text-seris-gray-300 { color: #dadce0; }
.text-seris-gray-400 { color: #bdc1c6; }
.text-seris-gray-500 { color: #979dac; }
.text-seris-gray-600 { color: #7d8597; }
.text-seris-gray-700 { color: #5c677d; }
.text-seris-gray-800 { color: #33415c; }
.text-seris-gray-900 { color: #1a1a1a; }

.border-seris-gray-50 { border-color: #f8f9fa; }
.border-seris-gray-100 { border-color: #f1f3f4; }
.border-seris-gray-200 { border-color: #e8eaed; }
.border-seris-gray-300 { border-color: #dadce0; }
.border-seris-gray-400 { border-color: #bdc1c6; }
.border-seris-gray-500 { border-color: #979dac; }
.border-seris-gray-600 { border-color: #7d8597; }
.border-seris-gray-700 { border-color: #5c677d; }
.border-seris-gray-800 { border-color: #33415c; }
.border-seris-gray-900 { border-color: #1a1a1a; }

.bg-primary-50 { background-color: #f0f4ff; }
.bg-primary-100 { background-color: #e0e9ff; }
.bg-primary-200 { background-color: #c7d8ff; }
.bg-primary-300 { background-color: #a5bfff; }
.bg-primary-400 { background-color: #7d9eff; }
.bg-primary-500 { background-color: #0466c8; }
.bg-primary-600 { background-color: #0353a4; }
.bg-primary-700 { background-color: #023e7d; }
.bg-primary-800 { background-color: #002855; }
.bg-primary-900 { background-color: #001845; }
.bg-primary-950 { background-color: #001233; }

.text-primary-50 { color: #f0f4ff; }
.text-primary-100 { color: #e0e9ff; }
.text-primary-200 { color: #c7d8ff; }
.text-primary-300 { color: #a5bfff; }
.text-primary-400 { color: #7d9eff; }
.text-primary-500 { color: #0466c8; }
.text-primary-600 { color: #0353a4; }
.text-primary-700 { color: #023e7d; }
.text-primary-800 { color: #002855; }
.text-primary-900 { color: #001845; }
.text-primary-950 { color: #001233; }

.border-primary-50 { border-color: #f0f4ff; }
.border-primary-100 { border-color: #e0e9ff; }
.border-primary-200 { border-color: #c7d8ff; }
.border-primary-300 { border-color: #a5bfff; }
.border-primary-400 { border-color: #7d9eff; }
.border-primary-500 { border-color: #0466c8; }
.border-primary-600 { border-color: #0353a4; }
.border-primary-700 { border-color: #023e7d; }
.border-primary-800 { border-color: #002855; }
.border-primary-900 { border-color: #001845; }
.border-primary-950 { border-color: #001233; }

.hover\:bg-primary-50:hover { background-color: #f0f4ff; }
.hover\:bg-primary-100:hover { background-color: #e0e9ff; }
.hover\:bg-primary-200:hover { background-color: #c7d8ff; }
.hover\:bg-primary-300:hover { background-color: #a5bfff; }
.hover\:bg-primary-400:hover { background-color: #7d9eff; }
.hover\:bg-primary-500:hover { background-color: #0466c8; }
.hover\:bg-primary-600:hover { background-color: #0353a4; }
.hover\:bg-primary-700:hover { background-color: #023e7d; }
.hover\:bg-primary-800:hover { background-color: #002855; }
.hover\:bg-primary-900:hover { background-color: #001845; }
.hover\:bg-primary-950:hover { background-color: #001233; }

.hover\:text-primary-50:hover { color: #f0f4ff; }
.hover\:text-primary-100:hover { color: #e0e9ff; }
.hover\:text-primary-200:hover { color: #c7d8ff; }
.hover\:text-primary-300:hover { color: #a5bfff; }
.hover\:text-primary-400:hover { color: #7d9eff; }
.hover\:text-primary-500:hover { color: #0466c8; }
.hover\:text-primary-600:hover { color: #0353a4; }
.hover\:text-primary-700:hover { color: #023e7d; }
.hover\:text-primary-800:hover { color: #002855; }
.hover\:text-primary-900:hover { color: #001845; }
.hover\:text-primary-950:hover { color: #001233; }

.focus\:ring-primary-50:focus { --tw-ring-color: #f0f4ff; }
.focus\:ring-primary-100:focus { --tw-ring-color: #e0e9ff; }
.focus\:ring-primary-200:focus { --tw-ring-color: #c7d8ff; }
.focus\:ring-primary-300:focus { --tw-ring-color: #a5bfff; }
.focus\:ring-primary-400:focus { --tw-ring-color: #7d9eff; }
.focus\:ring-primary-500:focus { --tw-ring-color: #0466c8; }
.focus\:ring-primary-600:focus { --tw-ring-color: #0353a4; }
.focus\:ring-primary-700:focus { --tw-ring-color: #023e7d; }
.focus\:ring-primary-800:focus { --tw-ring-color: #002855; }
.focus\:ring-primary-900:focus { --tw-ring-color: #001845; }
.focus\:ring-primary-950:focus { --tw-ring-color: #001233; }

.focus\:border-primary-50:focus { border-color: #f0f4ff; }
.focus\:border-primary-100:focus { border-color: #e0e9ff; }
.focus\:border-primary-200:focus { border-color: #c7d8ff; }
.focus\:border-primary-300:focus { border-color: #a5bfff; }
.focus\:border-primary-400:focus { border-color: #7d9eff; }
.focus\:border-primary-500:focus { border-color: #0466c8; }
.focus\:border-primary-600:focus { border-color: #0353a4; }
.focus\:border-primary-700:focus { border-color: #023e7d; }
.focus\:border-primary-800:focus { border-color: #002855; }
.focus\:border-primary-900:focus { border-color: #001845; }
.focus\:border-primary-950:focus { border-color: #001233; }

/* Purple colors for Apollo button */
.bg-purple-600 { background-color: #9333ea; }
.bg-purple-700 { background-color: #7c3aed; }
.hover\:bg-purple-700:hover { background-color: #7c3aed; }
.text-white { color: #ffffff; }
.focus\:ring-purple-500:focus { --tw-ring-color: #a855f7; }

.placeholder-seris-gray-400::placeholder { color: #bdc1c6; }

.shadow-seris { box-shadow: 0 4px 6px -1px rgba(4, 102, 200, 0.1), 0 2px 4px -1px rgba(4, 102, 200, 0.06); }
.shadow-seris-lg { box-shadow: 0 10px 15px -3px rgba(4, 102, 200, 0.1), 0 4px 6px -2px rgba(4, 102, 200, 0.05); }

/* Gradient backgrounds for logo and buttons */
.bg-gradient-to-br { background-image: linear-gradient(to bottom right, #0466c8, #023e7d); }
.bg-gradient-to-r { background-image: linear-gradient(to right, #0466c8, #023e7d); }
.from-primary-500 { --tw-gradient-from: #0466c8; --tw-gradient-to: rgba(4, 102, 200, 0); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); }
.to-primary-700 { --tw-gradient-to: #023e7d; }

/* Report Content Styling */
.report-content {
  line-height: 1.75;
}

.report-content h1,
.report-content h2,
.report-content h3,
.report-content h4 {
  font-weight: 600;
  color: #111827;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.report-content h1 {
  font-size: 1.875rem;
  line-height: 2.25rem;
}

.report-content h2 {
  font-size: 1.5rem;
  line-height: 2rem;
}

.report-content h3 {
  font-size: 1.25rem;
  line-height: 1.75rem;
}

.report-content h4 {
  font-size: 1.125rem;
  line-height: 1.75rem;
}

.report-content p {
  margin-bottom: 1rem;
  line-height: 1.75;
  color: #374151;
}

.report-content ul,
.report-content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.report-content ul {
  list-style-type: disc;
}

.report-content ol {
  list-style-type: decimal;
}

.report-content li {
  margin-bottom: 0.5rem;
  line-height: 1.75;
  color: #374151;
}

.report-content strong {
  font-weight: 600;
  color: #111827;
}

.report-content em {
  font-style: italic;
  color: #4b5563;
}

.report-content code {
  background-color: #f3f4f6;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 0.875em;
  color: #dc2626;
}

.report-content pre {
  background-color: #1f2937;
  color: #f9fafb;
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin-bottom: 1rem;
}

.report-content pre code {
  background-color: transparent;
  padding: 0;
  color: inherit;
}

.report-content a {
  color: #4f46e5;
  text-decoration: underline;
}

.report-content a:hover {
  color: #4338ca;
}

.report-content blockquote {
  border-left: 4px solid #e5e7eb;
  padding-left: 1rem;
  margin-left: 0;
  margin-bottom: 1rem;
  font-style: italic;
  color: #6b7280;
}

.report-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

.report-content table th,
.report-content table td {
  padding: 0.75rem;
  border: 1px solid #e5e7eb;
  text-align: left;
}

.report-content table th {
  background-color: #f9fafb;
  font-weight: 600;
  color: #111827;
}

.report-content hr {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 2rem 0;
}

/* Markdown content styling within reports - Redcarpet output */
.report-content markdown {
  line-height: 1.75;
  color: #374151;
}

/* Ensure markdown-rendered HTML elements are styled */
.report-content h1,
.report-content h2,
.report-content h3,
.report-content h4,
.report-content h5,
.report-content h6 {
  font-weight: 600;
  color: #111827;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.report-content h1 { font-size: 1.875rem; line-height: 2.25rem; }
.report-content h2 { font-size: 1.5rem; line-height: 2rem; }
.report-content h3 { font-size: 1.25rem; line-height: 1.75rem; }
.report-content h4 { font-size: 1.125rem; line-height: 1.75rem; }

.report-content p {
  margin-bottom: 1rem;
  line-height: 1.75;
  color: #374151;
}

.report-content ul,
.report-content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
  color: #374151;
}

.report-content ul {
  list-style-type: disc;
}

.report-content ol {
  list-style-type: decimal;
}

.report-content li {
  margin-bottom: 0.5rem;
  line-height: 1.75;
}

.report-content strong,
.report-content b {
  font-weight: 600;
  color: #111827;
}

.report-content em,
.report-content i {
  font-style: italic;
  color: #4b5563;
}

.report-content a {
  color: #4f46e5;
  text-decoration: underline;
}

.report-content a:hover {
  color: #4338ca;
}

.report-content blockquote {
  border-left: 4px solid #e5e7eb;
  padding-left: 1rem;
  margin-left: 0;
  margin-bottom: 1rem;
  font-style: italic;
  color: #6b7280;
}

.report-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

.report-content table th,
.report-content table td {
  padding: 0.75rem;
  border: 1px solid #e5e7eb;
  text-align: left;
}

.report-content table th {
  background-color: #f9fafb;
  font-weight: 600;
  color: #111827;
}


/* Rich Text Content Styling for Content Assets - Professional Typography */
/* Override Action Text's default trix-content styles */
.rich-text-content,
.rich-text-content .trix-content {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
  font-size: 1.125rem !important; /* 18px base */
  line-height: 1.8 !important;
  color: #1f2937 !important;
  letter-spacing: -0.01em !important;
  max-width: 65ch !important; /* Optimal reading width */
  margin: 0 auto !important;
}

/* CRITICAL: Override Action Text's universal reset that sets all margins/padding to 0 */
/* Action Text has: .trix-content * { margin: 0; padding: 0; } */
/* We need to override this with explicit values for each element type */
.rich-text-content .trix-content * {
  font-family: inherit !important;
}

/* Removed revert rules - explicit margins/padding are set in specific rules below */

/* CRITICAL: Override Action Text's universal reset - must come before specific rules */
.rich-text-content .trix-content h1,
.rich-text-content .trix-content h2,
.rich-text-content .trix-content h3,
.rich-text-content .trix-content h4,
.rich-text-content .trix-content h5,
.rich-text-content .trix-content h6,
.rich-text-content .trix-content p,
.rich-text-content .trix-content ul,
.rich-text-content .trix-content ol,
.rich-text-content .trix-content li,
.rich-text-content .trix-content blockquote {
  /* Explicitly override Action Text's margin: 0; padding: 0; reset */
  margin: revert-layer !important;
  padding: revert-layer !important;
}

/* Target Action Text's trix-content directly */
.rich-text-content .trix-content h1,
.rich-text-content .trix-content h2,
.rich-text-content .trix-content h3,
.rich-text-content .trix-content h4,
.rich-text-content .trix-content h5,
.rich-text-content .trix-content h6,
.rich-text-content h1,
.rich-text-content h2,
.rich-text-content h3,
.rich-text-content h4,
.rich-text-content h5,
.rich-text-content h6 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
  font-weight: 700 !important;
  color: #111827 !important;
  letter-spacing: -0.02em !important;
  margin-top: 2.5rem !important;
  margin-bottom: 1rem !important;
  line-height: 1.3 !important;
}

.rich-text-content h1,
.rich-text-content h2,
.rich-text-content h3,
.rich-text-content h4,
.rich-text-content h5,
.rich-text-content h6 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
  font-weight: 700 !important;
  color: #111827 !important;
  letter-spacing: -0.02em !important;
  margin-top: 2.5rem !important;
  margin-bottom: 1rem !important;
  line-height: 1.3 !important;
}

.rich-text-content .trix-content h1,
.rich-text-content h1 {
  font-size: 2.5rem !important; /* 40px */
  line-height: 1.2 !important;
  margin-top: 0 !important;
  margin-bottom: 1.5rem !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em !important;
}

.rich-text-content .trix-content h2,
.rich-text-content h2 {
  font-size: 2rem !important; /* 32px */
  line-height: 1.3 !important;
  margin-top: 3rem !important;
  margin-bottom: 1.25rem !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0.5rem !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  font-weight: 700 !important;
  border-bottom: 1px solid #e5e7eb !important;
}

.rich-text-content .trix-content h3,
.rich-text-content h3 {
  font-size: 1.5rem !important; /* 24px */
  line-height: 1.4 !important;
  margin-top: 2.5rem !important;
  margin-bottom: 1rem !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  font-weight: 600 !important;
}

.rich-text-content .trix-content h4,
.rich-text-content h4 {
  font-size: 1.25rem !important; /* 20px */
  line-height: 1.5 !important;
  margin-top: 2rem !important;
  margin-bottom: 0.75rem !important;
  font-weight: 600 !important;
}

.rich-text-content .trix-content p,
.rich-text-content p {
  margin-top: 0 !important;
  margin-bottom: 1.5rem !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  line-height: 1.8 !important;
  color: #374151 !important;
  font-size: 1.125rem !important;
  letter-spacing: -0.01em !important;
}

.rich-text-content .trix-content ul,
.rich-text-content .trix-content ol,
.rich-text-content ul,
.rich-text-content ol {
  margin-top: 1.5rem !important;
  margin-bottom: 1.5rem !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  padding-left: 2rem !important;
  padding-right: 0 !important;
  color: #374151 !important;
}

.rich-text-content .trix-content ul,
.rich-text-content ul {
  list-style-type: disc !important;
}

.rich-text-content .trix-content ol,
.rich-text-content ol {
  list-style-type: decimal !important;
}

.rich-text-content .trix-content li,
.rich-text-content li {
  margin-bottom: 0.75rem !important;
  line-height: 1.8 !important;
  font-size: 1.125rem !important;
  padding-left: 0.5rem !important;
}

.rich-text-content .trix-content li::marker,
.rich-text-content li::marker {
  color: #6b7280 !important;
}

.rich-text-content .trix-content strong,
.rich-text-content .trix-content b,
.rich-text-content strong,
.rich-text-content b {
  font-weight: 700 !important;
  color: #111827 !important;
  letter-spacing: -0.01em !important;
}

.rich-text-content .trix-content em,
.rich-text-content .trix-content i,
.rich-text-content em,
.rich-text-content i {
  font-style: italic !important;
  color: #4b5563 !important;
}

.rich-text-content .trix-content a,
.rich-text-content a {
  color: #2563eb !important;
  text-decoration: none !important;
  border-bottom: 1px solid #93c5fd !important;
  transition: all 0.2s ease !important;
  font-weight: 500 !important;
}

.rich-text-content .trix-content a:hover,
.rich-text-content a:hover {
  color: #1d4ed8 !important;
  border-bottom-color: #1d4ed8 !important;
}

/* Blockquote styling - already defined above, removing duplicate */

.rich-text-content .trix-content code,
.rich-text-content code {
  background-color: #f3f4f6 !important;
  padding: 0.125rem 0.375rem !important;
  border-radius: 0.25rem !important;
  font-family: 'Monaco', 'Courier New', monospace !important;
  font-size: 0.875em !important;
  color: #dc2626 !important;
}

.rich-text-content .trix-content pre,
.rich-text-content pre {
  background-color: #1f2937 !important;
  color: #f9fafb !important;
  padding: 1rem !important;
  border-radius: 0.5rem !important;
  overflow-x: auto !important;
  margin-bottom: 1.25rem !important;
}

.rich-text-content .trix-content pre code,
.rich-text-content pre code {
  background-color: transparent !important;
  padding: 0 !important;
  color: inherit !important;
}

.rich-text-content .trix-content hr,
.rich-text-content hr {
  border: none !important;
  border-top: 2px solid #e5e7eb !important;
  margin: 3rem 0 !important;
  max-width: 100px !important;
  margin-left: 0 !important;
}

.rich-text-content img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin: 1.5rem 0;
}

.rich-text-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.25rem;
}

.rich-text-content table th,
.rich-text-content table td {
  padding: 0.75rem;
  border: 1px solid #e5e7eb;
  text-align: left;
}

.rich-text-content table th {
  background-color: #f9fafb;
  font-weight: 600;
  color: #111827;
}

/* Prose class enhancements for better spacing */
.prose.rich-text-content {
  max-width: none;
}

.prose.rich-text-content > *:first-child {
  margin-top: 0;
}

.prose.rich-text-content > *:last-child {
  margin-bottom: 0;
}

/* Ensure rich text content in prose containers has proper styling */
.prose .rich-text-content {
  max-width: 65ch;
}

/* Ensure prose classes work with Action Text's trix-content wrapper */
.prose .trix-content h1,
.prose .trix-content h2,
.prose .trix-content h3,
.prose .trix-content h4,
.prose .trix-content h5,
.prose .trix-content h6 {
  font-weight: 600;
  line-height: 1.25;
  margin-top: 2em;
  margin-bottom: 1em;
}

.prose .trix-content h1 {
  font-size: 2.25em;
  font-weight: 700;
  margin-top: 2em;
  margin-bottom: 1em;
}

.prose .trix-content h2 {
  font-size: 1.5em;
  font-weight: 600;
  margin-top: 1.5em;
  margin-bottom: 0.75em;
}

.prose .trix-content h3 {
  font-size: 1.25em;
  font-weight: 600;
  margin-top: 1em;
  margin-bottom: 0.5em;
}

.prose .trix-content p {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
  color: #374151;
  line-height: 1.75;
}

.prose .trix-content strong {
  font-weight: 700;
  color: #111827;
}

/* First paragraph styling - removed font-size override to match body paragraphs */
.rich-text-content .trix-content > p:first-of-type,
.rich-text-content > p:first-of-type {
  /* font-size: 1.25rem !important; - Removed: first paragraph should match body paragraphs */
  line-height: 1.75 !important;
  color: #4b5563 !important;
  margin-bottom: 2rem !important;
}

/* Better spacing between sections */
.rich-text-content .trix-content h2 + p,
.rich-text-content .trix-content h3 + p,
.rich-text-content h2 + p,
.rich-text-content h3 + p {
  margin-top: 0.5rem !important;
}

/* Override Action Text's default reset styles - only box-sizing */
.rich-text-content .trix-content * {
  box-sizing: border-box !important;
}
/* Note: Margins and padding are set by the specific element rules above */

/* Feedback Widget Dialog Styling */
dialog.feedback-dialog,
dialog[data-feedback-widget-target="dialog"] {
  margin: auto;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 90vw;
  max-height: 90vh;
  width: 100%;
  max-width: 500px;
  padding: 0;
  border: 1px solid #e5e7eb;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

dialog.feedback-dialog::backdrop,
dialog[data-feedback-widget-target="dialog"]::backdrop {
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

/* Ensure dialog content has proper spacing */
dialog.feedback-dialog .p-6,
dialog[data-feedback-widget-target="dialog"] .p-6 {
  padding: 1.5rem;
}

/* Mobile responsiveness */
@media (max-width: 640px) {
  dialog.feedback-dialog,
  dialog[data-feedback-widget-target="dialog"] {
    max-width: 95vw;
    margin: 1rem;
  }
  
  dialog.feedback-dialog .p-6,
  dialog[data-feedback-widget-target="dialog"] .p-6 {
    padding: 1.25rem;
  }
}

/* Grid layout fix - Tailwind v4 not generating lg:grid-cols-3 and lg:col-span-* locally */
/* Target the grid container and children directly */
.grid.grid-cols-1 {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 1024px) {
  .grid.grid-cols-1[class*="lg:grid-cols-3"] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  
  .grid > [class*="lg:col-span-2"] {
    grid-column: span 2 / span 2;
  }
  
  .grid > [class*="lg:col-span-1"] {
    grid-column: span 1 / span 1;
  }
}
