/* =====================================================================
   Onboarding tour — overlay, bubble, "Wskazówki" button
   ===================================================================== */

.pt-ob-launcher {
  position: fixed;
  right: 18px;
  bottom: calc(72px + env(safe-area-inset-bottom, 0px)); /* nad mobilnym tabbarem */
  z-index: 9000;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  background: var(--surface, #fff);
  color: var(--dark, #0b1640);
  border-radius: 999px;
  font-family: var(--body, system-ui, sans-serif);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(9, 18, 50, 0.18), 0 2px 8px rgba(9, 18, 50, 0.06);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.pt-ob-launcher:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(9, 18, 50, 0.22), 0 2px 10px rgba(9, 18, 50, 0.08);
}
.pt-ob-launcher .pt-ob-launcher-ico {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary, #b0f580), var(--secondary, #004dff));
  color: #0b1640;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 13px;
  flex-shrink: 0;
}
/* „Wskazówki" są dostępne w sidebarze (desktop) lub w menu „Więcej" (mobile),
   więc floating launcher jest zbędny i zasłania interfejs. */
.pt-ob-launcher { display: none !important; }

/* Overlay wycina dziurę dla podświetlonego elementu */
.pt-ob-overlay {
  position: fixed;
  inset: 0;
  z-index: 9500;
  pointer-events: none;
  visibility: hidden;
}
.pt-ob-overlay.is-visible {
  pointer-events: auto;
  visibility: visible;
}
.pt-ob-overlay-mask {
  position: fixed;
  inset: 0;
  background: rgba(9, 18, 50, 0.55);
  transition: opacity .2s ease;
  opacity: 0;
}
.pt-ob-overlay.is-visible .pt-ob-overlay-mask { opacity: 1; }
.pt-ob-overlay:not(.is-visible) .pt-ob-spotlight,
.pt-ob-overlay:not(.is-visible) .pt-ob-bubble {
  display: none;
}

.pt-ob-spotlight {
  position: fixed;
  border: 3px solid var(--primary, #b0f580);
  border-radius: 14px;
  box-shadow: 0 0 0 9999px rgba(9, 18, 50, 0.55), 0 0 0 6px rgba(176, 245, 128, 0.25);
  background: transparent;
  pointer-events: none;
  transition: top .3s cubic-bezier(.4,0,.2,1), left .3s cubic-bezier(.4,0,.2,1),
              width .3s cubic-bezier(.4,0,.2,1), height .3s cubic-bezier(.4,0,.2,1);
}
.pt-ob-spotlight.is-fullscreen {
  /* When no element to highlight — center bubble, full mask */
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border: none;
  box-shadow: 0 0 0 9999px rgba(9, 18, 50, 0.55);
}

/* Bubble */
.pt-ob-bubble {
  position: fixed;
  z-index: 9600;
  max-width: 380px;
  min-width: 280px;
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  background: var(--surface, #fff);
  color: var(--dark, #0b1640);
  border-radius: 16px;
  padding: 18px 18px 14px;
  box-shadow: 0 16px 40px rgba(9, 18, 50, 0.28), 0 4px 14px rgba(9, 18, 50, 0.10);
  border: 1.5px solid var(--border, rgba(9, 18, 50, 0.10));
  font-family: var(--body, system-ui, sans-serif);
  transition: top .3s cubic-bezier(.4,0,.2,1), left .3s cubic-bezier(.4,0,.2,1), opacity .2s ease;
  opacity: 0;
}
.pt-ob-bubble-body {
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}
@media (max-width: 600px) {
  .pt-ob-bubble {
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
  }
}
.pt-ob-overlay.is-visible .pt-ob-bubble { opacity: 1; }

.pt-ob-bubble-eyebrow {
  display: inline-block;
  font-family: var(--mono, monospace);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted, #6b7280);
  margin-bottom: 6px;
}
.pt-ob-bubble-title {
  font-family: var(--display, var(--body));
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin-bottom: 8px;
  color: var(--dark, #0b1640);
}
.pt-ob-bubble-body {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text, #1f2937);
  margin-bottom: 14px;
}
.pt-ob-bubble-body p { margin: 0 0 8px; }
.pt-ob-bubble-body p:last-child { margin-bottom: 0; }
.pt-ob-bubble-body code {
  background: rgba(9,18,50,0.06);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: var(--mono, monospace);
  font-size: 12px;
}

.pt-ob-bubble-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.pt-ob-bubble-progress {
  font-family: var(--mono, monospace);
  font-size: 11px;
  color: var(--muted, #6b7280);
}
.pt-ob-bubble-actions {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}
.pt-ob-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  font-family: var(--body, system-ui, sans-serif);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.pt-ob-btn-primary {
  background: var(--primary, #b0f580);
  color: var(--dark, #0b1640);
}
.pt-ob-btn-primary:hover { background: #9ee76b; }
.pt-ob-btn-ghost {
  background: transparent;
  color: var(--muted, #6b7280);
}
.pt-ob-btn-ghost:hover {
  color: var(--dark, #0b1640);
  background: rgba(9,18,50,0.05);
}
.pt-ob-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}

/* Bubble arrow (small triangle pointing at the spotlight) */
.pt-ob-bubble-arrow {
  position: absolute;
  width: 14px;
  height: 14px;
  background: var(--surface, #fff);
  border: 1.5px solid var(--border, rgba(9, 18, 50, 0.10));
  transform: rotate(45deg);
}
.pt-ob-bubble[data-side="bottom"] .pt-ob-bubble-arrow {
  top: -8px;
  left: 28px;
  border-right: none;
  border-bottom: none;
}
.pt-ob-bubble[data-side="top"] .pt-ob-bubble-arrow {
  bottom: -8px;
  left: 28px;
  border-left: none;
  border-top: none;
}
.pt-ob-bubble[data-side="right"] .pt-ob-bubble-arrow {
  left: -8px;
  top: 28px;
  border-right: none;
  border-top: none;
}
.pt-ob-bubble[data-side="left"] .pt-ob-bubble-arrow {
  right: -8px;
  top: 28px;
  border-left: none;
  border-bottom: none;
}
.pt-ob-bubble[data-side="center"] .pt-ob-bubble-arrow { display: none; }

@media (max-width: 640px) {
  .pt-ob-bubble {
    max-width: calc(100vw - 24px);
    min-width: 0;
  }
}
