/* ══════════════════════════════════════
   HJÆLPESYSTEM — shared/help-system.css
   Bruges på tværs af Bon v2 og Whiteboard
   ══════════════════════════════════════ */

/* ── Floating ? knap ─────────────────────────── */
#help-hint {
  position: fixed; bottom: 24px; right: 24px; z-index: 9000;
  width: 42px; height: 42px; border-radius: 12px;
  background: var(--surface-2, #f0ece6); border: 1px solid var(--color-border, #d7d1ca);
  color: var(--color-text-dim, #888); font-size: 15px; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  font-family: monospace;
}
#help-hint:hover { color: var(--brand-primary, #8e631f); border-color: var(--brand-primary, #8e631f); }
#help-hint.active {
  background: var(--brand-primary, #8e631f); color: #fff;
  border-color: var(--brand-primary, #8e631f);
  box-shadow: 0 4px 20px rgba(142,99,31,0.4);
}
#help-hint.map-mode {
  background: #3a2a5a; border-color: #8b5cf6; color: #c4b5fd;
  box-shadow: 0 4px 20px rgba(139,92,246,0.35);
}

/* ── Overlay ─────────────────────────────────── */
#help-overlay {
  position: fixed; inset: 0; z-index: 8000;
  background: rgba(0,0,0,0.25); backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none; transition: opacity 0.25s ease;
}
#help-overlay.visible { opacity: 1; pointer-events: all; }

