/* Froala Shared Styles - Used on both display and editor pages */

/* Material Icons - ensure they're available */
@import url('https://fonts.googleapis.com/icon?family=Material+Icons');

/* =====================================================
   FROALA EDITOR OVERRIDES - High Specificity
   ===================================================== */

/* Override Froala's default font families with our design system fonts */
.fr-box .fr-element,
.fr-box.fr-basic .fr-element,
.fr-element,
.fr-view,
.prose-wrapper .fr-element {
  font-family: 'freight-sans-pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  color: #2B2D42 !important; /* brand-gray */
  line-height: 1.5 !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Override toolbar, popup, and modal font families */
.fr-toolbar,
.fr-popup,
.fr-modal,
.fr-tooltip,
.fr-dropdown-menu {
  font-family: 'freight-sans-pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* Override placeholder font */
.fr-wrapper .fr-placeholder {
  font-family: 'freight-sans-pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  color: #9ca3af !important; /* muted gray */
}

/* Ensure headings use display font within Froala */
.fr-element h1, .fr-view h1, .prose-wrapper .fr-element h1,
.fr-element h2, .fr-view h2, .prose-wrapper .fr-element h2,
.fr-element h3, .fr-view h3, .prose-wrapper .fr-element h3 {
  font-family: 'freight-display-pro', Georgia, serif !important;
}

/* Override Froala's default paragraph margins and spacing */
.fr-element p, .fr-view p, .prose-wrapper .fr-element p {
  font-family: 'freight-sans-pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  margin-bottom: 0rem !important;
}

/* Override Froala's list styles to match our design system */
.fr-element ul, .fr-view ul, .prose-wrapper .fr-element ul {
  list-style: none !important;
  padding-left: 0 !important;
}

.fr-element ul li, .fr-view ul li, .prose-wrapper .fr-element ul li {
  position: relative !important;
  padding-left: 1.5rem !important;
  margin-bottom: 0.5rem !important;
}

.fr-element ul li::before, .fr-view ul li::before, .prose-wrapper .fr-element ul li::before {
  content: '' !important;
  position: absolute !important;
  left: 0.25rem !important;
  top: 0.6875em !important;
  width: 0.375rem !important;
  height: 0.375rem !important;
  border-radius: 50% !important;
  background-color: rgba(43, 45, 66, 0.8) !important;
}

/* Override Froala's ordered list styles */
.fr-element ol, .fr-view ol, .prose-wrapper .fr-element ol {
  list-style: decimal !important;
  padding-left: 1.5rem !important;
}

.fr-element ol li, .fr-view ol li, .prose-wrapper .fr-element ol li {
  padding-left: 0.5rem !important;
  margin-bottom: 0.5rem !important;
}

/* Override Froala's link styles */
.fr-element a, .fr-view a, .prose-wrapper .fr-element a {
  color: #ab0f2a !important; /* shiraz-800 */
  text-decoration: underline !important;
  text-underline-offset: 0.25rem !important;
  text-decoration-color: rgba(171, 15, 42, 0.5) !important;
  transition: all 0.2s ease !important;
}

.fr-element a:hover, .fr-view a:hover, .prose-wrapper .fr-element a:hover {
  text-decoration-color: #ab0f2a !important;
  color: #c30d27 !important; /* shiraz-700 */
}

/* Reset any default margins/padding that might interfere */
.fr-element blockquote, .fr-view blockquote {
  border-left: 4px solid rgba(171, 15, 42, 0.2) !important;
  padding-left: 1rem !important;
  margin: 1rem 0 !important;
  color: #6b7280 !important;
  font-style: italic !important;
}

/* =====================================================
   END FROALA OVERRIDES
   ===================================================== */

/* Typography styles for Froala content */
.prose-wrapper {
  font-family: 'freight-sans-pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  color: #2B2D42; /* brand-gray */
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Headings */
.prose-wrapper h1 {
  font-family: 'freight-display-pro', Georgia, serif;
  font-size: 2.25rem; /* 36px */
  font-weight: 500;
  letter-spacing: -0.025em;
  margin-top: 2rem;
  margin-bottom: 1rem;
  line-height: 1.2;
  color: #ab0f2a; /* shiraz-800 */
}

.prose-wrapper h2 {
  font-family: 'freight-display-pro', Georgia, serif;
  font-size: 1.875rem; /* 30px */
  font-weight: 500;
  letter-spacing: -0.025em;
  margin-top: 2rem;
  margin-bottom: 1rem;
  line-height: 1.3;
  color: #ab0f2a;
}

.prose-wrapper h3 {
  font-family: 'freight-display-pro', Georgia, serif;
  font-size: 1.5rem; /* 24px */
  font-weight: 500;
  letter-spacing: -0.025em;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.prose-wrapper h4 {
  font-size: 1.25rem; /* 20px */
  font-weight: 500;
  letter-spacing: -0.025em;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.prose-wrapper h5 {
  font-size: 1.125rem; /* 18px */
  font-weight: 500;
  letter-spacing: -0.025em;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.prose-wrapper h6 {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.025em;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

/* Paragraphs and text elements */
.prose-wrapper p {
  font-family: 'freight-sans-pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 0px;
}

.prose-wrapper strong {
  font-weight: 600;
}

.prose-wrapper em {
  font-style: italic;
}

.prose-wrapper del {
  text-decoration: line-through;
}

/* Links */
.prose-wrapper a {
  color: #ab0f2a; /* shiraz-800 */
  text-decoration: underline;
  text-underline-offset: 0.25rem;
  text-decoration-color: rgba(171, 15, 42, 0.5);
  transition: all 0.2s ease;
}

.prose-wrapper a:hover {
  text-decoration-color: #ab0f2a;
  color: #c30d27; /* shiraz-700 */
}

/* Lists */
.prose-wrapper ul {
  padding-left: 0;
  list-style: none !important;
  margin: 1rem 0;
}

.prose-wrapper ul li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
}

.prose-wrapper ul li::before {
  content: '';
  position: absolute;
  left: 0.25rem;
  top: 0.6875em;
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background-color: rgba(43, 45, 66, 0.8); /* brand-gray with opacity */
}

.prose-wrapper ol {
  list-style: decimal;
  padding-left: 1.5rem;
  margin: 1rem 0;
}

.prose-wrapper ol li {
  padding-left: 0.5rem;
  margin-bottom: 0.5rem;
}

/* Blockquotes */
.prose-wrapper blockquote {
  border-left: 4px solid rgba(171, 15, 42, 0.2);
  padding-left: 1rem;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
  margin: 1rem 0;
  color: #6b7280; /* muted text */
  font-style: italic;
}

/* Code blocks */
.prose-wrapper code {
  background-color: rgba(0, 0, 0, 0.05);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-family: monospace;
  font-size: 0.875rem;
  font-weight: 500;
}

.prose-wrapper pre {
  overflow-x: auto;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
  background-color: rgba(0, 0, 0, 0.03);
  padding: 1rem;
  margin: 1rem 0;
}

.prose-wrapper pre code {
  background-color: transparent;
  padding: 0;
  font-size: 0.875rem;
}

/* Tables */
.prose-wrapper table {
  width: 100%;
  margin: 1rem 0;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
  overflow: hidden;
}

.prose-wrapper thead {
  background-color: rgba(0, 0, 0, 0.03);
}

.prose-wrapper th,
.prose-wrapper td {
  padding: 0.5rem 1rem;
  text-align: left;
  border-right: 1px solid #e5e7eb;
}

.prose-wrapper th:last-child,
.prose-wrapper td:last-child {
  border-right: none;
}

.prose-wrapper tr {
  border-bottom: 1px solid #e5e7eb;
}

.prose-wrapper tr:last-child {
  border-bottom: none;
}

/* Images and media */
.prose-wrapper img {
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
  margin: 1rem 0;
  max-width: 100%;
  height: auto;
}

/* Button System - Matching Vue Button Component */
/* Base button styles - aligned with vue-frontend/src/components/ui/button/index.ts */
.btn,
.btn-brand,
.btn-secondary,
.btn-outline {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem;
  white-space: nowrap;
  border-radius: 40px !important;
  font-family: 'freight-sans-pro', sans-serif !important;
  font-weight: 600 !important; /* Updated to semibold */
  font-size: 1rem !important; /* Updated to base size (16px) */
  transition: all 0.2s ease;
  text-decoration: none !important;
  border: none !important;
  cursor: pointer;
  outline: none;
  
  /* Default size with increased padding */
  height: 2.5rem; /* 40px */
  padding: 0.5rem 1.5rem !important; /* Increased left/right padding */
}

/* High specificity overrides for Vuetify conflicts */
a.btn,
a.btn-secondary,
button.btn,
button.btn-secondary,
.btn.btn,
.btn-secondary.btn-secondary {
  background-color: #a70b26 !important; /* Force secondary background */
  color: white !important;
}

a.btn-brand,
button.btn-brand,
.btn-brand.btn-brand {
  background-color: #ffebde !important; /* Force brand background */
  color: #ab0f2a !important;
}

a.btn-outline,
button.btn-outline,
.btn-outline.btn-outline {
  background-color: transparent !important; /* Force transparent background */
  color: #ab0f2a !important;
  border: 2px solid #ab0f2a !important;
}

/* Reset link styles for a tags with button classes */
a.btn,
a.btn-secondary {
  color: white !important; /* Explicit white for dark buttons */
  text-decoration: none !important;
  text-underline-offset: initial !important;
  text-decoration-color: initial !important;
}

a.btn:hover,
a.btn-secondary:hover {
  color: white !important; /* Maintain white text on hover */
  text-decoration: none !important;
}

a.btn:visited,
a.btn-secondary:visited {
  color: white !important; /* White text for visited dark buttons */
}

a.btn-brand {
  color: #ab0f2a !important; /* Explicit shiraz color for brand button */
  text-decoration: none !important;
  text-underline-offset: initial !important;
  text-decoration-color: initial !important;
}

a.btn-brand:hover {
  color: #ab0f2a !important; /* Maintain brand color on hover */
  text-decoration: none !important;
}

a.btn-brand:visited {
  color: #ab0f2a !important; /* Brand color for visited brand buttons */
}

a.btn-outline {
  color: #ab0f2a !important; /* Explicit shiraz color for outline button */
  text-decoration: none !important;
  text-underline-offset: initial !important;
  text-decoration-color: initial !important;
}

a.btn-outline:hover {
  color: #c30d27 !important; /* Hover color for outline button */
  text-decoration: none !important;
}

a.btn-outline:visited {
  color: #ab0f2a !important; /* Brand color for visited outline buttons */
}

/* Focus styles consistent with shadcn-vue */
.btn:focus-visible,
.btn-brand:focus-visible,
.btn-secondary:focus-visible,
.btn-outline:focus-visible {
  outline: 2px solid #008CFF !important;
  outline-offset: 2px;
}

/* Disabled state */
.btn:disabled,
.btn-brand:disabled,
.btn-secondary:disabled,
.btn-outline:disabled {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
}

/* Default button (now matches secondary variant from shadcn-vue) */
.btn {
  background-color: #a70b26 !important; /* shiraz-dark-800 */
  color: white !important;
  font-weight: 600 !important;
}

.btn:hover {
  background-color: #900D25 !important; /* hover:bg-[#900D25] */
  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25) !important; /* drop-shadow-button */
  color: white !important;
  text-decoration: none !important;
}

.btn:active {
  background-color: #7D0B1E !important; /* active:bg-[#7D0B1E] */
  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25) !important; /* active:drop-shadow-button */
  color: white !important;
}

/* Brand button (primary) - keeping original karry styling */
.btn-brand {
  background-color: #ffebde !important; /* karry-100 */
  color: #ab0f2a !important; /* shiraz-800 */
}

.btn-brand:hover {
  background-color: #ffd2c0 !important; /* karry-120 */
  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25) !important;
  color: #ab0f2a !important; /* maintain text color */
  text-decoration: none !important;
}

.btn-brand:active {
  background-color: #ffc0ae !important; /* karry-140 */
  color: #900d25 !important; /* shiraz-dark-850 */
}

/* Secondary button - explicit secondary class */
.btn-secondary {
  background-color: #a70b26 !important; /* shiraz-dark-800 */
  color: white !important;
}

.btn-secondary:hover {
  background-color: #900d25 !important; /* shiraz-dark-850 */
  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25) !important;
  color: white !important;
  text-decoration: none !important;
}

.btn-secondary:active {
  background-color: #7d0b1e !important; /* shiraz-dark-920 */
  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25) !important;
  color: white !important;
}

/* Outline button */
.btn-outline {
  background-color: transparent !important;
  color: #ab0f2a !important; /* shiraz-800 */
  border: 2px solid #ab0f2a !important;
}

.btn-outline:hover {
  background-color: #fff1f1 !important; /* shiraz-50 */
  color: #c30d27 !important; /* shiraz-700 */
  text-decoration: none !important;
}

.btn-outline:active {
  background-color: #ffe4e3 !important; /* shiraz-100 */
  color: #c30d27 !important;
}

/* Button sizes - matching shadcn-vue variants */
.btn.btn-default,
.btn-brand.btn-default,
.btn-secondary.btn-default,
.btn-outline.btn-default {
  height: 2.5rem; /* 40px - h-10 */
  padding: 0.5rem 1.5rem !important; /* Increased padding */
  font-size: 1rem !important; /* Updated to base size */
  font-weight: 600 !important; /* Updated to semibold */
}

.btn.btn-brand-size,
.btn-brand.btn-brand-size,
.btn-secondary.btn-brand-size,
.btn-outline.btn-brand-size {
  height: 2.75rem; /* 44px - h-11 */
  padding: 0 2rem !important; /* Increased padding */
  font-size: 1.125rem !important; /* text-lg */
  font-weight: 700 !important; /* font-bold */
}

/* Responsive brand size - matching md:h-[50px] md:px-8 */
@media (min-width: 768px) {
  .btn.btn-brand-size,
  .btn-brand.btn-brand-size,
  .btn-secondary.btn-brand-size,
  .btn-outline.btn-brand-size {
    height: 3.125rem; /* 50px */
    padding: 0 2.5rem !important; /* Increased padding for larger size */
  }
}

.btn.btn-lg,
.btn-brand.btn-lg,
.btn-secondary.btn-lg,
.btn-outline.btn-lg {
  height: 2.75rem; /* 44px */
  padding: 0 2rem !important; /* Increased padding */
  font-size: 1rem !important;
  font-weight: 600 !important;
}

.btn.btn-xl,
.btn-brand.btn-xl,
.btn-secondary.btn-xl,
.btn-outline.btn-xl {
  height: 3.125rem; /* 50px */
  padding: 0 2.5rem !important; /* Increased padding */
  font-size: 1rem !important;
  font-weight: 600 !important;
}

/* Size utilities matching shadcn-vue exactly */
.btn.btn-40,
.btn-brand.btn-40,
.btn-secondary.btn-40,
.btn-outline.btn-40 {
  height: 2.5rem; /* 40px - h-[40px] */
  padding: 0 1.5rem !important; /* Increased padding */
  font-size: 1rem !important; /* text-base */
  font-weight: 600 !important; /* font-semibold */
}

.btn.btn-44,
.btn-brand.btn-44,
.btn-secondary.btn-44,
.btn-outline.btn-44 {
  height: 2.75rem; /* 44px - h-[44px] */
  padding: 0 2rem !important; /* Increased padding */
  font-size: 1rem !important;
  font-weight: 600 !important;
}

.btn.btn-50,
.btn-brand.btn-50,
.btn-secondary.btn-50,
.btn-outline.btn-50 {
  height: 3.125rem; /* 50px - h-[50px] */
  padding: 0 2.5rem !important; /* Increased padding */
  font-size: 1rem !important; /* text-base */
  font-weight: 600 !important;
}

/* Special modifiers for authenticated/unauthenticated content */
.btn.auth_required::after,
.btn-brand.auth_required::after,
.btn-secondary.auth_required::after {
  content: " 🔒";
  font-size: 0.875rem;
}

/* Override any lingering MaterializeCSS .btn styles in prose context */
.prose-wrapper .btn,
.prose-wrapper .btn-secondary {
  /* Reset MaterializeCSS styles */
  /* all: unset; */
  /* Apply our button styles - matching default secondary variant */
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem;
  white-space: nowrap;
  border-radius: 40px !important;
  font-family: 'freight-sans-pro', sans-serif !important;
  font-weight: 600 !important; /* Updated to semibold */
  font-size: 1rem !important; /* Updated to base size */
  height: 2.5rem;
  padding: 0.5rem 1.5rem !important; /* Increased padding */
  transition: all 0.2s ease;
  text-decoration: none !important;
  cursor: pointer;
  background-color: #a70b26 !important; /* shiraz-dark-800 - matching secondary */
  color: white !important;
  box-sizing: border-box !important; /* Ensure consistent box model */
  border: none !important; /* Explicitly remove any border */
  outline: none !important; /* Remove outline until focus */
  margin: 0 !important; /* Reset any margin */
}

.prose-wrapper .btn:hover,
.prose-wrapper .btn-secondary:hover {
  background-color: #900D25 !important; /* hover:bg-[#900D25] */
  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25) !important; /* drop-shadow-button */
  color: white !important;
  text-decoration: none !important;
}

