/* ============================================================
   VisionCore · 18 Rail — app-level navigation

   - .vc-rail        56px icon rail (Gallery·Ops·Chatbot·Personas·Studio)
   - Top secondary actions collapse into the rail on desktop.
   - Detail polish: sidebar, modal shell, scrollbars
   ============================================================ */

/* ============ ICON RAIL ============ */
.vc-rail {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: 56px;
  background: #080808;
  border-right: 1px solid var(--vc-panel);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0;
  gap: 4px;
  z-index: calc(var(--vc-z-drawer) + 2);
}
/* shift the app shell right of the rail */
body.vc-has-rail .app-container { padding-left: 56px; }
body.vc-has-rail .sidebar { border-left: 0; }

@media (min-width: 761px) {
  body.vc-has-rail #vc-nav-ops,
  body.vc-has-rail #chatbot-persona-btn,
  body.vc-has-rail #settings-btn,
  body.vc-has-rail #open-studio-btn {
    display: none !important;
  }
}

.vc-rail-brand {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--vc-grad-brand);
  position: relative;
  margin-bottom: 14px;
  box-shadow: 0 4px 14px rgba(255,42,95,.35);
  flex-shrink: 0;
}
.vc-rail-brand::after {
  content: ""; position: absolute; inset: 5px;
  border: 2px solid #080808; border-radius: 4px;
}

.vc-rail-btn {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--vc-r-md);
  color: var(--vc-ink-4);
  cursor: pointer;
  transition: var(--vc-fast);
  position: relative;
  flex-shrink: 0;
}
.vc-rail-btn:hover { color: var(--vc-ink-2); background: rgba(255,255,255,.04); }
.vc-rail-btn.active {
  color: var(--vc-brand-soft);
  background: var(--vc-brand-bg);
  border-color: var(--vc-brand-line);
}
.vc-rail-btn svg { width: 19px; height: 19px; }

/* tooltip */
.vc-rail-btn::after {
  content: attr(data-label);
  position: absolute;
  left: 50px; top: 50%;
  transform: translateY(-50%);
  padding: 5px 10px;
  background: #1c1c1c;
  border: 1px solid var(--vc-line);
  border-radius: var(--vc-r-sm);
  color: var(--vc-ink-2);
  font-size: 11px; font-weight: 600;
  white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity .12s var(--vc-ease);
  z-index: 10;
}
.vc-rail-btn:hover::after { opacity: 1; }

.vc-rail-spacer { flex: 1; }

/* hide rail on phones — bottom tabs already cover it */
@media (max-width: 760px) {
  .vc-rail { display: none; }
  body.vc-has-rail .app-container { padding-left: 0; }
}

/* ============ PAGE OVERLAY SHELL ============ */
.vc-page {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 56px;
  background: var(--vc-bg);
  z-index: var(--vc-z-sticky);
  display: none;
  flex-direction: column;
}
.vc-page.open { display: flex; }
@media (max-width: 760px) { .vc-page { left: 0; } }

.vc-page-head {
  padding: 18px 28px 16px;
  border-bottom: 1px solid var(--vc-panel);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
}
.vc-page-title {
  font-family: var(--vc-font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--vc-ink);
  margin: 0;
}
.vc-page-sub {
  font-size: 12px;
  color: var(--vc-ink-4);
  margin-top: 3px;
}
.vc-page-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.vc-page-notice {
  max-width: 420px;
  padding: 8px 10px;
  border: 1px solid var(--vc-line);
  border-radius: var(--vc-r-md);
  color: var(--vc-ink-3);
  font-size: 12px;
  line-height: 1.4;
  background: var(--vc-raise);
}
.vc-page-notice[data-tone="warn"] {
  color: var(--vc-warn-soft);
  border-color: rgba(255, 180, 0, .28);
  background: rgba(255, 180, 0, .08);
}
.vc-page-notice[hidden] { display: none; }
.vc-page-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 22px 28px;
}
.vc-page--promptLibrary .vc-page-body {
  padding: 0;
  overflow: hidden;
}
.vc-page-body::-webkit-scrollbar { width: 6px; }
.vc-page-body::-webkit-scrollbar-thumb { background: #222; border-radius: 999px; }

.vc-page-empty-state,
.vc-slot-empty {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--vc-ink-4);
}
.vc-page-empty-title {
  color: var(--vc-ink-2);
  font-size: 15px;
  font-weight: 800;
}
.vc-page-empty-copy {
  font-size: 12px;
}

