/* Dark mode styles for index.html */
body.dark-mode {
  background-color: #1a202c;
  color: #e2e8f0;
}

body.dark-mode #sidebar {
  background: #2d3748;
  border-right-color: #4a5568;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.4);
}

body.dark-mode .sidebar-header {
  background: #2d3748;
  border-bottom-color: #4a5568;
}

body.dark-mode h2 {
  color: #e2e8f0;
}

body.dark-mode .rich-text-editor {
  border-color: #4a5568;
  background: #2d3748;
  color: #e2e8f0;
}

body.dark-mode .rich-text-editor:focus {
  border-color: #63b3ed;
  box-shadow: 0 0 0 3px rgba(99, 179, 237, 0.2);
}

body.dark-mode .control-group {
  background: #2d3748;
  border-color: #4a5568;
}

body.dark-mode .form-label {
  color: #cbd5e1;
}

body.dark-mode .accordion-item {
  border-color: #4a5568;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

body.dark-mode .accordion-button {
  color: #e2e8f0;
  background-color: #2d3748;
}

body.dark-mode .accordion-button:not(.collapsed) {
  background-color: #4a5568;
  color: #90cdf4;
}

body.dark-mode .accordion-item[draggable='true'] .accordion-button::before {
  background-image: radial-gradient(circle, #a0aec0 1.5px, transparent 1.5px);
}

body.dark-mode #preview-container {
  background-color: #1a202c;
}

.form-check-label,
.small,
label {
  color: #e2e8f0;
}

/* Dark mode styles for newsletter.html (within iframe) */
html.dark-mode-newsletter {
  --colorPage-default: #1a202c !important;
  --colorHeader-default: #2d3748 !important;
  --colorFooter-default: #2d3748 !important;
  --accent-cyber: #90cdf4 !important;
}

html.dark-mode-newsletter body {
  background-color: var(--colorPage) !important;
  color: #e2e8f0 !important;
}

html.dark-mode-newsletter .header {
  background-color: var(--colorHeader) !important;
}

html.dark-mode-newsletter .header h1,
html.dark-mode-newsletter .section h3,
html.dark-mode-newsletter blockquote {
  color: #e2e8f0 !important;
}

html.dark-mode-newsletter .header h2 {
  color: var(--accent-cyber) !important;
}

html.dark-mode-newsletter .section p {
  color: #a0aec0 !important;
}

html.dark-mode-newsletter .footer {
  background-color: var(--colorFooter) !important;
  color: #a0aec0 !important;
}

html.dark-mode-newsletter .footer a {
  color: #90cdf4 !important;
}

html.dark-mode-newsletter .section img {
  filter: brightness(0.8) grayscale(20%) !important; /* Adjust image appearance in dark mode */
}

html.dark-mode-newsletter .section img:hover {
  filter: brightness(1) grayscale(0%) !important;
}

/* Override specific element styles if needed for dark mode colors within newsletter.html */
html.dark-mode-newsletter [data-editable-id^='title'] {
  color: inherit !important;
}

html.dark-mode-newsletter [data-editable-id^='text'] {
  color: inherit !important;
}

html.dark-mode-newsletter [data-editable-id^='quote'] {
  color: inherit !important;
}
