/* ============================================================
   onboarding.css — Tooltips, Banner 80% quota, Onboarding
   CryptoMinds Pro IA
   ============================================================ */

/* ── Tooltip button ──────────────────────────────────────── */
.ob-tooltip-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.13);
  color: var(--text-muted, #888);
  font-size: 10px;
  font-style: normal;
  cursor: help;
  margin-left: 6px;
  vertical-align: middle;
  position: relative;
  transition: background 0.15s;
  flex-shrink: 0;
  line-height: 1;
}
.ob-tooltip-btn:hover,
.ob-tooltip-btn:focus {
  background: rgba(255, 255, 255, 0.13);
  outline: none;
}

/* ── Tooltip bubble ──────────────────────────────────────── */
.ob-tooltip-bubble {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: #1a2a1a;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 10px;
  padding: 10px 13px;
  font-size: 12px;
  color: #c9d1c9;
  line-height: 1.55;
  width: 240px;
  white-space: normal;
  z-index: 9999;
  pointer-events: none;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s, visibility 0.15s;
}
.ob-tooltip-bubble::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: rgba(255, 255, 255, 0.13);
}
.ob-tooltip-btn:hover .ob-tooltip-bubble,
.ob-tooltip-btn:focus .ob-tooltip-bubble {
  opacity: 1;
  visibility: visible;
}

/* ── Variante: abre para baixo (quando não há espaço acima) ── */
.ob-tooltip-btn.ob-tooltip--below .ob-tooltip-bubble {
  bottom: auto;
  top: calc(100% + 10px);
}
.ob-tooltip-btn.ob-tooltip--below .ob-tooltip-bubble::after {
  top: auto;
  bottom: 100%;
  border-top-color: transparent;
  border-bottom-color: rgba(255, 255, 255, 0.13);
}

/* ── Variante: alinha à direita (quando está perto da borda direita) ── */
.ob-tooltip-btn.ob-tooltip--right .ob-tooltip-bubble {
  left: auto;
  right: 0;
  transform: none;
}
.ob-tooltip-btn.ob-tooltip--right .ob-tooltip-bubble::after {
  left: auto;
  right: 14px;
  transform: none;
}

/* ── Combinação: baixo + direita ── */
.ob-tooltip-btn.ob-tooltip--below.ob-tooltip--right .ob-tooltip-bubble {
  left: auto;
  right: 0;
  transform: none;
}

/* ── Quota Banner 80% ────────────────────────────────────── */
.ob-quota-banner {
  position: fixed;
  bottom: -80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 8000;
  width: calc(100% - 32px);
  max-width: 600px;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(245, 158, 11, 0.12);
  transition: bottom 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  padding: 0;
  overflow: hidden;
}
.ob-quota-banner.ob-qb-visible {
  bottom: 24px;
}
.ob-qb-content {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}
.ob-qb-icon {
  font-size: 20px;
  flex-shrink: 0;
}
.ob-qb-text {
  flex: 1;
  font-size: 13px;
  color: #d1d5db;
  line-height: 1.4;
}
.ob-qb-text strong {
  color: #fbbf24;
}
.ob-qb-btn {
  flex-shrink: 0;
  padding: 7px 16px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0a0a0a;
  font-size: 12px;
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
  transition: box-shadow 0.15s, transform 0.1s;
  white-space: nowrap;
}
.ob-qb-btn:hover {
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.5);
  transform: scale(1.03);
}
.ob-qb-dismiss {
  flex-shrink: 0;
  background: none;
  border: none;
  color: #6b7280;
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: color 0.15s;
  display: flex;
  align-items: center;
}
.ob-qb-dismiss:hover {
  color: #d1d5db;
}

/* ── Onboarding Modal ────────────────────────────────────── */
.ob-onboarding-modal {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 8500;
  width: 320px;
  animation: ob-slide-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes ob-slide-in {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.ob-modal-inner {
  background: #111a11;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(74, 222, 128, 0.1);
}

.ob-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.ob-modal-badge {
  font-size: 11px;
  font-weight: 700;
  color: #4ade80;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.ob-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: #f0f4f0;
  margin: 0 0 10px 0;
}
.ob-modal-progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ob-modal-progress-bar {
  flex: 1;
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: hidden;
}
.ob-modal-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4ade80, #22c55e);
  border-radius: 99px;
  transition: width 0.4s ease;
}
.ob-modal-progress-label {
  font-size: 11px;
  color: #6b7280;
  white-space: nowrap;
}
.ob-modal-close {
  background: none;
  border: none;
  color: #4b5563;
  font-size: 16px;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 6px;
  transition: color 0.15s;
  flex-shrink: 0;
  margin-top: 2px;
}
.ob-modal-close:hover { color: #d1d5db; }

/* Steps */
.ob-modal-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}
.ob-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  transition: border-color 0.2s, background 0.2s;
}
.ob-step.ob-step-done {
  background: rgba(74, 222, 128, 0.05);
  border-color: rgba(74, 222, 128, 0.2);
}
.ob-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  color: #9ca3af;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.ob-step-num.ob-step-num-done {
  background: rgba(74, 222, 128, 0.15);
  border-color: #4ade80;
  color: #4ade80;
}
.ob-step-body {
  flex: 1;
  min-width: 0;
}
.ob-step-title {
  font-size: 13px;
  font-weight: 600;
  color: #e5e7eb;
  margin-bottom: 2px;
}
.ob-step-desc {
  font-size: 11px;
  color: #6b7280;
  line-height: 1.4;
}
.ob-step-link {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  color: #60a5fa;
  text-decoration: none;
  white-space: nowrap;
  padding: 4px 8px;
  background: rgba(96, 165, 250, 0.08);
  border-radius: 6px;
  transition: background 0.15s;
  align-self: center;
}
.ob-step-link:hover {
  background: rgba(96, 165, 250, 0.18);
}
.ob-step-done-label {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  color: #4ade80;
  white-space: nowrap;
  align-self: center;
}
.ob-modal-skip {
  width: 100%;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: #4b5563;
  border-radius: 8px;
  padding: 8px;
  font-size: 12px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  font-family: inherit;
}
.ob-modal-skip:hover {
  color: #9ca3af;
  border-color: rgba(255, 255, 255, 0.12);
}

/* ── Completion Toast ────────────────────────────────────── */
.ob-completion-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9000;
  background: #111a11;
  border: 1px solid rgba(74, 222, 128, 0.3);
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 14px;
  color: #e5e7eb;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}
.ob-completion-toast.ob-toast-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Mobile adjustments ──────────────────────────────────── */
@media (max-width: 600px) {
  .ob-onboarding-modal {
    bottom: 80px; /* acima da nav mobile */
    right: 12px;
    left: 12px;
    width: auto;
  }
  .ob-quota-banner {
    bottom: -80px;
  }
  .ob-quota-banner.ob-qb-visible {
    bottom: 80px;
  }
}
