/* Help System Styles */

/* Modal Overlay */
.help-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.help-modal-overlay.help-modal-visible {
  opacity: 1;
}

/* Modal Container */
.help-modal {
  background: var(--glass-bg, #1e293b);
  border: 1px solid var(--glass-border, rgba(255,255,255,0.1));
  border-radius: 16px;
  width: 100%;
  max-width: 600px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  transform: translateY(20px) scale(0.95);
  transition: transform 0.3s ease;
  overflow: hidden;
}

.help-modal-overlay.help-modal-visible .help-modal {
  transform: translateY(0) scale(1);
}

/* Modal Header */
.help-modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--glass-border, rgba(255,255,255,0.1));
  background: rgba(255,255,255,0.02);
}

.help-modal-title {
  flex: 1;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary, #fff);
}

.help-modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(255,255,255,0.1);
  border-radius: 8px;
  color: var(--text-primary, #fff);
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.help-modal-close:hover {
  background: rgba(255,255,255,0.2);
}

/* Language Toggles */
.help-lang-toggle {
  padding: 4px 10px;
  border: 1px solid var(--glass-border, rgba(255,255,255,0.2));
  background: transparent;
  border-radius: 6px;
  color: var(--text-secondary, #9ca3af);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.help-lang-toggle:hover {
  background: rgba(255,255,255,0.1);
}

.help-lang-toggle.active {
  background: var(--accent-cyan, #22d3ee);
  border-color: var(--accent-cyan, #22d3ee);
  color: #000;
}

/* Modal Body */
.help-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

/* Summary Section */
.help-summary {
  margin-bottom: 20px;
}

.help-tagline {
  font-size: 0.875rem;
  color: var(--accent-cyan, #22d3ee);
  margin-bottom: 8px;
}

.help-desc {
  color: var(--text-secondary, #9ca3af);
  line-height: 1.6;
}

/* Screenshots */
.help-screenshots {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
}

.help-screenshot {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--glass-border, rgba(255,255,255,0.1));
}

/* Steps */
.help-steps {
  margin-bottom: 20px;
}

.help-steps-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary, #fff);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.help-step {
  margin-bottom: 12px;
}

.help-step-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.help-step-num {
  width: 24px;
  height: 24px;
  background: var(--accent-cyan, #22d3ee);
  color: #000;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.help-step-title {
  font-weight: 500;
  color: var(--text-primary, #fff);
}

.help-step-content {
  padding-left: 34px;
  color: var(--text-secondary, #9ca3af);
  font-size: 0.875rem;
  line-height: 1.5;
}

.help-step-content p {
  margin-bottom: 8px;
}

.help-step-screenshot {
  width: 100%;
  max-width: 300px;
  border-radius: 8px;
  margin-top: 8px;
}

/* Tips */
.help-tips {
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}

.help-tips-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent-cyan, #22d3ee);
  margin-bottom: 10px;
}

.help-tips ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.help-tips li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 6px;
  color: var(--text-secondary, #9ca3af);
  font-size: 0.875rem;
}

.help-tips li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent-cyan, #22d3ee);
}

/* Related Features */
.help-related {
  border-top: 1px solid var(--glass-border, rgba(255,255,255,0.1));
  padding-top: 16px;
}

.help-related-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary, #fff);
  margin-bottom: 12px;
}

.help-related-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.help-related-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-border, rgba(255,255,255,0.1));
  border-radius: 20px;
  color: var(--text-primary, #fff);
  font-size: 0.8125rem;
  cursor: pointer;
  transition: all 0.2s;
}

.help-related-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--accent-cyan, #22d3ee);
}

.help-related-btn i {
  color: var(--accent-cyan, #22d3ee);
}

/* Modal Footer */
.help-modal-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--glass-border, rgba(255,255,255,0.1));
  display: flex;
  justify-content: center;
}

.help-docs-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-cyan, #22d3ee);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: opacity 0.2s;
}

.help-docs-link:hover {
  opacity: 0.8;
}

/* In-Page Help Trigger Button */
.help-trigger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: none;
  background: rgba(34, 211, 238, 0.2);
  border-radius: 50%;
  color: var(--accent-cyan, #22d3ee);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  margin-left: 8px;
  vertical-align: middle;
}

.help-trigger-btn:hover {
  background: rgba(34, 211, 238, 0.3);
  transform: scale(1.1);
}

/* Light theme adjustments */
.light-theme .help-modal {
  --glass-bg: rgba(255, 255, 255, 0.95);
  --glass-border: rgba(0, 0, 0, 0.1);
  --text-primary: #1e293b;
  --text-secondary: #64748b;
}

/* ============================================================
   DRAWER SYSTEM - Side-panel help for in-app pages
   ============================================================ */

/* Drawer Overlay */
.help-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  justify-content: flex-end;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.help-drawer-overlay.help-drawer-open {
  opacity: 1;
  visibility: visible;
}

/* Drawer Backdrop */
.help-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

