/* JustZix — onboarding / samouczek na FRONCIE (coach-marks na stronie).
   Wszystkie klasy prefiks jz-obf-. Wariant: Glow (świecący pierścień, bez
   przyciemniania strony). Ładowany przez manifest.json (content_scripts.css).

   Uwaga: działa na DOWOLNEJ stronie — stąd defensywne resety, by style
   strony nie wyciekały do elementów samouczka. */

/* --- Defensywne resety --------------------------------------------------- */
.jz-obf-root, .jz-obf-root *,
.jz-obf-launcher, .jz-obf-launcher * {
  box-sizing: border-box;
  margin: 0; padding: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  letter-spacing: normal; text-transform: none; text-align: left;
  text-shadow: none; float: none; min-width: 0;
}
.jz-obf-root button, .jz-obf-launcher button,
.jz-obf-launcher input {
  -webkit-appearance: none; appearance: none;
  font: inherit; color: inherit; line-height: normal;
}

/* --- Warstwa nadrzędna --------------------------------------------------- */
.jz-obf-root {
  position: fixed; inset: 0; z-index: 2147483646;
  pointer-events: none;
}

/* Spot — w wariancie Glow przezroczysty (strona pozostaje widoczna). */
.jz-obf-spot {
  position: fixed; border-radius: 7px; pointer-events: none;
  transition: top .28s cubic-bezier(.4,0,.2,1), left .28s cubic-bezier(.4,0,.2,1),
              width .28s cubic-bezier(.4,0,.2,1), height .28s cubic-bezier(.4,0,.2,1);
}

