/* ═════════════════════════════════════════════════════════
   JogaJunto Help Widget — jj-help.css
   Floating help button + slide-out panel
   ═════════════════════════════════════════════════════════ */

/* ── Floating Help Button ── */
.jj-help-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99990;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #20B967, #16A34A);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(32, 185, 103, 0.35), 0 2px 8px rgba(0,0,0,0.15);
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.jj-help-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(32, 185, 103, 0.45), 0 3px 10px rgba(0,0,0,0.2);
}
.jj-help-btn:active {
  transform: scale(0.95);
}
.jj-help-btn svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
.jj-help-btn.is-open {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.6);
}

/* ── Overlay ── */
.jj-help-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 99991;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.jj-help-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* ── Slide-out Panel ── */
.jj-help-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 400px;
  max-width: 100vw;
  background: #fff;
  z-index: 99992;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 32px rgba(0,0,0,0.15);
  transform: translateX(105%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: 'Inter', 'Outfit', sans-serif;
  color: #1a1a1a;
  overflow: hidden;
}
.jj-help-panel.is-open {
  transform: translateX(0);
}

/* ── Panel Header ── */
.jj-help-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
  background: #fff;
}
.jj-help-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #0a2e1f;
  font-family: 'Inter', 'Outfit', sans-serif;
}
.jj-help-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  transition: all 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.jj-help-close:hover {
  background: #f3f4f6;
  color: #111827;
}
.jj-help-close svg {
  width: 16px;
  height: 16px;
}

/* ── Search ── */
.jj-help-search-wrap {
  padding: 12px 20px 0;
  flex-shrink: 0;
  background: #fff;
}
.jj-help-search {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  font-size: 14px;
  font-family: 'Inter', 'Outfit', sans-serif;
  background: #f9fafb url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cpath d='m21 21-4.3-4.3'%3E%3C/path%3E%3C/svg%3E") 12px center no-repeat;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  color: #1a1a1a;
}
.jj-help-search::placeholder {
  color: #9ca3af;
}
.jj-help-search:focus {
  border-color: #20B967;
  box-shadow: 0 0 0 3px rgba(32, 185, 103, 0.1);
  background-color: #fff;
}

/* ── Scrollable Content Area ── */
.jj-help-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 20px 20px;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}
.jj-help-content::-webkit-scrollbar {
  width: 4px;
}
.jj-help-content::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 4px;
}

/* ── Category List ── */
.jj-help-category {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  margin-bottom: 8px;
  background: #f9fafb;
  border: 1px solid #f3f4f6;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.jj-help-category:hover {
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.jj-help-category:active {
  transform: scale(0.985);
}
.jj-help-category-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  margin-right: 14px;
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
}
.jj-help-category-info {
  flex: 1;
  min-width: 0;
}
.jj-help-category-name {
  font-size: 15px;
  font-weight: 600;
  color: #0a2e1f;
}
.jj-help-category-count {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 2px;
}
.jj-help-category-arrow {
  width: 20px;
  height: 20px;
  color: #d1d5db;
  flex-shrink: 0;
}

/* ── Article List Header ── */
.jj-help-back-row {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
  padding: 0 0 12px;
  border-bottom: 1px solid #f3f4f6;
}
.jj-help-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #fff;
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: 'Inter', 'Outfit', sans-serif;
  -webkit-tap-highlight-color: transparent;
}
.jj-help-back-btn:hover {
  background: #f9fafb;
  color: #374151;
}
.jj-help-back-btn svg {
  width: 14px;
  height: 14px;
}
.jj-help-cat-title {
  margin-left: 10px;
  font-size: 16px;
  font-weight: 700;
  color: #0a2e1f;
  font-family: 'Inter', 'Outfit', sans-serif;
}

/* ── Article Items ── */
.jj-help-article {
  display: flex;
  align-items: center;
  padding: 13px 16px;
  margin-bottom: 6px;
  background: #fff;
  border: 1px solid #f3f4f6;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.jj-help-article:hover {
  background: #f9fafb;
  border-color: #e5e7eb;
}
.jj-help-article-title {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  line-height: 1.4;
}
.jj-help-article-arrow {
  width: 16px;
  height: 16px;
  color: #d1d5db;
  flex-shrink: 0;
  margin-left: 8px;
}