.prose-wrapper .btn:active,
.prose-wrapper .btn-secondary:active {
  background-color: #7D0B1E !important; /* active:bg-[#7D0B1E] */
  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25) !important;
  color: white !important;
}

.prose-wrapper .btn:focus-visible,
.prose-wrapper .btn-secondary:focus-visible {
  outline: 2px solid #008CFF !important;
  outline-offset: 2px;
}

/* Ensure brand buttons in prose context get the reset too */
.prose-wrapper .btn-brand {
  /* Reset MaterializeCSS styles */
  /* all: unset; */
  /* Apply our button styles - brand variant */
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem;
  white-space: nowrap;
  border-radius: 40px !important;
  font-family: 'freight-sans-pro', sans-serif !important;
  font-weight: 600 !important;
  font-size: 1rem !important;
  height: 2.5rem;
  padding: 0.5rem 1.5rem !important;
  transition: all 0.2s ease;
  text-decoration: none !important;
  cursor: pointer;
  background-color: #ffebde !important; /* karry-100 */
  color: #ab0f2a !important; /* shiraz-800 */
  box-sizing: border-box !important;
  border: none !important;
  outline: none !important;
  margin: 0 !important;
}

.prose-wrapper .btn-brand:hover {
  background-color: #ffd2c0 !important; /* karry-120 */
  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25) !important;
  color: #ab0f2a !important;
  text-decoration: none !important;
}

