/* Flash messages are now rendered via Tailwind in the layout */

/* Trix content styling for article pages */
.trix-content {
  line-height: 1.8;
  color: #334155;
}

.trix-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2rem 0 0.75rem;
  color: #0f172a;
  font-family: inherit;
}

.trix-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
  color: #0f172a;
  font-family: inherit;
}

.trix-content p {
  margin: 1rem 0;
  text-align: justify;
}

.trix-content a {
  color: #1c53a3;
  text-decoration: none;
}

.trix-content a:hover {
  text-decoration: underline;
}

.trix-content strong {
  color: #0f172a;
  font-weight: 700;
}

.trix-content ul,
.trix-content ol {
  margin: 0.75rem 0;
  padding-inline-start: 1.5rem;
}

.trix-content li {
  margin: 0.375rem 0;
  color: #334155;
}

.trix-content blockquote {
  border-inline-start: 3px solid #1c53a3;
  background: #f4f7fc;
  padding: 0.75rem 1rem;
  margin: 1rem 0;
  border-start-end-radius: 8px;
  border-end-end-radius: 8px;
  color: #475569;
}

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

body.dark-mode .trix-content {
  color: #cbd5e1;
}

body.dark-mode .trix-content h2,
body.dark-mode .trix-content h3,
body.dark-mode .trix-content strong {
  color: #e2e8f0;
}

body.dark-mode .trix-content blockquote {
  background: #1e293b;
  border-color: #3a7bd5;
  color: #94a3b8;
}

body.dark-mode .trix-content a {
  color: #5a9be0;
}

body.dark-mode .trix-content li {
  color: #cbd5e1;
}

body.dark-mode .trix-content hr {
  border-color: #334155;
}

/* Trix editor styling in admin form */
trix-editor {
  min-height: 320px;
  border: 1px solid #e2e8f0 !important;
  border-radius: 0 0 0.5rem 0.5rem;
  font-family: 'Cairo', sans-serif;
  direction: rtl;
  text-align: start;
}

trix-toolbar {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-bottom: none;
  border-radius: 0.5rem 0.5rem 0 0;
  padding: 0.5rem;
  direction: rtl;
}

trix-toolbar .trix-button-group {
  margin-bottom: 0;
}

trix-toolbar .trix-button {
  border-color: #e2e8f0;
}

trix-toolbar .trix-button.trix-active {
  background: #dbeafe;
}

trix-editor:focus {
  outline: none;
  border-color: #2e74d4 !important;
}

body.dark-mode trix-editor {
  background: #1e293b;
  color: #e2e8f0;
  border-color: #334155 !important;
}

body.dark-mode trix-toolbar {
  background: #0f172a;
  border-color: #334155;
}

body.dark-mode trix-toolbar .trix-button {
  border-color: #334155;
  color: #e2e8f0;
  filter: invert(0.85);
}
