/* ==========================================================================
   User Guide & Feature Manual Modal Styles
   Matches all active palettes and theme engine variables dynamically.
   ========================================================================== */

.user-guide-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  z-index: 100000;
  padding: 16px;
  animation: guideFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.user-guide-modal {
  background: var(--panel, #1c1723);
  color: var(--text, #f5f0e8);
  border: 1px solid var(--line, #44364c);
  border-radius: 16px;
  width: min(840px, 100%);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.55), 0 0 30px var(--glow, rgba(196, 154, 74, 0.2));
  overflow: hidden;
  animation: guideSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.user-guide-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line, #44364c);
  background: var(--panel-strong, #241c2c);
}

.user-guide-title {
  margin: 0;
  font-size: 20px;
  font-weight: 750;
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-guide-close {
  background: transparent;
  border: none;
  color: var(--muted, #bdb2bf);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}

.user-guide-close:hover {
  background: var(--panel, #1c1723);
  color: var(--text, #ffffff);
}

/* Tabs */
.user-guide-tabs {
  display: flex;
  border-bottom: 1px solid var(--line, #44364c);
  background: var(--panel, #1c1723);
  padding: 0 20px;
  gap: 8px;
  overflow-x: auto;
}

.user-guide-tab {
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--muted, #bdb2bf);
  padding: 12px 14px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.user-guide-tab:hover {
  color: var(--text, #f5f0e8);
}

.user-guide-tab.active {
  color: var(--accent, #c49a4a);
  border-bottom-color: var(--accent, #c49a4a);
}

/* Body Content */
.user-guide-body {
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  flex: 1;
}

.user-guide-tab-pane {
  display: none;
  flex-direction: column;
  gap: 20px;
}

.user-guide-tab-pane.active {
  display: flex;
}

/* Feature Grid */
.guide-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.guide-feature-card {
  background: var(--panel-strong, #241c2c);
  border: 1px solid var(--line, #44364c);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.guide-feature-icon {
  font-size: 24px;
  margin-bottom: 2px;
}

.guide-feature-card h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 750;
  color: var(--text, #f5f0e8);
}

.guide-feature-card p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted, #bdb2bf);
}

/* Manual Section */
.guide-manual-step {
  background: var(--panel-strong, #241c2c);
  border: 1px solid var(--line, #44364c);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.guide-step-number {
  display: grid;
  place-items: center;
  min-width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent, #c49a4a);
  color: var(--accent-text, #ffffff);
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0;
}

.guide-step-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.guide-step-content h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 750;
  color: var(--text, #f5f0e8);
}

.guide-step-content p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted, #bdb2bf);
}

.guide-step-content ul {
  margin: 6px 0 0;
  padding-left: 20px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted, #bdb2bf);
}

.guide-step-content li strong {
  color: var(--text, #f5f0e8);
}

.guide-highlight-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--glow, rgba(196, 154, 74, 0.2));
  color: var(--accent, #c49a4a);
  font-size: 11.5px;
  font-weight: 700;
  margin-top: 4px;
  width: fit-content;
}

/* Footer Actions */
.user-guide-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--line, #44364c);
  background: var(--panel-strong, #241c2c);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.user-guide-footer span {
  font-size: 12px;
  color: var(--muted, #bdb2bf);
}

.user-guide-footer .button {
  padding: 7px 18px;
  font-size: 13px;
}

@keyframes guideFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes guideSlideUp {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
