/* ============================================================================
   Wasil onboarding tour — glassy-cobalt skin over driver.js v1
   Loaded after driver.css; overrides its popover/overlay with the WaslChat look.
   Brand: cobalt #1B4FD8 · mint #00C48C · navy #0B1437
   ========================================================================== */
:root{
  --wt-cobalt: #1B4FD8;
  --wt-cobalt-2: #3D6BF0;
  --wt-mint: #00C48C;
  --wt-navy: #0B1437;
}

/* ── Backdrop ───────────────────────────────────────────────────────────────
   driver.js draws the dim as an <svg class="driver-overlay"> with a cut-out;
   its fill colour comes from the JS config (overlayColor: deep navy). We only
   add a soft cobalt vignette on top for depth. */
.driver-active-element{ position: relative; z-index: 10001; }

/* ── Spotlight ring on the highlighted element ─────────────────────────────── */
.driver-active-element,
.driver-active-element:focus,
.driver-active-element:focus-visible{
  border-radius: 12px !important;
  outline: none !important;
  box-shadow:
    0 0 0 3px rgba(27,79,216,.95),
    0 0 0 7px rgba(27,79,216,.26),
    0 0 26px 8px rgba(27,79,216,.45) !important;
  transition: box-shadow .25s ease;
  animation: wtPulse 2.6s ease-in-out infinite;
}
@keyframes wtPulse{
  0%,100%{ box-shadow:0 0 0 3px rgba(27,79,216,.92), 0 0 0 7px rgba(27,79,216,.20), 0 0 22px 6px rgba(27,79,216,.34) !important; }
  50%    { box-shadow:0 0 0 3px rgba(27,79,216,1),   0 0 0 9px rgba(27,79,216,.30), 0 0 32px 10px rgba(27,79,216,.52) !important; }
}

/* ── Frosted-glass popover ──────────────────────────────────────────────────── */
.driver-popover.wasil-tour-popover{
  background: linear-gradient(160deg, rgba(255,255,255,.93), rgba(236,242,255,.88));
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
  backdrop-filter: blur(16px) saturate(1.25);
  border: 1px solid rgba(27,79,216,.26);
  border-radius: 18px;
  box-shadow: 0 18px 50px -12px rgba(11,20,55,.45), inset 0 0 0 1px rgba(255,255,255,.55);
  color: var(--wt-navy);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  max-width: 344px;
  padding: 18px 18px 14px;
  overflow: visible;            /* let the mascot spill out of the box */
}
.wasil-tour-popover .driver-popover-title{
  font-size: 16px; font-weight: 700; letter-spacing: -.012em;
  margin: 0 0 6px; color: var(--wt-navy);
}
.wasil-tour-popover .driver-popover-description{
  font-size: 13.5px; line-height: 1.55; color: #3A4668; margin: 0;
}
.wasil-tour-popover .driver-popover-arrow{ color: rgba(236,242,255,.92); }

/* Footer + buttons → brand pills */
.wasil-tour-popover .driver-popover-footer{ margin-top: 14px; gap: 8px; }
.wasil-tour-popover .driver-popover-footer button{
  border-radius: 10px; font-weight: 600; font-size: 13px; padding: 7px 15px;
  font-family: inherit; text-shadow: none; transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
}
.wasil-tour-popover .driver-popover-next-btn,
.wasil-tour-popover .driver-popover-done-btn{
  background: linear-gradient(180deg, var(--wt-cobalt-2), var(--wt-cobalt));
  color: #fff; border: none;
  box-shadow: 0 6px 16px -4px rgba(27,79,216,.6);
}
.wasil-tour-popover .driver-popover-next-btn:hover{ transform: translateY(-1px); box-shadow: 0 9px 20px -5px rgba(27,79,216,.7); }
.wasil-tour-popover .driver-popover-prev-btn{
  background: transparent; color: var(--wt-cobalt);
  border: 1px solid rgba(27,79,216,.32); box-shadow: none;
}
.wasil-tour-popover .driver-popover-prev-btn:hover{ background: rgba(27,79,216,.07); }
.wasil-tour-popover .driver-popover-progress-text{ color: #7C88AD; font-size: 12px; font-weight: 500; }
.wasil-tour-popover .driver-popover-close-btn{ color: #97A2C2; font-size: 22px; transition: color .15s ease; }
.wasil-tour-popover .driver-popover-close-btn:hover{ color: var(--wt-cobalt); }

/* ── Wasil mascot — sits ENTIRELY ABOVE the popover box, never over its text or
   the × close button. `bottom: 100%` pins the mascot's base to the popover's top
   edge; the small gap keeps clearance. Offset to the leading side (flips in RTL)
   so it stays well clear of the top-right close button. ───────────────────────── */
.wasil-tour-mascot{
  position: absolute;
  bottom: calc(100% + 2px);                 /* fully above the popover */
  inset-inline-start: 14px;                 /* leading side; flips in RTL */
  height: 86px; width: auto;
  pointer-events: none; user-select: none;
  filter: drop-shadow(0 10px 16px rgba(11,20,55,.4));
  transform-origin: bottom center;
  animation: wtMascotIn .5s cubic-bezier(.22,1.25,.36,1) both;
}
@keyframes wtMascotIn{
  0%  { opacity: 0; transform: translateY(10px) scale(.86); }
  62% { opacity: 1; transform: translateY(-3px) scale(1.04); }
  100%{ opacity: 1; transform: translateY(0)   scale(1); }
}

/* Centered steps (welcome / celebrate): mascot above-centre, a touch larger */
.wasil-tour-popover.wt-centered{ text-align: center; }
.wasil-tour-popover.wt-centered .driver-popover-footer{ justify-content: center; }
.wasil-tour-popover.wt-centered .wasil-tour-mascot{
  height: 104px; bottom: calc(100% + 2px);
  inset-inline-start: auto; left: 50%;
  animation: wtMascotInCenter .55s cubic-bezier(.22,1.25,.36,1) both;
}
@keyframes wtMascotInCenter{
  0%  { opacity: 0; transform: translateX(-50%) translateY(12px) scale(.84); }
  62% { opacity: 1; transform: translateX(-50%) translateY(-4px) scale(1.04); }
  100%{ opacity: 1; transform: translateX(-50%) translateY(0)    scale(1); }
}

/* ── Dark theme (html[data-theme="dark"]) ──────────────────────────────────── */
[data-theme="dark"] .driver-popover.wasil-tour-popover{
  background: linear-gradient(160deg, rgba(22,30,60,.94), rgba(12,18,42,.9));
  border-color: rgba(73,121,255,.4);
  color: #EAF0FF;
  box-shadow: 0 20px 54px -12px rgba(0,0,0,.6), inset 0 0 0 1px rgba(120,150,255,.14);
}
[data-theme="dark"] .wasil-tour-popover .driver-popover-title{ color: #EAF0FF; }
[data-theme="dark"] .wasil-tour-popover .driver-popover-description{ color: #B9C4E6; }
[data-theme="dark"] .wasil-tour-popover .driver-popover-arrow{ color: rgba(16,24,52,.94); }
[data-theme="dark"] .wasil-tour-popover .driver-popover-prev-btn{ color: #8FB0FF; border-color: rgba(120,150,255,.35); }

/* ── Reduced motion ─────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce){
  .driver-active-element{ animation: none !important; }
  .wasil-tour-mascot{ animation: none !important; }
}