/* ── Badges (numre på elementer) ─────────────── */
.help-badge {
  position: absolute; top: -8px; left: -8px; z-index: 8500;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--brand-primary, #8e631f); color: #fff;
  font-family: monospace; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(142,99,31,0.5); pointer-events: none;
  animation: help-badge-pop 0.25s cubic-bezier(0.34,1.56,0.64,1) both;
}
@keyframes help-badge-pop { from { transform: scale(0); opacity: 0 } to { transform: scale(1); opacity: 1 } }
.help-highlight {
  outline: 2px solid var(--brand-primary, #8e631f) !important;
  outline-offset: 3px !important; border-radius: 8px;
}

/* ── Side-panel ──────────────────────────────── */
#help-panel {
  position: fixed; top: 0; right: 0; z-index: 8100;
  width: 360px; height: 100vh;
  background: var(--color-background, #f5f4f2);
  border-left: 1px solid var(--color-border, #d7d1ca);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  box-shadow: -6px 0 40px rgba(0,0,0,0.15);
}
#help-panel.visible { transform: translateX(0); }

#help-panel-header {
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--color-border, #d7d1ca);
  display: flex; flex-direction: column; gap: 10px; flex-shrink: 0;
}
.help-panel-top {
  display: flex; align-items: center; justify-content: space-between;
}
.help-panel-title {
  font-size: 15px; font-weight: 700;
  color: var(--brand-primary, #8e631f);
  display: flex; align-items: center; gap: 8px;
}
.help-kbd {
  font-family: monospace; font-size: 11px;
  background: var(--surface-2, #e8e4de); border: 1px solid var(--color-border, #d7d1ca);
  border-radius: 5px; padding: 2px 7px; color: var(--color-text-dim, #888);
}
.help-close-btn {
  background: transparent; border: 1px solid var(--color-border, #d7d1ca);
  border-radius: 8px; color: var(--color-text-dim, #888); cursor: pointer;
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.help-close-btn:hover { color: var(--color-text, #333); border-color: #999; }
.help-close-btn svg { width: 16px; height: 16px; }

.help-page-indicator {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 12px;
  background: rgba(142,99,31,0.07); border: 1px solid rgba(142,99,31,0.2); border-radius: 7px;
}
.help-page-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand-primary, #8e631f); flex-shrink: 0; }
.help-page-name { font-size: 12px; color: var(--color-text-dim, #888); }
.help-page-name strong { color: var(--color-text, #333); font-weight: 600; }

#help-panel-body { flex: 1; overflow-y: auto; padding: 16px 0; }

.help-entry {
  padding: 14px 22px;
  border-bottom: 1px solid rgba(215,209,202,0.6);
  cursor: pointer; transition: background 0.1s;
  display: flex; gap: 14px; align-items: flex-start;
}
.help-entry:hover { background: rgba(142,99,31,0.05); }
.help-entry:last-child { border-bottom: none; }
.help-num {
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(142,99,31,0.15); color: var(--brand-primary, #8e631f);
  font-family: monospace; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px;
}
.help-entry-content { flex: 1; }
.help-entry-label {
  font-size: 12px; font-weight: 700; color: var(--color-text-dim, #888);
  text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 4px;
}
.help-entry-text { font-size: 13px; color: var(--color-text, #333); line-height: 1.5; }

/* ── Tooltip ─────────────────────────────────── */
.help-tooltip {
  position: fixed; z-index: 8600; max-width: 260px;
  background: #fff; border: 1px solid var(--brand-primary, #8e631f);
  border-radius: 8px; padding: 10px 14px;
  font-size: 13px; color: var(--color-text, #333); line-height: 1.45;
  box-shadow: 0 6px 24px rgba(0,0,0,0.15); pointer-events: none;
  opacity: 0; transform: translateY(4px); transition: all 0.15s ease;
}
.help-tooltip.visible { opacity: 1; transform: translateY(0); }
.help-tooltip-label {
  font-size: 11px; font-weight: 700; color: var(--brand-primary, #8e631f);
  text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 5px;
}

/* ── Kortlægningstilstand ────────────────────── */
.map-mappable {
  outline: 2px dashed rgba(139,92,246,0.5) !important;
  outline-offset: 3px !important; border-radius: 8px;
  cursor: crosshair !important; transition: outline-color 0.15s;
}
.map-mappable:hover {
  outline-color: rgba(139,92,246,1) !important;
  background: rgba(139,92,246,0.05) !important;
}
.map-mapped {
  outline: 2px solid rgba(106,191,105,0.5) !important;
  outline-offset: 3px !important; border-radius: 8px;
}

.map-banner {
  position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 8900;
  background: #2a1f4a; border: 1px solid #8b5cf6;
  padding: 10px 20px; border-radius: 30px;
  font-size: 13px; font-weight: 600; color: #c4b5fd;
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 4px 24px rgba(139,92,246,0.3);
  opacity: 0; pointer-events: none; transition: all 0.3s;
}
.map-banner.visible { opacity: 1; pointer-events: all; }
.map-banner-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #8b5cf6;
  animation: help-blink 1s infinite;
}
@keyframes help-blink { 0%,100% { opacity: 1 } 50% { opacity: 0.3 } }

/* Popup til kortlægning */
#map-popup {
  position: fixed; z-index: 9500;
  width: 340px; background: #fff;
  border: 1px solid #8b5cf6; border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.2);
  padding: 18px; display: flex; flex-direction: column; gap: 12px;
  opacity: 0; pointer-events: none; transform: scale(0.95);
  transition: all 0.2s cubic-bezier(0.34,1.2,0.64,1);
}
#map-popup.visible { opacity: 1; pointer-events: all; transform: scale(1); }
.popup-title {
  font-size: 13px; font-weight: 700; color: #7c3aed;
  display: flex; align-items: center; gap: 8px;
}
.popup-selector-preview {
  font-family: monospace; font-size: 11px;
  background: rgba(139,92,246,0.08); border: 1px solid rgba(139,92,246,0.3);
  border-radius: 6px; padding: 5px 10px; color: #7c3aed;
  word-break: break-all;
}
.popup-key-preview {
  font-family: monospace; font-size: 11px;
  background: rgba(139,92,246,0.08); border: 1px solid rgba(139,92,246,0.3);
  border-radius: 6px; padding: 5px 10px; color: #7c3aed;
}
.popup-input {
  padding: 8px 11px; background: var(--color-background, #f5f4f2);
  border: 1px solid var(--color-border, #d7d1ca);
  border-radius: 7px; color: var(--color-text, #333);
  font-size: 13px; outline: none; width: 100%;
}
.popup-input:focus { border-color: #8b5cf6; }
.popup-textarea {
  padding: 8px 11px; background: var(--color-background, #f5f4f2);
  border: 1px solid var(--color-border, #d7d1ca);
  border-radius: 7px; color: var(--color-text, #333);
  font-size: 13px; outline: none; width: 100%;
  resize: none; height: 72px; line-height: 1.5;
}
.popup-textarea:focus { border-color: #8b5cf6; }
.popup-actions { display: flex; gap: 8px; }
.popup-save {
  flex: 1; padding: 9px; background: #6d28d9; color: #fff;
  border: none; border-radius: 8px; font-size: 13px; font-weight: 700; cursor: pointer;
}
.popup-save:hover { background: #7c3aed; }
.popup-cancel {
  padding: 9px 16px; background: transparent; color: var(--color-text-dim, #888);
  border: 1px solid var(--color-border, #d7d1ca); border-radius: 8px;
  font-size: 13px; font-weight: 600; cursor: pointer;
}
.popup-cancel:hover { color: var(--color-text, #333); }

/* ── Hjælp-panel empty state ─────────────────── */
.help-empty {
  padding: 24px 22px; color: var(--color-text-dim, #888); font-size: 13px;
}
