/* Prompt Library — Dark theme overrides */

/* Base */
html {
  scroll-behavior: smooth;
}

body {
  background-color: #0a0a0b;
  color: #e5e5e5;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Search input glow */
.search-input:focus {
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.4);
}

/* Result card hover */
.result-card {
  transition: border-color 0.15s ease;
}
.result-card:hover {
  border-color: #4f46e5;
}

/* Similarity bar */
.sim-bar {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, #4f46e5, #7c3aed);
}

/* Badge */
.tag-badge {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 9999px;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.25);
}

/* Expand animation */
.content-expand {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.content-expand.open {
  max-height: 2000px;
}

/* Spinner */
.spinner {
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: #6366f1;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 0.6s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Checkbox group */
.checkbox-group label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  font-size: 0.8rem;
  transition: background 0.15s;
}
.checkbox-group label:hover {
  background: rgba(255, 255, 255, 0.1);
}
.checkbox-group input:checked + span {
  color: #a5b4fc;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 20px;
  border-radius: 8px;
  z-index: 50;
  animation: slideIn 0.2s ease;
}
.toast.success { background: #065f46; color: #6ee7b7; }
.toast.error { background: #7f1d1d; color: #fca5a5; }
@keyframes slideIn {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* TinyMDE dark theme */
.TinyMDE {
  background-color: #111113;
  color: #e5e5e5;
  font-size: 16px;
  line-height: 24px;
  border: 1px solid #374151;
  border-radius: 0.5rem;
  overflow-y: auto;
  height: 100%;
  outline: none;
  padding: 5px;
}
.TMBlankLine { height: 24px; }
.TinyMDE .TMLine { padding: 0 0.75rem; }
/* Headings */
.TMH1, .TMSetextH1 {
  font-size: 22px;
  line-height: 32px;
  font-weight: bold;
  margin-bottom: 8px;
}
.TMSetextH1 { margin-bottom: 0; }
.TMSetextH1Marker { margin-bottom: 8px; }
.TMH2, .TMSetextH2 {
  font-size: 20px;
  line-height: 28px;
  font-weight: bold;
  margin-bottom: 4px;
}
.TMH3 { font-size: 18px; line-height: 26px; font-weight: bold; }
.TMH4 { font-size: 17px; line-height: 25px; font-weight: bold; }
.TMH5 { font-size: 16px; line-height: 24px; font-weight: bold; }
.TMH6 { font-size: 15px; line-height: 24px; font-weight: bold; color: #9ca3af; }
/* Marks (syntax characters like #, *, etc.) */
.TMMark { color: #6b7280; }
.TMMark_TMH1, .TMMark_TMH2 { color: #818cf8; }
.TMMark_TMUL, .TMMark_TMOL { color: #818cf8; }
.TinyMDE-cursor { border-color: #818cf8; }
/* Code */
.TMCode, .TMFencedCodeBacktick, .TMFencedCodeTilde, .TMIndentedCode {
  background-color: #1e1e2e;
  font-family: monospace;
  font-size: 0.9em;
}
.TMCode { border: 1px solid #374151; border-radius: 2px; }
.TMCodeFenceBacktickOpen, .TMCodeFenceTildeOpen { border-bottom-color: #374151; }
.TMCodeFenceBacktickClose, .TMCodeFenceTildeClose { border-top-color: #374151; }
.TMInfoString { color: #818cf8; }
/* Blockquote */
.TMBlockquote { border-left-color: #4b5563; font-style: italic; border-left: 2px solid #4b5563; padding-left: 10px; margin-left: 10px; }
/* Lists */
.TMUL, .TMOL { padding-left: 20px; }
/* HR */
.TMHR { border-color: #374151; }
/* Links and images */
.TMLink { color: #818cf8; text-decoration: underline; }
.TMImage { color: #818cf8; text-decoration: underline; }
.TMAutolink { color: #818cf8; }
/* Strong / Em / Strikethrough */
.TMStrong { font-weight: bold; }
.TMEm { font-style: italic; }
.TMStrikethrough { text-decoration: line-through; }
/* HTML */
.TMHTML, .TMHTMLBlock, .TMHTMLContent { color: #6b7280; }
/* Placeholder */
.TinyMDE.TinyMDE_empty::before { color: #4b5563; }
.TinyMDE.TinyMDE_empty { position: relative; }
.TMCommandBar {
  background-color: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  height: auto;
  min-height: 24px;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 2px;
}
.TMCommandButton {
  color: #9ca3af;
  fill: #9ca3af;
}
.TMCommandButton:hover {
  color: #e5e5e5;
  fill: #e5e5e5;
  background-color: rgba(255,255,255,0.05);
}
.TMCommandDivider {
  border-left-color: #374151;
  border-right-color: transparent;
}
.TMCommandButton_Active {
  background-color: rgba(99,102,241,0.2);
  color: #818cf8;
  fill: #818cf8;
}
.TMCommandButton_Active:hover {
  background-color: rgba(99,102,241,0.3);
}
.TMCommandButton_Inactive {
  background-color: transparent;
}
.TMCommandButton_Disabled {
  color: #4b5563;
  fill: #4b5563;
}
