/* ===== Preview Pane Content ===== */
.preview-content {
  flex: 1;
  overflow-y: auto;
  position: relative;
}

.preview-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 100%;
  color: var(--text-dim);
  text-align: center;
  padding: 32px;
}

.preview-empty svg {
  width: 48px;
  height: 48px;
  opacity: 0.3;
}

.preview-empty p {
  font-size: 14px;
  max-width: 260px;
}

/* ===== Raw View ===== */
.preview-raw {
  font-family: var(--font-mono);
  font-size: var(--preview-font-size, 14px);
  line-height: 1.7;
  color: var(--text);
  padding: 20px 24px;
  white-space: pre-wrap;
  word-break: break-word;
  tab-size: 2;
}

/* ===== Rendered View ===== */
.preview-rendered {
  font-family: var(--font-mono);
  font-size: var(--preview-font-size, 14px);
  line-height: 1.7;
  color: var(--text);
  padding: 20px 24px;
}

/* Gemtext rendered elements */
.gmi-line {
  display: block;
  margin: 0;
}

.gmi-heading-1 {
  font-size: 1.6em;
  font-weight: 700;
  color: #c084fc;
  margin: 0.8em 0 0.3em;
  line-height: 1.3;
}

.gmi-heading-2 {
  font-size: 1.3em;
  font-weight: 600;
  color: #a78bfa;
  margin: 0.7em 0 0.2em;
  line-height: 1.3;
}

.gmi-heading-3 {
  font-size: 1.1em;
  font-weight: 600;
  color: #818cf8;
  margin: 0.6em 0 0.2em;
  line-height: 1.3;
}

.gmi-link {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--link-color);
  padding: 1px 0;
}

.gmi-link-arrow {
  color: var(--text-dim);
  flex-shrink: 0;
  font-size: 0.85em;
}

.gmi-link a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(96,165,250,0.3);
  word-break: break-all;
}
.gmi-link a:hover { border-bottom-color: var(--link-color); }

.gmi-list {
  color: #86efac;
  padding: 1px 0;
}

.gmi-list-bullet {
  color: var(--text-dim);
  margin-right: 4px;
}

.gmi-quote {
  color: #fcd34d;
  border-left: 2px solid #fcd34d;
  padding-left: 10px;
  padding: 2px 0 2px 10px;
}

.gmi-quote-marker {
  color: var(--text-dim);
  margin-right: 4px;
}

.gmi-preformat-toggle {
  color: var(--text-dim);
  font-size: 0.85em;
}

.gmi-preformat-block {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin: 4px 0;
  overflow-x: auto;
  font-size: 0.9em;
}

.gmi-preformat-block pre {
  margin: 0;
  white-space: pre;
  color: #94a3b8;
}

.gmi-blank { display: block; height: 0.5em; }

.gmi-text {
  color: var(--text);
  word-break: break-word;
}
