/**
 * WordPress Block Editor Styles Override
 * Ensures WordPress blocks work with dark theme
 */

/* Override WordPress default block styles for dark theme */
.entry-content {
  color: var(--text);
}

/* Paragraphs */
.entry-content p {
  color: var(--text);
  line-height: 1.7;
}

/* Headings */
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6,
.wp-block-heading {
  color: var(--text);
}

/* Lists */
.entry-content ul,
.entry-content ol,
.wp-block-list {
  color: var(--text);
  padding-left: 2rem;
  margin: 1.5rem 0;
}

.entry-content ul li,
.entry-content ol li {
  margin-bottom: 0.5rem;
  color: var(--text);
}

/* Separators */
.wp-block-separator,
.entry-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

/* Buttons */
.wp-block-button__link,
.wp-element-button {
  background: var(--accent);
  color: var(--bg);
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s;
}

.wp-block-button__link:hover,
.wp-element-button:hover {
  background: #f0c987;
  color: var(--bg);
}

/* Blockquotes */
.wp-block-quote,
blockquote {
  border-left: 4px solid var(--accent);
  padding-left: 1.5rem;
  margin: 2rem 0;
  color: var(--text-muted);
  font-style: italic;
}

.wp-block-quote cite {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Code blocks */
.wp-block-code,
code,
pre {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  font-family: 'JetBrains Mono', monospace;
  overflow-x: auto;
}

code {
  padding: 0.2rem 0.4rem;
  font-size: 0.9em;
}

/* Images and media */
.wp-block-image img {
  border-radius: 8px;
}

/* Tables */
.wp-block-table,
table {
  border-collapse: collapse;
  width: 100%;
  margin: 2rem 0;
}

.wp-block-table th,
.wp-block-table td,
table th,
table td {
  border: 1px solid var(--border);
  padding: 0.75rem;
  color: var(--text);
}

.wp-block-table th,
table th {
  background: var(--surface);
  font-weight: 600;
}

/* Groups and covers */
.wp-block-group {
  margin: 2rem 0;
}

/* Search widget */
.wp-block-search__input {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.75rem;
  border-radius: 8px;
}

.wp-block-search__button {
  background: var(--accent);
  color: var(--bg);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
}

.wp-block-search__button:hover {
  background: #f0c987;
}

/* Latest posts widget */
.wp-block-latest-posts li {
  margin-bottom: 0.75rem;
}

.wp-block-latest-posts a {
  color: var(--text);
  text-decoration: none;
}

.wp-block-latest-posts a:hover {
  color: var(--accent);
}

/* Widget areas */
.widget {
  margin-bottom: 2rem;
}

.widget-title,
.wp-block-heading {
  color: var(--text);
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

/* Ensure all text in content area is properly colored */
.entry-content > * {
  color: var(--text);
}

/* Fix for WordPress default light backgrounds */
.has-background {
  background-color: var(--surface) !important;
}

/* Override any white/light backgrounds */
.has-white-background-color {
  background-color: var(--surface) !important;
}

.has-white-color {
  color: var(--text) !important;
}

/* Links in content */
.entry-content a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(212, 160, 83, 0.3);
  text-underline-offset: 2px;
  transition: all 0.2s;
}

.entry-content a:hover {
  color: #f0c987;
  text-decoration-color: rgba(240, 201, 135, 0.5);
}

/* Ensure proper spacing */
.entry-content > * + * {
  margin-top: 1.5rem;
}

/* Gallery blocks */
.wp-block-gallery {
  margin: 2rem 0;
}

/* Column blocks */
.wp-block-columns {
  margin: 2rem 0;
}

/* Embed blocks */
.wp-block-embed {
  margin: 2rem 0;
}
