/* 
 * TinyMCE Content Styling
 * 
 * Professional CSS styling for TinyMCE/HTMLField content rendering.
 * Overrides Tailwind CSS resets to properly display rich text content
 * including headings, lists, tables, images, and other formatted elements.
 * 
 * Usage: Apply .description-content class to any container with TinyMCE HTML content
 */

/* Headings */
.description-content h1 {
  font-size: 2.25rem !important;
  font-weight: 700 !important;
  color: #111827 !important;
  margin-top: 2rem !important;
  margin-bottom: 1rem !important;
  line-height: 1.2 !important;
  border-bottom: 2px solid #e5e7eb !important;
  padding-bottom: 0.5rem !important;
}

.description-content h2 {
  font-size: 1.875rem !important;
  font-weight: 700 !important;
  color: #1f2937 !important;
  margin-top: 1.75rem !important;
  margin-bottom: 0.875rem !important;
  line-height: 1.3 !important;
  border-bottom: 1px solid #e5e7eb !important;
  padding-bottom: 0.375rem !important;
}

.description-content h3 {
  font-size: 1.5rem !important;
  font-weight: 600 !important;
  color: #1f2937 !important;
  margin-top: 1.5rem !important;
  margin-bottom: 0.75rem !important;
  line-height: 1.4 !important;
}

.description-content h4 {
  font-size: 1.25rem !important;
  font-weight: 600 !important;
  color: #374151 !important;
  margin-top: 1.25rem !important;
  margin-bottom: 0.625rem !important;
  line-height: 1.4 !important;
}

.description-content h5 {
  font-size: 1.125rem !important;
  font-weight: 600 !important;
  color: #374151 !important;
  margin-top: 1rem !important;
  margin-bottom: 0.5rem !important;
  line-height: 1.4 !important;
}

.description-content h6 {
  font-size: 1rem !important;
  font-weight: 600 !important;
  color: #4b5563 !important;
  margin-top: 1rem !important;
  margin-bottom: 0.5rem !important;
  line-height: 1.4 !important;
}

/* Paragraphs and Text */
.description-content p {
  font-size: 1rem !important;
  line-height: 1.75 !important;
  color: #374151 !important;
  margin-bottom: 1rem !important;
  text-align: justify !important;
}

.description-content a {
  color: #2563eb !important;
  text-decoration: underline !important;
  transition: color 0.2s ease !important;
}

.description-content a:hover {
  color: #1d4ed8 !important;
}

.description-content strong,
.description-content b {
  font-weight: 700 !important;
  color: #111827 !important;
}

.description-content em,
.description-content i {
  font-style: italic !important;
}

/* Lists */
.description-content ul {
  list-style-type: disc !important;
  margin-left: 2rem !important;
  margin-bottom: 1.25rem !important;
  padding-left: 0.5rem !important;
}

.description-content ol {
  list-style-type: decimal !important;
  margin-left: 2rem !important;
  margin-bottom: 1.25rem !important;
  padding-left: 0.5rem !important;
}

.description-content li {
  font-size: 1rem !important;
  line-height: 1.75 !important;
  color: #374151 !important;
  margin-bottom: 0.5rem !important;
  padding-left: 0.25rem !important;
}

.description-content ul ul,
.description-content ol ul {
  list-style-type: circle !important;
  margin-top: 0.5rem !important;
  margin-bottom: 0.5rem !important;
}

.description-content ul ol,
.description-content ol ol {
  list-style-type: lower-alpha !important;
  margin-top: 0.5rem !important;
  margin-bottom: 0.5rem !important;
}

/* Blockquotes */
.description-content blockquote {
  border-left: 4px solid #3b82f6 !important;
  padding-left: 1.25rem !important;
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
  font-style: italic !important;
  color: #4b5563 !important;
  margin: 1.5rem 0 !important;
  background-color: #f9fafb !important;
  border-radius: 0.375rem !important;
}

