/* === Admin fact manager === */

/* liveselect dark theme. Its dropdown menu may portal to <body>, so the theme
   variables live on :root rather than only on the search container. */
:root {
  --liveselect-bg: #1e1e24;
  --liveselect-surface: #26262e;
  --liveselect-text: #f0f0f0;
  --liveselect-text-muted: #9aa0aa;
  --liveselect-border: #3a3a44;
  --liveselect-border-focus: #f0a500;
  --liveselect-accent: #f0a500;
  --liveselect-hover: #33333d;
  --liveselect-danger: #f87171;
  --liveselect-mark: #f0a500;
  --liveselect-radius: 8px;
  --liveselect-shadow: 0 8px 24px rgba(0, 0, 0, .5);
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.admin-header h2 { margin: 0; }
.admin-header-right { display: flex; align-items: center; gap: 10px; }

.pending-count { font-size: 12px; color: #9aa0aa; white-space: nowrap; }
.pending-count.has-pending { color: #f0a500; font-weight: 700; }

.admin-logout {
  font-size: 13px;
  padding: 5px 12px;
  background: transparent;
  color: #9aa0aa;
  border: 1px solid #3a3a44;
  border-radius: 7px;
  cursor: pointer;
}
.admin-logout:hover { color: #f0f0f0; border-color: #9aa0aa; }

.fact-search { margin-bottom: 14px; }

.fact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 55vh;
  overflow-y: auto;
}

.fact-li {
  background: #23232b;
  border: 1px solid #33333d;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
  transition: box-shadow .3s, border-color .3s;
}
.fact-li.is-pending { border-left: 3px solid #f0a500; }
.fact-li.flash { border-color: #f0a500; box-shadow: 0 0 0 3px rgba(240, 165, 0, .35); }

.fact-edit-input {
  width: 100%;
  box-sizing: border-box;
  background: #1a1a20;
  color: #f0f0f0;
  border: 1px solid #33333d;
  border-radius: 7px;
  padding: 8px 10px;
  font: inherit;
  resize: vertical;
}
.fact-edit-input:focus { outline: none; border-color: #f0a500; }

.fact-controls { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.approve-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #cfcfd6;
  cursor: pointer;
}
.pending-badge {
  font-size: 11px;
  font-weight: 700;
  color: #f0a500;
  background: rgba(240, 165, 0, .14);
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.delete-fact {
  margin-left: auto;
  background: transparent;
  border: 1px solid #3a2626;
  color: #f87171;
  border-radius: 7px;
  padding: 4px 10px;
  cursor: pointer;
  font-size: 15px;
}
.delete-fact:hover { background: #2a1a1a; }
