/**
 * Cubik Builder - Tutorial Styles
 * Driver.js v5.2
 * @version 1.5.72 (v=1612)
 */

/* Overlay - click-through */
.driver-overlay {
  pointer-events: none !important;
}

/* Popover container */
.driver-popover {
  pointer-events: auto !important;
  background: #1a1a1a !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5) !important;
  color: #f0f0f0 !important;
  max-width: 340px !important;
  padding: 0 !important;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  overflow: visible !important;
}

/* Arrow */
.driver-popover-arrow {
  border: 8px solid transparent !important;
}
.driver-popover-arrow-side-left { border-right-color: #1a1a1a !important; }
.driver-popover-arrow-side-right { border-left-color: #1a1a1a !important; }
.driver-popover-arrow-side-top { border-bottom-color: #1a1a1a !important; }
.driver-popover-arrow-side-bottom { border-top-color: #1a1a1a !important; }

/* Title */
.driver-popover-title {
  font-size: 16px !important;
  font-weight: 600 !important;
  color: #fff !important;
  margin: 0 !important;
  padding: 18px 44px 0 18px !important;
  line-height: 1.3 !important;
}

/* Close button */
.driver-popover-close-btn {
  position: absolute !important;
  top: 14px !important;
  right: 14px !important;
  width: 26px !important;
  height: 26px !important;
  min-width: 26px !important;
  padding: 0 !important;
  border-radius: 6px !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #666 !important;
  font-size: 14px !important;
  line-height: 1 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.driver-popover-close-btn:hover {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.12) !important;
}

/* Description */
.driver-popover-description {
  font-size: 14px !important;
  line-height: 1.6 !important;
  color: #aaa !important;
  padding: 12px 18px 16px !important;
  margin: 0 !important;
  white-space: pre-line !important;
}

/* Progress */
.driver-popover-progress-text {
  font-size: 11px !important;
  color: #555 !important;
  padding: 0 18px 10px !important;
  margin: 0 !important;
}

/* Footer */
.driver-popover-footer {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 14px 16px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: rgba(0, 0, 0, 0.25) !important;
  border-radius: 0 0 12px 12px !important;
  gap: 10px !important;
}

/* All buttons base */
.driver-popover-footer button,
.driver-popover-navigation-btns button {
  padding: 10px 18px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  font-family: inherit !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  border: none !important;
  line-height: 1.2 !important;
  min-width: 80px !important;
}

/* Previous (Back) button - same style as Next for consistency */
.driver-popover-prev-btn {
  background: #fff !important;
  color: #111 !important;
  border: none !important;
  font-weight: 500 !important;
  text-shadow: none !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
}
.driver-popover-prev-btn:hover {
  background: #e8e8e8 !important;
  color: #111 !important;
}

/* Next button */
.driver-popover-next-btn {
  background: #fff !important;
  color: #111 !important;
}
.driver-popover-next-btn:hover {
  background: #e8e8e8 !important;
}

/* Done button */
.driver-popover-done-btn {
  background: #22c55e !important;
  color: #fff !important;
}
.driver-popover-done-btn:hover {
  background: #16a34a !important;
}

/* Highlighted element */
.driver-active-element {
  outline: 3px solid #DFFA15 !important;
  outline-offset: 4px !important;
  animation: tutorialPulse 2s ease-in-out infinite !important;
}

canvas.driver-active-element {
  outline-offset: 0 !important;
}

/* Ensure panel-actions and hudBar are highlightable */
.panel-actions.driver-active-element {
  position: relative !important;
  z-index: 10000 !important;
  outline: 3px solid #DFFA15 !important;
  outline-offset: 4px !important;
  animation: tutorialPulse 2s ease-in-out infinite !important;
}
/* #hudBar: не трогать position — на мобиле он fixed bottom, иначе подсветка уезжает вверх */
#hudBar.driver-active-element {
  z-index: 10000 !important;
  outline: 3px solid #DFFA15 !important;
  outline-offset: 4px !important;
  animation: tutorialPulse 2s ease-in-out infinite !important;
}

@keyframes tutorialPulse {
  0%, 100% {
    outline-color: #DFFA15;
    box-shadow: 0 0 15px 3px rgba(223, 250, 21, 0.35);
  }
  50% {
    outline-color: #f0f060;
    box-shadow: 0 0 25px 6px rgba(223, 250, 21, 0.55);
  }
}

/* Tutorial active state */
body.tutorial-active canvas {
  pointer-events: auto !important;
}

body.tutorial-active #helpModal,
body.tutorial-active #helpOverlay {
  display: none !important;
}

/* Welcome/Finish modal */
.driver-popover.tutorial-welcome {
  max-width: 380px !important;
  text-align: center !important;
}
.driver-popover.tutorial-welcome .driver-popover-title {
  font-size: 18px !important;
  padding: 22px 22px 0 !important;
}
.driver-popover.tutorial-welcome .driver-popover-description {
  padding: 14px 22px 18px !important;
}
.driver-popover.tutorial-welcome .driver-popover-footer {
  justify-content: center !important;
}

/* Responsive */
@media (max-width: 600px) {
  .driver-popover {
    max-width: 300px !important;
  }
  .driver-popover-title {
    font-size: 15px !important;
    padding: 16px 40px 0 16px !important;
  }
  .driver-popover-description {
    font-size: 13px !important;
    padding: 10px 16px 14px !important;
  }
  .driver-popover-footer button {
    padding: 8px 14px !important;
    font-size: 12px !important;
    min-width: 70px !important;
  }
}