/* ── Article Detail ── */
.jj-help-detail-title {
  font-size: 17px;
  font-weight: 700;
  color: #0a2e1f;
  margin: 0 0 16px;
  line-height: 1.35;
  font-family: 'Inter', 'Outfit', sans-serif;
}
.jj-help-detail-body {
  font-size: 14px;
  line-height: 1.7;
  color: #4b5563;
}
.jj-help-detail-body ul {
  padding-left: 18px;
  margin: 10px 0;
}
.jj-help-detail-body li {
  margin-bottom: 6px;
}
.jj-help-detail-body strong {
  font-weight: 600;
  color: #1a1a1a;
}
.jj-help-detail-body p {
  margin: 10px 0;
}

/* ── Browser Tabs (Solução de problemas) ── */
.jj-help-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.jj-help-tab {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: 'Inter', 'Outfit', sans-serif;
  -webkit-tap-highlight-color: transparent;
}
.jj-help-tab:hover {
  background: #f0fdf4;
  color: #20B967;
  border-color: #bbf7d0;
}
.jj-help-tab.active {
  background: #20B967;
  color: #fff;
  border-color: #20B967;
}

.jj-help-step-block {
  margin: 12px 0 8px;
  padding: 12px 14px;
  background: #f9fafb;
  border-radius: 8px;
  border-left: 3px solid #20B967;
}
.jj-help-step-block strong {
  display: block;
  margin-bottom: 3px;
  font-size: 13px;
}

/* ── Still Need Help ── */
.jj-help-contact {
  margin-top: 20px;
  padding: 20px;
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  border-radius: 14px;
  text-align: center;
  border: 1px solid #bbf7d0;
}
.jj-help-contact h4 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  color: #0a2e1f;
  font-family: 'Inter', 'Outfit', sans-serif;
}
.jj-help-contact p {
  margin: 0 0 14px;
  font-size: 13px;
  color: #4b5563;
}
.jj-help-chat-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 10px;
  border: none;
  background: #20B967;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Inter', 'Outfit', sans-serif;
  -webkit-tap-highlight-color: transparent;
}
.jj-help-chat-btn:hover {
  background: #16A34A;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(32,185,103,0.35);
}
.jj-help-chat-btn:active {
  transform: scale(0.97);
}

/* ── No results ── */
.jj-help-empty {
  text-align: center;
  padding: 40px 20px;
}
.jj-help-empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.8;
}
.jj-help-empty h4 {
  font-size: 16px;
  font-weight: 600;
  color: #0a2e1f;
  margin: 0 0 6px;
}
.jj-help-empty p {
  font-size: 13px;
  color: #9ca3af;
  margin: 0 0 20px;
}

/* ── Mobile ── */
@media (max-width: 768px) {
  .jj-help-panel {
    width: 100vw;
    border-radius: 16px 16px 0 0;
    top: auto;
    bottom: 0;
    height: 88vh;
    transform: translateY(105%);
  }
  .jj-help-panel.is-open {
    transform: translateY(0);
  }
  .jj-help-btn {
    bottom: 16px;
    right: 16px;
    width: 52px;
    height: 52px;
  }
  .jj-help-btn svg {
    width: 24px;
    height: 24px;
  }
  .jj-help-header {
    padding: 14px 16px;
    border-radius: 16px 16px 0 0;
  }
  .jj-help-content {
    padding: 10px 14px 20px;
  }
}

/* ── Animations ── */
@keyframes jj-help-pulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(32,185,103,0.35); }
  50% { box-shadow: 0 4px 28px rgba(32,185,103,0.55), 0 0 0 8px rgba(32,185,103,0.08); }
}
.jj-help-btn:not(.is-open) {
  animation: jj-help-pulse 3s ease-in-out infinite;
}

/* Password visibility toggle */
.jj-password-wrap { position: relative; display: flex; align-items: center; }
.jj-password-wrap input { flex: 1; padding-right: 40px; }
.jj-password-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; padding: 4px; color: #9ca3af; display: flex; align-items: center; justify-content: center; border-radius: 6px; transition: color 0.15s ease, background 0.15s ease; -webkit-tap-highlight-color: transparent; z-index: 2; }
.jj-password-toggle:hover { color: #20B967; background: rgba(32,185,103,0.08); }
.jj-password-toggle:active { transform: translateY(-50%) scale(0.9); }