/* ============================================================
   Markdown editor component
   ============================================================ */
.mde {
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  background: rgba(255,255,255,.04);
  overflow: hidden;
  transition: border-color .2s;
}
.mde:focus-within { border-color: var(--cyan); }

.mde-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .35rem .45rem;
  background: rgba(7,6,13,.5);
  border-bottom: 1px solid rgba(255,255,255,.08);
  flex-wrap: wrap;
}
.mde-tools { display: flex; align-items: center; gap: .12rem; flex-wrap: wrap; }
.mde-btn {
  min-width: 30px; height: 30px;
  padding: 0 .5rem;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: none; border-radius: 7px;
  color: var(--txt-dim); font-size: .9rem; font-family: inherit;
  cursor: pointer; transition: background .15s, color .15s;
}
.mde-btn:hover { background: rgba(255,255,255,.1); color: var(--txt); }
.mde-btn:active { background: rgba(255,45,149,.18); }
.mde-sep { width: 1px; height: 18px; background: rgba(255,255,255,.12); margin: 0 .25rem; }

.mde-tabs { display: inline-flex; background: rgba(255,255,255,.05); border-radius: 8px; padding: 2px; }
.mde-tab {
  font: inherit; font-size: .78rem; font-weight: 600;
  padding: .28rem .8rem; border: none; border-radius: 6px;
  background: transparent; color: var(--txt-faint); cursor: pointer;
  transition: background .15s, color .15s;
}
.mde-tab:hover { color: var(--txt-dim); }
.mde-tab.active { background: var(--pink); color: #fff; }

.mde-textarea {
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  width: 100%;
  resize: vertical;
  min-height: 200px;
}
.mde-textarea:focus { outline: none; }

.mde-preview {
  padding: 1rem 1.1rem;
  min-height: 200px;
  font-size: .95rem;
}
.mde-preview:empty::before { content: "Nothing to preview."; color: var(--txt-faint); }

.mde-hint {
  padding: .45rem .8rem;
  border-top: 1px solid rgba(255,255,255,.07);
  font-size: .72rem; color: var(--txt-faint);
  background: rgba(7,6,13,.35);
}
.mde-hint strong { color: var(--txt-dim); }
