/* Typography Styles for Rich Text Editor Content */
/* Based on Tailwind CSS Typography principles */

.prose {
  color: #374151;
  max-width: none;
}

.prose [class~="lead"] {
  color: #4b5563;
  font-size: 1.25em;
  line-height: 1.6;
  margin-top: 1.2em;
  margin-bottom: 1.2em;
}

.prose a {
  color: #6A5ACD;
  text-decoration: underline;
  font-weight: 500;
}

.prose a:hover {
  color: #44546a;
}

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

.prose a strong {
  color: inherit;
}

.prose blockquote {
  font-weight: 500;
  font-style: italic;
  color: #111827;
  border-right-width: 0.25rem;
  border-right-color: #e5e7eb;
  quotes: "\201C""\201D""\2018""\2019";
  margin-top: 1.6em;
  margin-bottom: 1.6em;
  padding-right: 1em;
}

.prose blockquote p:first-of-type::before {
  content: open-quote;
}

.prose blockquote p:last-of-type::after {
  content: close-quote;
}

.prose h1 {
  color: #111827;
  font-weight: 800;
  font-size: 2.25em;
  margin-top: 0;
  margin-bottom: 0.8888889em;
  line-height: 1.1111111;
}

.prose h1 strong {
  font-weight: 900;
  color: inherit;
}

.prose h2 {
  color: #111827;
  font-weight: 700;
  font-size: 1.875em;
  margin-top: 2em;
  margin-bottom: 1em;
  line-height: 1.3333333;
}

.prose h2 strong {
  font-weight: 800;
  color: inherit;
}

.prose h3 {
  color: #111827;
  font-weight: 600;
  font-size: 1.5em;
  margin-top: 1.6em;
  margin-bottom: 0.6em;
  line-height: 1.3333333;
}

.prose h3 strong {
  font-weight: 700;
  color: inherit;
}

.prose h4 {
  color: #111827;
  font-weight: 600;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  line-height: 1.5;
}

.prose h4 strong {
  font-weight: 700;
  color: inherit;
}

.prose img {
  margin-top: 2em;
  margin-bottom: 2em;
}

.prose picture {
  display: block;
  margin-top: 2em;
  margin-bottom: 2em;
}

.prose video {
  margin-top: 2em;
  margin-bottom: 2em;
}

.prose kbd {
  font-weight: 500;
  font-family: inherit;
  color: #111827;
  box-shadow: 0 0 0 1px rgb(17 24 39 / 10%), 0 3px 0 rgb(17 24 39 / 10%);
  font-size: 0.875em;
  border-radius: 0.3125rem;
  padding-top: 0.1875rem;
  padding-right: 0.375rem;
  padding-bottom: 0.1875rem;
  padding-left: 0.375rem;
}

.prose code {
  color: #111827;
  font-weight: 600;
  font-size: 0.875em;
}

.prose code::before {
  content: "`";
}

.prose code::after {
  content: "`";
}

.prose a code {
  color: inherit;
}

.prose h1 code {
  color: inherit;
}

.prose h2 code {
  color: inherit;
  font-size: 0.875em;
}

.prose h3 code {
  color: inherit;
  font-size: 0.9em;
}

.prose h4 code {
  color: inherit;
}

.prose blockquote code {
  color: inherit;
}

.prose thead th code {
  color: inherit;
}

.prose pre {
  color: #e5e7eb;
  background-color: #374151;
  overflow-x: auto;
  font-weight: 400;
  font-size: 0.875em;
  line-height: 1.7142857;
  margin-top: 1.7142857em;
  margin-bottom: 1.7142857em;
  border-radius: 0.375rem;
  padding-top: 0.8571429em;
  padding-right: 1.1428571em;
  padding-bottom: 0.8571429em;
  padding-left: 1.1428571em;
}

.prose pre code {
  background-color: transparent;
  border-width: 0;
  border-radius: 0;
  padding: 0;
  font-weight: inherit;
  color: inherit;
  font-size: inherit;
  font-family: inherit;
  line-height: inherit;
}