.prose-wrapper .btn-brand:active {
  background-color: #ffc0ae !important; /* karry-140 */
  color: #900d25 !important; /* shiraz-dark-850 */
}

.prose-wrapper .btn-brand:focus-visible {
  outline: 2px solid #008CFF !important;
  outline-offset: 2px;
}

/* Ensure outline buttons in prose context get the reset too */
.prose-wrapper .btn-outline {
  /* Reset MaterializeCSS styles */
  /* all: unset; */
  /* Apply our button styles - outline variant */
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem;
  white-space: nowrap;
  border-radius: 40px !important;
  font-family: 'freight-sans-pro', sans-serif !important;
  font-weight: 600 !important;
  font-size: 1rem !important;
  height: 2.5rem;
  padding: 0.5rem 1.5rem !important;
  transition: all 0.2s ease;
  text-decoration: none !important;
  cursor: pointer;
  background-color: transparent !important;
  color: #ab0f2a !important; /* shiraz-800 */
  border: 2px solid #ab0f2a !important;
  box-sizing: border-box !important;
  outline: none !important;
  margin: 0 !important;
}

.prose-wrapper .btn-outline:hover {
  background-color: #fff1f1 !important; /* shiraz-50 */
  color: #c30d27 !important; /* shiraz-700 */
  text-decoration: none !important;
}

