/* =====================================================
   LinkVault Directory — custom styles on top of Bootstrap 5
   ===================================================== */

:root {
  --lv-primary: #0d6efd;
  --lv-shadow: 0 .25rem .75rem rgba(0, 0, 0, .06);
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}
main { flex: 1 0 auto; }
footer { flex-shrink: 0; }

/* ---------- Navbar mega-menu ---------- */
@media (min-width: 992px) {
  .lv-mega {
    left: 0;
    right: 0;
    max-height: 75vh;
    overflow-y: auto;
  }
}
.lv-mega .dropdown-item:hover { background: #f0f6ff; }

/* ---------- Cards ---------- */
.listing-card { transition: transform .12s ease, box-shadow .12s ease; }
.listing-card:hover { transform: translateY(-2px); box-shadow: var(--lv-shadow), 0 .5rem 1.25rem rgba(13, 110, 253, .12); }
.cat-tile:hover { border-color: var(--lv-primary); }

/* ---------- Live / polling indicators ---------- */
.lv-live-dot {
  display: inline-block;
  width: .5rem;
  height: .5rem;
  border-radius: 50%;
  background: #198754;
  margin-right: .25rem;
  animation: lvPulse 2s infinite;
}
@keyframes lvPulse {
  0%   { box-shadow: 0 0 0 0 rgba(25, 135, 84, .5); }
  70%  { box-shadow: 0 0 0 6px rgba(25, 135, 84, 0); }
  100% { box-shadow: 0 0 0 0 rgba(25, 135, 84, 0); }
}

/* ---------- Search suggest box ---------- */
.lv-suggest-box { z-index: 1050; max-height: 320px; overflow: auto; }
.lv-suggest-box .list-group-item { cursor: pointer; border-radius: 0; }

/* ---------- Chat ---------- */
.lv-chat-log { font-size: .875rem; }
.lv-chat-log .lv-msg { max-width: 80%; margin-bottom: .5rem; }
.lv-chat-log .lv-msg-admin {
  background: #e7f1ff;
  border: 1px solid #b6d4fe;
  border-radius: .75rem .75rem .75rem 0;
  padding: .35rem .6rem;
  margin-right: auto;
}
.lv-chat-log .lv-msg-user {
  background: #fff3cd;
  border: 1px solid #ffe69c;
  border-radius: .75rem .75rem 0 .75rem;
  padding: .35rem .6rem;
  margin-left: auto;
}
.lv-chat-log .lv-msg-meta { font-size: .7rem; opacity: .7; }

/* ---------- Tool forms ---------- */
.lv-tool-result pre { white-space: pre-wrap; word-break: break-word; }
.lv-tool-result table th { color: #555; }

/* ---------- Article body (Quill output) ---------- */
.article-body h2 { font-size: 1.35rem; margin-top: 1.4rem; }
.article-body h3 { font-size: 1.15rem; margin-top: 1.2rem; }
.article-body img { max-width: 100%; height: auto; border-radius: .375rem; }
.article-body blockquote {
  border-left: 4px solid var(--lv-primary);
  padding-left: 1rem;
  color: #555;
  margin: 1rem 0;
}

/* ---------- Accessibility ---------- */
:focus-visible { outline: 3px solid rgba(13, 110, 253, .5); outline-offset: 2px; }
.breadcrumb { --bs-breadcrumb-divider-color: #999; }