.prose pre code::before {
  content: none;
}

.prose pre code::after {
  content: none;
}

.prose table {
  width: 100%;
  table-layout: auto;
  margin-top: 2em;
  margin-bottom: 2em;
  font-size: 0.875em;
  line-height: 1.7142857;
}

.prose thead {
  border-bottom-width: 1px;
  border-bottom-color: #d1d5db;
}

.prose thead th {
  color: #111827;
  font-weight: 600;
  vertical-align: bottom;
  padding-right: 0.5714286em;
  padding-bottom: 0.5714286em;
  padding-left: 0.5714286em;
}

.prose tbody tr {
  border-bottom-width: 1px;
  border-bottom-color: #e5e7eb;
}

.prose tbody tr:last-child {
  border-bottom-width: 0;
}

.prose tbody td {
  vertical-align: baseline;
}

.prose tfoot {
  border-top-width: 1px;
  border-top-color: #d1d5db;
}

.prose tfoot td {
  vertical-align: top;
}

.prose th,
.prose td {
  text-align: right;
  padding: 0.5714286em;
}

.prose p {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
  line-height: 1.75;
}

.prose ol {
  list-style-type: decimal;
  margin-top: 1.25em;
  margin-bottom: 1.25em;
  padding-right: 1.625em;
}

.prose ol[type="A"] {
  list-style-type: upper-alpha;
}

.prose ol[type="a"] {
  list-style-type: lower-alpha;
}

.prose ol[type="A" s] {
  list-style-type: upper-alpha;
}

.prose ol[type="a" s] {
  list-style-type: lower-alpha;
}

.prose ol[type="I"] {
  list-style-type: upper-roman;
}

.prose ol[type="i"] {
  list-style-type: lower-roman;
}

.prose ol[type="I" s] {
  list-style-type: upper-roman;
}

.prose ol[type="i" s] {
  list-style-type: lower-roman;
}

.prose ol[type="1"] {
  list-style-type: decimal;
}

.prose ul {
  list-style-type: disc;
  margin-top: 1.25em;
  margin-bottom: 1.25em;
  padding-right: 1.625em;
}

.prose ol > li {
  position: relative;
  padding-right: 0.375em;
}

.prose ul > li {
  position: relative;
  padding-right: 0.375em;
}

.prose ol > li::marker {
  font-weight: 400;
  color: #6b7280;
}

.prose ul > li::marker {
  color: #d1d5db;
}

.prose dt {
  color: #111827;
  font-weight: 600;
  margin-top: 1.25em;
}

.prose dd {
  margin-top: 0.5em;
  padding-right: 1.625em;
}

.prose hr {
  border-color: #e5e7eb;
  border-top-width: 1px;
  margin-top: 3em;
  margin-bottom: 3em;
}

.prose figure {
  margin-top: 2em;
  margin-bottom: 2em;
}

.prose figure > * {
  margin-top: 0;
  margin-bottom: 0;
}

.prose figcaption {
  color: #6b7280;
  font-size: 0.875em;
  line-height: 1.4285714;
  margin-top: 0.8571429em;
}

/* Custom styles for Arabic RTL layout */
.prose {
  direction: rtl;
  text-align: right;
}

.prose blockquote {
  border-right-width: 0;
  border-left-width: 0.25rem;
  border-left-color: #6A5ACD;
  padding-right: 0;
  padding-left: 1em;
}

.prose ul,
.prose ol {
  padding-right: 0;
  padding-left: 1.625em;
}

.prose ol > li,
.prose ul > li {
  padding-right: 0;
  padding-left: 0.375em;
}

.prose dd {
  padding-right: 0;
  padding-left: 1.625em;
}

.prose th,
.prose td {
  text-align: right;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .prose h1 {
    font-size: 2em;
  }
  
  .prose h2 {
    font-size: 1.5em;
  }
  
  .prose h3 {
    font-size: 1.25em;
  }
}