/* ============ PERSONA CARDS ============ */
.vc-persona-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 18px;
}
.vc-persona-card {
  background: var(--vc-raise);
  border: 1px solid var(--vc-line);
  border-radius: var(--vc-r-lg);
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 18px;
  min-height: 156px;
  padding: 16px;
  position: relative;
  cursor: pointer;
  transition: var(--vc-fast);
}
.vc-persona-card:hover {
  border-color: var(--vc-brand-line);
  transform: translateY(-1px);
}
.vc-persona-avatar {
  width: 128px;
  height: 128px;
  border-radius: var(--vc-r-md);
  background: var(--vc-card);
  overflow: hidden;
}
.vc-persona-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.vc-persona-avatar-empty {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--vc-font-display);
  font-size: 34px;
  font-weight: 800;
  color: rgba(255,255,255,.85);
}
.vc-persona-body {
  min-width: 0;
  padding-right: 4px;
}
.vc-persona-name {
  font-size: 19px;
  font-weight: 800;
  color: var(--vc-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vc-persona-id {
  font-size: 12px;
  color: var(--vc-ink-4);
  margin-top: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vc-persona-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}
.vc-persona-meta span {
  max-width: 100%;
  min-height: 20px;
  padding: 3px 7px;
  border: 1px solid var(--vc-line);
  border-radius: 999px;
  color: var(--vc-ink-3);
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}
.vc-persona-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  align-self: end;
  justify-self: center;
  justify-content: center;
  width: min(100%, 460px);
  margin-top: 8px;
}
.vc-persona-queue-btn {
  min-height: 32px;
  padding: 0 12px;
  border-radius: var(--vc-r-sm);
  border: 1px solid var(--vc-line);
  background: rgba(255, 255, 255, .045);
  color: var(--vc-ink-3);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  transition: var(--vc-fast);
  text-align: center;
}
.vc-persona-queue-btn:hover {
  border-color: var(--vc-brand-line);
  color: var(--vc-ink);
}
.vc-persona-queue-btn.is-on {
  border-color: rgba(255, 42, 95, .85);
  background: linear-gradient(135deg, #ff2a5f, #ff6a1a);
  color: #fff;
  box-shadow: 0 0 18px rgba(255, 42, 95, .22);
}
.vc-persona-queue-btn:disabled {
  opacity: .62;
  cursor: wait;
}

.vc-prompt-rail-host {
  min-height: 100%;
  height: 100%;
}

@media (max-width: 760px) {
  .vc-page-head {
    padding: 14px 16px;
  }
  .vc-page-body {
    padding: 16px;
  }
  .vc-page--promptLibrary .vc-page-body {
    padding: 0;
  }
  .vc-persona-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .vc-persona-card {
    grid-template-columns: 108px minmax(0, 1fr);
    min-height: 136px;
    padding: 14px;
  }
  .vc-persona-avatar {
    width: 108px;
    height: 108px;
  }
  .vc-persona-actions {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    width: 100%;
  }
}

/* ============ DETAIL POLISH ============ */

/* sidebar: tighter sections, refined hover, thin scrollbar */
.folder-list { padding: 10px 8px !important; }
.folder-list::-webkit-scrollbar { width: 6px; }
.folder-list::-webkit-scrollbar-thumb { background: #222; border-radius: 999px; }
.folder-list::-webkit-scrollbar-track { background: transparent; }
.folder-section { margin-bottom: 2px !important; }
.folder-section-content { padding: 2px 0 8px !important; }

/* hub/modal scrollbars */
.vc-hub-body::-webkit-scrollbar,
.modal-content::-webkit-scrollbar,
.vc-inspector-content::-webkit-scrollbar { width: 6px; }
.vc-hub-body::-webkit-scrollbar-thumb,
.modal-content::-webkit-scrollbar-thumb,
.vc-inspector-content::-webkit-scrollbar-thumb { background: #222; border-radius: 999px; }

/* modal shell — uniform header & close position */
.modal-content { padding: 22px !important; }
.modal-head, .modal-head-lined { min-height: 36px; }
.modal .icon-btn { position: relative; top: 0; }
.modal-title-md, .modal-content h3 {
  font-family: var(--vc-font-display) !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  letter-spacing: -.01em !important;
}
.modal-copy-subtle { font-size: 12.5px !important; line-height: 1.6 !important; }

/* uniform modal divider rhythm */
.modal-head-lined {
  padding-bottom: 14px !important;
  margin-bottom: 18px !important;
  border-bottom: 1px solid var(--vc-panel) !important;
}