.prose-wrapper .btn-outline:active {
  background-color: #ffe4e3 !important; /* shiraz-100 */
  color: #c30d27 !important;
}

.prose-wrapper .btn-outline:focus-visible {
  outline: 2px solid #008CFF !important;
  outline-offset: 2px;
}

/* Ensure a tags with btn classes use correct colors in prose context */
.prose-wrapper a.btn,
.prose-wrapper a.btn-secondary {
  color: white !important;
  text-decoration: none !important;
}

.prose-wrapper a.btn:hover,
.prose-wrapper a.btn-secondary:hover {
  color: white !important;
  text-decoration: none !important;
}

.prose-wrapper a.btn-brand {
  color: #ab0f2a !important;
  text-decoration: none !important;
}

.prose-wrapper a.btn-brand:hover {
  color: #ab0f2a !important;
  text-decoration: none !important;
}

.prose-wrapper a.btn-outline {
  color: #ab0f2a !important;
  text-decoration: none !important;
}

.prose-wrapper a.btn-outline:hover {
  color: #c30d27 !important;
  text-decoration: none !important;
}

/* =====================================================
   WYSIWYG UTILITIES - What You See Is What You Get
   ===================================================== */

/* Ensure consistent font rendering between editor and display */
.fr-view,
.fr-element,
.prose-wrapper {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Override Froala's default margins to match our design system */
.fr-element > *:first-child,
.fr-view > *:first-child {
  margin-top: 0 !important;
}

.fr-element > *:last-child,
.fr-view > *:last-child {
  margin-bottom: 0 !important;
}

/* Froala table styling overrides */
.fr-element table, .fr-view table {
  border-collapse: separate !important;
  border-spacing: 0 !important;
  width: 100% !important;
  margin: 1rem 0 !important;
  border-radius: 0.5rem !important;
  border: 1px solid #e5e7eb !important;
  overflow: hidden !important;
}

/* Froala code styling overrides */
.fr-element code, .fr-view code {
  background-color: rgba(0, 0, 0, 0.05) !important;
  padding: 0.125rem 0.375rem !important;
  border-radius: 0.25rem !important;
  font-family: 'SFMono-Regular', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
}

.fr-element pre, .fr-view pre {
  overflow-x: auto !important;
  border-radius: 0.5rem !important;
  border: 1px solid #e5e7eb !important;
  background-color: rgba(0, 0, 0, 0.03) !important;
  padding: 1rem !important;
  margin: 1rem 0 !important;
}

/* Ensure images maintain aspect ratio and responsiveness */
.fr-element img, .fr-view img {
  max-width: 100% !important;
  height: auto !important;
  border-radius: 0.5rem !important;
  border: 1px solid #e5e7eb !important;
  margin: 1rem 0 !important;
}

/* Override Froala's default bold/strong styling */
.fr-element strong, .fr-element b,
.fr-view strong, .fr-view b {
  font-weight: 600 !important;
}

/* Override Froala's default italic/em styling */
.fr-element em, .fr-element i,
.fr-view em, .fr-view i {
  font-style: italic !important;
}

/* Ensure nested lists maintain consistent spacing */
.fr-element ul ul, .fr-element ol ol, .fr-element ul ol, .fr-element ol ul,
.fr-view ul ul, .fr-view ol ol, .fr-view ul ol, .fr-view ol ul {
  margin-top: 0.5rem !important;
  margin-bottom: 0 !important;
}

/* Override Froala's selection highlighting */
.fr-element ::selection, .fr-view ::selection {
  background: rgba(171, 15, 42, 0.1) !important;
}

/* Improve focus states for accessibility */
.fr-element:focus, .fr-view:focus {
  outline: 2px solid #008CFF !important;
  outline-offset: 2px !important;
}

/* =====================================================
   END WYSIWYG UTILITIES
   ===================================================== */

/* Main heading color (MaterializeCSS compatibility) */
.main-heading-color {
  color: #ab0f2a !important; /* shiraz-800 */
  font-family: 'freight-display-pro', Georgia, serif;
}

/* Section headers - semantic and flexible */
.section-header {
  color: #ab0f2a; /* shiraz-800 */
  font-family: 'freight-display-pro', Georgia, serif;
  font-weight: 500;
  letter-spacing: -0.025em;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

/* Section header sizes */
h2.section-header {
  font-size: 1.875rem; /* 30px */
  margin-top: 2rem;
  margin-bottom: 1rem;
}

h3.section-header {
  font-size: 1.5rem; /* 24px */
}

h4.section-header {
  font-size: 1.25rem; /* 20px */
}

/* Inline block variant for headers */
.section-header.inline-block {
  display: inline-block;
}

/* Responsive typography */
@media (min-width: 768px) {
  .prose-wrapper h1 {
    font-size: 3.25rem; /* 52px on larger screens */
  }
  
  .prose-wrapper h2 {
    font-size: 2.5rem; /* 40px on larger screens */
  }
} 

/* =====================================================
   FROALA INTERFACE OVERRIDES - Buttons, Dropdowns, etc.
   ===================================================== */

/* Override Froala button font families */
.fr-command.fr-btn,
.fr-toolbar .fr-command.fr-btn,
.fr-popup .fr-command.fr-btn,
.fr-modal .fr-command.fr-btn {
  font-family: 'freight-sans-pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* Override dropdown menu fonts */
.fr-dropdown-menu .fr-dropdown-wrapper .fr-dropdown-content ul.fr-dropdown-list li a {
  font-family: 'freight-sans-pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* Override modal and popup input fonts */
.fr-popup .fr-input-line input[type="text"],
.fr-popup .fr-input-line input[type="number"],
.fr-popup .fr-input-line textarea,
.fr-modal input,
.fr-modal textarea {
  font-family: 'freight-sans-pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* Override popup and modal labels */
.fr-popup .fr-input-line label,
.fr-modal label {
  font-family: 'freight-sans-pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* Override Froala logo and branding (if present) */
#fr-logo span {
  font-family: 'freight-sans-pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* Ensure consistent line heights in Froala UI */
.fr-toolbar,
.fr-popup,
.fr-modal {
  line-height: 1.2 !important;
}

/* Override any lingering sans-serif references */
.fr-box.fr-basic .fr-element,
.fr-wrapper .fr-placeholder,
.fr-tooltip {
  font-family: 'freight-sans-pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* Ensure consistent color scheme across Froala interface */
.fr-popup,
.fr-modal,
.fr-toolbar {
  color: #2B2D42 !important; /* brand-gray */
}

/* Override button hover states to maintain consistency */
.fr-command.fr-btn:hover {
  color: #2B2D42 !important; /* maintain consistent text color */
}

/* Ensure focus states are consistent with design system */
.fr-popup input:focus,
.fr-popup textarea:focus,
.fr-modal input:focus,
.fr-modal textarea:focus {
  border-color: #008CFF !important; /* consistent with design system focus color */
  outline: none !important;
}

/* =====================================================
   END FROALA INTERFACE OVERRIDES
   ===================================================== */