/* Świecący pierścień wokół celu. */
.jz-obf-ring {
  position: fixed; border-radius: 8px; pointer-events: none;
  box-shadow: 0 0 0 3px #10B981, 0 0 0 7px rgba(16,185,129,.30), 0 0 22px 5px rgba(16,185,129,.6);
  animation: jz-obf-pulse 1.7s ease-in-out infinite;
  transition: top .28s cubic-bezier(.4,0,.2,1), left .28s cubic-bezier(.4,0,.2,1),
              width .28s cubic-bezier(.4,0,.2,1), height .28s cubic-bezier(.4,0,.2,1);
}
@keyframes jz-obf-pulse {
  0%, 100% { box-shadow: 0 0 0 3px #10B981, 0 0 0 7px rgba(16,185,129,.30), 0 0 16px 3px rgba(16,185,129,.45); }
  50%      { box-shadow: 0 0 0 3px #10B981, 0 0 0 9px rgba(16,185,129,.18), 0 0 30px 9px rgba(16,185,129,.72); }
}

/* --- Dymek --------------------------------------------------------------- */
.jz-obf-bubble {
  position: fixed; width: 340px; max-width: calc(100vw - 32px);
  background: #FFFFFF; color: #1F2937;
  border-radius: 12px; padding: 16px 18px 14px;
  box-shadow: 0 14px 48px rgba(0,0,0,.32); pointer-events: auto;
  opacity: 0; transform: translateY(4px); transition: opacity .2s ease, transform .2s ease;
}
.jz-obf-bubble.jz-obf-in { opacity: 1; transform: translateY(0); }

.jz-obf-arrow {
  position: absolute; width: 14px; height: 14px; background: #FFFFFF;
  transform: rotate(45deg); box-shadow: 0 14px 48px rgba(0,0,0,.32);
}

.jz-obf-head { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 7px; }
.jz-obf-badge {
  flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%;
  background: #10B981; color: #fff; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.jz-obf-title { flex: 1 1 auto; font-size: 14px; font-weight: 700; line-height: 1.35; padding-top: 2px; }
.jz-obf-x {
  flex: 0 0 auto; width: 22px; height: 22px; border: none; background: transparent;
  color: #9CA3AF; font-size: 18px; line-height: 1; cursor: pointer; border-radius: 5px;
}
.jz-obf-x:hover { background: rgba(0,0,0,.07); color: #1F2937; }

.jz-obf-body { font-size: 12.5px; line-height: 1.6; color: #374151; }
.jz-obf-body code {
  background: #F1F5F9; color: #0F766E; padding: 1px 5px; border-radius: 4px;
  font-family: ui-monospace, Consolas, monospace; font-size: 11.5px;
}
.jz-obf-hint {
  margin-top: 9px; font-size: 11px; color: #10B981; font-weight: 600;
  display: flex; align-items: center; gap: 6px;
}
.jz-obf-hint svg { width: 13px; height: 13px; flex: 0 0 auto; }

/* Kopiowalny fragment kodu w dymku. */
.jz-obf-code { position: relative; margin: 11px 0 2px; }
.jz-obf-code pre {
  margin: 0; background: #0F172A; color: #93C5FD;
  font-family: ui-monospace, Consolas, monospace; font-size: 11.5px; line-height: 1.55;
  padding: 10px 12px; padding-right: 66px; border-radius: 8px;
  white-space: pre-wrap; word-break: break-word;
}
.jz-obf-copy {
  position: absolute; top: 7px; right: 7px; font-size: 10.5px; font-weight: 600;
  cursor: pointer; padding: 4px 9px; border-radius: 6px;
  border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.09); color: #E5E7EB;
}
.jz-obf-copy:hover { background: rgba(255,255,255,.17); }
.jz-obf-copy.jz-obf-copied { background: #10B981; border-color: #10B981; color: #fff; }

.jz-obf-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 14px; gap: 10px;
}
.jz-obf-progress { display: flex; align-items: center; gap: 8px; }
.jz-obf-progress-txt { font-size: 11px; color: #9CA3AF; white-space: nowrap; }
.jz-obf-bar { width: 64px; height: 4px; border-radius: 2px; background: #E5E7EB; overflow: hidden; }
.jz-obf-bar-fill { height: 100%; background: #10B981; border-radius: 2px; transition: width .25s ease; }

.jz-obf-btns { display: flex; gap: 7px; }
.jz-obf-btns button {
  font-size: 12px; font-weight: 600; cursor: pointer;
  padding: 7px 13px; border-radius: 7px; border: 1px solid transparent;
}
.jz-obf-back { background: transparent; border-color: #D1D5DB; color: #6B7280; }
.jz-obf-back:hover { background: rgba(0,0,0,.04); }
.jz-obf-next { background: #10B981; color: #fff; }
.jz-obf-next:hover { background: #0E9F6E; }

/* --- Launcher (centrum samouczków frontu) -------------------------------- */
.jz-obf-launcher {
  position: fixed; inset: 0; z-index: 2147483647;
  background: rgba(15,23,42,.55); display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.jz-obf-card {
  background: #fff; color: #1F2937; border-radius: 14px; width: 560px; max-width: 100%;
  max-height: 88vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.4); padding: 26px 28px;
}
.jz-obf-card h2 { font-size: 19px; margin-bottom: 4px; }
.jz-obf-lead { font-size: 13px; color: #6B7280; line-height: 1.55; margin-bottom: 18px; }
.jz-obf-sect-t {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px;
  color: #9CA3AF; margin-bottom: 9px;
}
.jz-obf-empty {
  font-size: 13px; color: #6B7280; line-height: 1.55; text-align: center;
  padding: 22px 12px; background: #F8FAFC; border: 1px dashed #E5E7EB; border-radius: 10px;
}

/* lista scenariuszy */
.jz-obf-scen {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border: 1px solid #E5E7EB; border-radius: 10px; margin-bottom: 9px;
}
.jz-obf-scen-ico {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 9px; background: #ECFDF5;
  color: #10B981; display: flex; align-items: center; justify-content: center;
}
.jz-obf-scen-ico svg { width: 20px; height: 20px; }
.jz-obf-scen-txt { flex: 1 1 auto; min-width: 0; }
.jz-obf-scen-name { font-size: 13px; font-weight: 700; }
.jz-obf-scen-desc { font-size: 11.5px; color: #6B7280; margin-top: 1px; line-height: 1.45; }
.jz-obf-scen-meta { font-size: 10.5px; color: #9CA3AF; margin-top: 3px; }
.jz-obf-scen button {
  flex: 0 0 auto; font-size: 12px; font-weight: 600; cursor: pointer;
  padding: 8px 16px; border-radius: 8px; border: none; background: #10B981; color: #fff;
}
.jz-obf-scen button:hover { background: #0E9F6E; }

.jz-obf-launcher-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 18px; padding-top: 14px; border-top: 1px solid #EEF0F3;
}
.jz-obf-skip {
  font-size: 12px; cursor: pointer; background: transparent;
  border: 1px solid #D1D5DB; color: #6B7280; padding: 7px 14px; border-radius: 8px;
}
.jz-obf-skip:hover { background: rgba(0,0,0,.04); }
.jz-obf-launcher-foot label {
  font-size: 11.5px; color: #9CA3AF; display: flex; align-items: center; gap: 6px; cursor: pointer;
}
.jz-obf-launcher-foot input { width: 13px; height: 13px; cursor: pointer; }
