/* ================================================================
   NOUS Platform — Guide Panel Styles
   Genesis Design Language
   Author: Randolph R Beverly Jr — Beverly Index LLC
   ================================================================ */

/* ── Guide Panel Overlay ──────────────────────────────────────── */
.guide-panel-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.guide-panel-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* ── Guide Panel Container ────────────────────────────────────── */
.guide-panel {
  position: fixed;
  top: 0;
  right: -480px;
  width: 460px;
  max-width: 90vw;
  height: 100vh;
  z-index: 9999;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);

  /* Genesis: deep void background */
  background:
    radial-gradient(ellipse at 20% 0%, rgba(88, 28, 135, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 100%, rgba(30, 64, 175, 0.10) 0%, transparent 50%),
    linear-gradient(180deg, #0a0a1a 0%, #0d0f1a 100%);
  border-left: 1px solid rgba(139, 92, 246, 0.2);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.5);
}

.guide-panel.open {
  right: 0;
}

/* ── Guide Header ─────────────────────────────────────────────── */
.guide-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid rgba(139, 92, 246, 0.15);
  flex-shrink: 0;
}

.guide-panel-title {
  font-family: 'Outfit', 'Segoe UI', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #e2e8f0;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.guide-panel-title span {
  color: rgba(139, 92, 246, 0.8);
  font-weight: 400;
  margin-left: 6px;
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
}

.guide-panel-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: 8px;
  background: rgba(139, 92, 246, 0.08);
  color: #a78bfa;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'JetBrains Mono', monospace;
  line-height: 1;
}

.guide-panel-close:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.4);
  color: #c4b5fd;
}

/* ── Guide Search Bar ─────────────────────────────────────────── */
.guide-search-bar {
  padding: 12px 24px;
  flex-shrink: 0;
}

.guide-search-input {
  width: 100%;
  padding: 10px 14px 10px 36px;
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 8px;
  background: rgba(15, 15, 35, 0.8);
  color: #e2e8f0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}

.guide-search-input::placeholder {
  color: rgba(148, 163, 184, 0.5);
}

.guide-search-input:focus {
  border-color: rgba(139, 92, 246, 0.5);
}

.guide-search-wrapper {
  position: relative;
}

.guide-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(139, 92, 246, 0.5);
  font-size: 14px;
  pointer-events: none;
}

/* ── Guide Scrollable Content ─────────────────────────────────── */
.guide-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 24px 32px;
  scroll-behavior: smooth;
}

/* Custom scrollbar — Genesis style */
.guide-panel-body::-webkit-scrollbar {
  width: 6px;
}

.guide-panel-body::-webkit-scrollbar-track {
  background: transparent;
}

.guide-panel-body::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.3);
  border-radius: 3px;
}

.guide-panel-body::-webkit-scrollbar-thumb:hover {
  background: rgba(139, 92, 246, 0.5);
}

/* ── Category Group ───────────────────────────────────────────── */
.guide-category {
  margin-top: 20px;
}

.guide-category:first-child {
  margin-top: 8px;
}

.guide-category-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(139, 92, 246, 0.6);
  padding: 0 0 8px 0;
  margin: 0;
  border-bottom: 1px solid rgba(139, 92, 246, 0.1);
}

/* ── Individual Definition Entry ──────────────────────────────── */
.guide-entry {
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.3s ease, padding-left 0.3s ease;
  border-radius: 6px;
}

.guide-entry:last-child {
  border-bottom: none;
}

.guide-entry-term {
  font-family: 'Outfit', 'Segoe UI', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #e2e8f0;
  margin: 0 0 4px 0;
}

.guide-entry-short {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: rgba(139, 92, 246, 0.7);
  margin: 0 0 10px 0;
  letter-spacing: 0.3px;
}

.guide-entry-definition {
  font-family: 'Outfit', 'Segoe UI', sans-serif;
  font-size: 13px;
  line-height: 1.65;
  color: rgba(203, 213, 225, 0.85);
  margin: 0;
}

/* ── Highlight Flash (scroll-to-anchor) ───────────────────────── */
.guide-entry.highlight {
  background: rgba(139, 92, 246, 0.12);
  padding-left: 12px;
  border-left: 3px solid rgba(139, 92, 246, 0.6);
}

/* ── Info Icon Replacement (on PULL headers) ──────────────────── */
.guide-info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.06);
  color: #f0eef5;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  font-style: italic;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: 8px;
  vertical-align: middle;
  user-select: none;
  -webkit-user-select: none;
  line-height: 1;
  flex-shrink: 0;
  position: relative;
}

.guide-info-icon:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
  transform: scale(1.1);
}

.guide-info-icon:active {
  transform: scale(0.95);
}

@media (max-width: 768px) {
  .guide-info-icon {
    width: 22px;
    height: 22px;
    min-width: 22px;
    min-height: 22px;
    font-size: 12px;
  }
  .guide-info-icon::before {
    content: '';
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
  }
}

/* ── Empty State ──────────────────────────────────────────────── */
.guide-empty-state {
  text-align: center;
  padding: 40px 20px;
  color: rgba(148, 163, 184, 0.5);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}

/* ── Keyboard Shortcut Hint ───────────────────────────────────── */
.guide-panel-footer {
  padding: 12px 24px;
  border-top: 1px solid rgba(139, 92, 246, 0.1);
  flex-shrink: 0;
  text-align: center;
}

.guide-keyboard-hint {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: rgba(148, 163, 184, 0.4);
}

.guide-keyboard-hint kbd {
  display: inline-block;
  padding: 2px 6px;
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 4px;
  background: rgba(139, 92, 246, 0.06);
  font-family: inherit;
  font-size: 10px;
  color: rgba(139, 92, 246, 0.6);
  margin: 0 2px;
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 560px) {
  .guide-panel {
    width: 100%;
    max-width: 100%;
    right: -100%;
  }
}