/* Drawer Panel */
.help-drawer-panel {
  position: relative;
  width: 400px;
  max-width: 90vw;
  height: 100%;
  background: #0f172a;
  border-left: 1px solid rgba(255,255,255,0.12);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  color: #e2e8f0;
}

.help-drawer-overlay.help-drawer-open .help-drawer-panel {
  transform: translateX(0);
}

/* Drawer Header */
.help-drawer-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.03);
  flex-shrink: 0;
}

.help-drawer-back-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(255,255,255,0.08);
  border-radius: 8px;
  color: #e2e8f0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  transition: background 0.2s;
}

.help-drawer-back-btn:hover {
  background: rgba(255,255,255,0.15);
}

.help-drawer-title {
  flex: 1;
  font-size: 1rem;
  font-weight: 600;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.help-drawer-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.help-drawer-lang-btn {
  padding: 3px 8px;
  border: 1px solid rgba(255,255,255,0.2);
  background: transparent;
  border-radius: 5px;
  color: #94a3b8;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.help-drawer-lang-btn:hover {
  background: rgba(255,255,255,0.1);
}

.help-drawer-lang-btn.active {
  background: #06b6d4;
  border-color: #06b6d4;
  color: #000;
}

.help-drawer-close-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(255,255,255,0.08);
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.help-drawer-close-btn:hover {
  background: rgba(255,255,255,0.2);
}

/* Drawer Body */
.help-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

/* Category Sections */
.help-drawer-category {
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.help-drawer-category-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #22d3ee;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.help-drawer-category-title i {
  font-size: 0.75rem;
  opacity: 0.8;
}

/* Feature Items */
.help-drawer-feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 16px;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
  color: #e2e8f0;
}

.help-drawer-feature-item:hover {
  background: rgba(255,255,255,0.06);
}

.help-drawer-feature-item i {
  font-size: 0.875rem;
  color: #64748b;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.help-drawer-feature-text {
  flex: 1;
  min-width: 0;
}

.help-drawer-feature-name {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #f1f5f9;
  margin-bottom: 2px;
}

.help-drawer-feature-tagline {
  display: block;
  font-size: 0.75rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Detail View */
.help-drawer-detail-view {
  padding: 16px;
}

/* Ensure detail text is readable inside drawer */
.help-drawer-detail-view .help-desc {
  color: #94a3b8;
}

.help-drawer-detail-view .help-tagline {
  color: #22d3ee;
}

.help-drawer-detail-view .help-steps-title {
  color: #f1f5f9;
}

.help-drawer-detail-view .help-step-title {
  color: #f1f5f9;
}

.help-drawer-detail-view .help-step-content {
  color: #94a3b8;
}

.help-drawer-detail-view .help-related-title {
  color: #f1f5f9;
}

.help-drawer-detail-view .help-related-btn {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
  color: #e2e8f0;
}

.help-drawer-detail-view .help-related-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: #22d3ee;
}

.help-drawer-detail-view .help-related-btn i {
  color: #22d3ee;
}

.help-drawer-detail-view .help-screenshot {
  border-color: rgba(255,255,255,0.12);
  border-radius: 10px;
  max-width: 100%;
}

/* Drawer Footer */
.help-drawer-footer {
  padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: center;
  flex-shrink: 0;
}

.help-drawer-footer .help-docs-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #22d3ee;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: opacity 0.2s;
}

.help-drawer-footer .help-docs-link:hover {
  opacity: 0.8;
}

/* Drawer Scrollbar */
.help-drawer-body::-webkit-scrollbar {
  width: 4px;
}

.help-drawer-body::-webkit-scrollbar-track {
  background: transparent;
}

.help-drawer-body::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 2px;
}

.help-drawer-body::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.25);
}

/* ============================================================
   DRAWER: DARK/LIGHT THEME SUPPORT
   ============================================================ */

/* Light theme — drawer stays dark for readability */
.light-theme .help-drawer-panel {
  background: #1e293b;
  color: #e2e8f0;
}

.light-theme .help-drawer-backdrop {
  background: rgba(0, 0, 0, 0.4);
}

/* ============================================================
   DRAWER: RESPONSIVE
   ============================================================ */

@media (max-width: 767px) {
  .help-drawer-panel {
    width: 100%;
    max-width: 100vw;
  }
}

/* ============================================================
   HELP FAB BUTTON (floating action button for help toggle)
   ============================================================ */

.help-fab-btn {
  position: fixed;
  z-index: 9998;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--glass-bg, rgba(30,41,59,0.85));
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border, rgba(255,255,255,0.15));
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--accent-cyan, #22d3ee);
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.help-fab-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.help-fab-btn:active {
  transform: scale(0.95);
}

/* Inline help icon (for header bars) */
.help-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--glass-bg, rgba(30,41,59,0.7));
  border: 1px solid var(--glass-border, rgba(255,255,255,0.1));
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--accent-cyan, #22d3ee);
  transition: all 0.15s;
}

.help-icon-btn:hover {
  background: rgba(34,211,238,0.15);
  transform: scale(1.08);
}

.help-icon-btn:active {
  transform: scale(0.95);
}