/* Images */
.description-content img {
  max-width: 100% !important;
  height: auto !important;
  border-radius: 0.5rem !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
  margin: 1.5rem auto !important;
  display: block !important;
}

/* Code */
.description-content code {
  background-color: #f3f4f6 !important;
  padding: 0.125rem 0.375rem !important;
  border-radius: 0.25rem !important;
  font-size: 0.875rem !important;
  font-family: 'Courier New', Consolas, Monaco, monospace !important;
  color: #dc2626 !important;
  border: 1px solid #e5e7eb !important;
}

.description-content pre {
  background-color: #1f2937 !important;
  color: #f3f4f6 !important;
  padding: 1.25rem !important;
  border-radius: 0.5rem !important;
  overflow-x: auto !important;
  margin: 1.5rem 0 !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;
}

.description-content pre code {
  background-color: transparent !important;
  padding: 0 !important;
  color: inherit !important;
  border: none !important;
  font-size: 0.875rem !important;
}

/* Tables */
.description-content table {
  width: 100% !important;
  border-collapse: collapse !important;
  margin: 1.5rem 0 !important;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1) !important;
  border-radius: 0.5rem !important;
  overflow: hidden !important;
}

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

.description-content table th {
  background-color: #f9fafb !important;
  font-weight: 600 !important;
  color: #111827 !important;
  text-transform: uppercase !important;
  font-size: 0.875rem !important;
  letter-spacing: 0.05em !important;
}

.description-content table td {
  background-color: #ffffff !important;
  color: #374151 !important;
}

.description-content table tr:nth-child(even) td {
  background-color: #f9fafb !important;
}

.description-content table tr:hover td {
  background-color: #f3f4f6 !important;
}

/* Horizontal Rules */
.description-content hr {
  border: none !important;
  border-top: 2px solid #e5e7eb !important;
  margin: 2rem 0 !important;
}

/* Spacing Adjustments */
.description-content > *:first-child {
  margin-top: 0 !important;
}

.description-content > *:last-child {
  margin-bottom: 0 !important;
}

/* Text Alignment Classes */
.description-content .text-left {
  text-align: left !important;
}

.description-content .text-center {
  text-align: center !important;
}

.description-content .text-right {
  text-align: right !important;
}

.description-content .text-justify {
  text-align: justify !important;
}

/* Indentation */
.description-content .indent {
  padding-left: 2rem !important;
}

/* Subscript and Superscript */
.description-content sub {
  font-size: 0.75em !important;
  vertical-align: sub !important;
}

.description-content sup {
  font-size: 0.75em !important;
  vertical-align: super !important;
}

/* Definition Lists */
.description-content dl {
  margin: 1rem 0 !important;
}

.description-content dt {
  font-weight: 600 !important;
  color: #111827 !important;
  margin-top: 0.75rem !important;
}

.description-content dd {
  margin-left: 2rem !important;
  margin-bottom: 0.5rem !important;
  color: #374151 !important;
}

/* Figure and Figcaption */
.description-content figure {
  margin: 1.5rem 0 !important;
}

.description-content figcaption {
  text-align: center !important;
  font-size: 0.875rem !important;
  color: #6b7280 !important;
  font-style: italic !important;
  margin-top: 0.5rem !important;
}

/* Responsive Adjustments */
@media (max-width: 640px) {
  .description-content h1 {
    font-size: 1.875rem !important;
  }
  
  .description-content h2 {
    font-size: 1.5rem !important;
  }
  
  .description-content h3 {
    font-size: 1.25rem !important;
  }
  
  .description-content p,
  .description-content li {
    font-size: 0.9375rem !important;
  }
  
  .description-content ul,
  .description-content ol {
    margin-left: 1.5rem !important;
  }
  
  .description-content table {
    font-size: 0.875rem !important;
  }
  
  .description-content table th,
  .description-content table td {
    padding: 0.5rem 0.75rem !important;
  }
}
