/* public/help-system.css - Reusable help tooltip/panel system */

.help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px; /* Touch-friendly minimum */
  min-height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  border: 2px solid #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  font-size: 24px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  z-index: 10;
}

.help-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

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

/* Pulse animation to attract attention */
.help-btn.pulse {
  animation: help-pulse 2s infinite;
}

@keyframes help-pulse {
  0%, 100% { box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3); }
  50% { box-shadow: 0 4px 20px rgba(37, 99, 235, 0.6), 0 0 0 8px rgba(37, 99, 235, 0.1); }
}

/* Help panel */
.help-panel {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  margin-top: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  max-width: 600px;
  transition: all 0.3s ease;
}

.help-panel.collapsed {
  display: none;
}

.help-panel h3 {
  margin: 0 0 16px;
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.help-panel h4 {
  margin: 16px 0 8px;
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
}

.help-panel p {
  margin: 8px 0;
  line-height: 1.6;
  color: #475569;
}

.help-panel ul {
  margin: 8px 0;
  padding-left: 24px;
}

.help-panel li {
  margin: 6px 0;
  line-height: 1.6;
  color: #475569;
}

.help-panel .example {
  background: #f1f5f9;
  padding: 12px;
  border-radius: 8px;
  border-left: 4px solid #2563eb;
  margin: 12px 0;
  font-size: 14px;
  color: #334155;
  font-style: italic;
}

.help-section {
  margin-bottom: 20px;
}

.help-section:last-child {
  margin-bottom: 0;
}

/* Inline help tooltip (for small hints) */
.help-tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #94a3b8;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: help;
  margin-left: 6px;
  transition: all 0.2s;
}

.help-tooltip:hover {
  background: #2563eb;
  transform: scale(1.1);
}

.help-tooltip-content {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 1000;
}

.help-tooltip-content::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #1e293b;
}

.help-tooltip:hover .help-tooltip-content {
  opacity: 1;
}

/* Mobile adjustments */
@media (max-width: 640px) {
  .help-panel {
    max-width: 100%;
    padding: 16px;
  }

  .help-btn {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
  }

  .help-tooltip-content {
    white-space: normal;
    max-width: 200px;
  }
}
