/**
 * Onboarding System - Modern Slate Dark Theme
 * Styles for welcome modal, product tour, checklist, and tooltips
 */

/* ============================================
   DRIVER.JS CUSTOM THEME (Dark Mode)
   ============================================ */

/* Overlay */
.driver-popover-wrapper {
  background-color: rgba(10, 10, 10, 0.85);
  z-index: 10000;
}

/* Tooltip container */
.driver-popover {
  background-color: #1a1a1a;
  color: #f5f5f5;
  border: 1px solid #3a3a3a;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  max-width: 400px;
  padding: 0;
}

/* Tooltip arrow */
.driver-popover-arrow {
  border-color: #1a1a1a;
}

.driver-popover-arrow-side-top.driver-popover-arrow {
  border-top-color: #1a1a1a;
}

.driver-popover-arrow-side-bottom.driver-popover-arrow {
  border-bottom-color: #1a1a1a;
}

.driver-popover-arrow-side-left.driver-popover-arrow {
  border-left-color: #1a1a1a;
}

.driver-popover-arrow-side-right.driver-popover-arrow {
  border-right-color: #1a1a1a;
}

/* Tooltip title */
.driver-popover-title {
  font-size: 18px;
  font-weight: 700;
  color: #f5f5f5;
  padding: 20px 20px 10px;
  margin: 0;
}

/* Tooltip description */
.driver-popover-description {
  font-size: 14px;
  line-height: 1.6;
  color: #d4d4d4;
  padding: 0 20px 20px;
  margin: 0;
}

/* Tooltip footer */
.driver-popover-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  border-top: 1px solid #2e2e2e;
  background-color: #141414;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

/* Progress text */
.driver-popover-progress-text {
  font-size: 13px;
  color: #b8b8b8;
  font-weight: 500;
}

/* Navigation buttons */
.driver-popover-navigation-btns {
  display: flex;
  gap: 10px;
}

.driver-popover-prev-btn,
.driver-popover-next-btn,
.driver-popover-close-btn {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  outline: none;
}

.driver-popover-prev-btn {
  background-color: transparent;
  color: #d4d4d4;
  border: 1px solid #3a3a3a;
}

.driver-popover-prev-btn:hover {
  background-color: #2a2a2a;
  border-color: #f59e0b;
}

.driver-popover-next-btn {
  background-color: #f59e0b;
  color: #0a0a0a;
  border: 1px solid #f59e0b;
}

.driver-popover-next-btn:hover {
  background-color: #fb923c;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.driver-popover-close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 28px;
  height: 28px;
  background-color: transparent;
  color: #d4d4d4;
  border: 1px solid #2e2e2e;
  border-radius: 6px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.driver-popover-close-btn:hover {
  background-color: #2a2a2a;
  border-color: #f59e0b;
  color: #f59e0b;
}

/* Highlighted element */
.driver-active-element {
  outline: 3px solid #f59e0b !important;
  outline-offset: 4px;
  border-radius: 8px;
}

/* ============================================
   WELCOME MODAL
   ============================================ */

.onboarding-welcome-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(10, 10, 10, 0.92);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(8px);
  animation: fadeIn 0.3s ease;
}

.onboarding-welcome-modal {
  background: linear-gradient(135deg, #1a1a1a 0%, #141414 100%);
  border: 1px solid #3a3a3a;
  border-radius: 20px;
  max-width: 600px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
  position: relative;
  animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.onboarding-welcome-header {
  text-align: center;
  padding: 40px 40px 20px;
  border-bottom: 1px solid #2e2e2e;
}

.onboarding-welcome-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  opacity: 0.95;
}

.onboarding-welcome-title {
  font-size: 28px;
  font-weight: 700;
  color: #f5f5f5;
  margin: 0 0 10px;
}

.onboarding-welcome-subtitle {
  font-size: 16px;
  color: #d4d4d4;
  margin: 0;
  line-height: 1.5;
}

.onboarding-welcome-tier-badge {
  display: inline-block;
  padding: 6px 16px;
  background: linear-gradient(135deg, #f59e0b 0%, #fb923c 100%);
  color: #0a0a0a;
  font-size: 13px;
  font-weight: 700;
  border-radius: 20px;
  margin-top: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.onboarding-welcome-body {
  padding: 30px 40px;
}

.onboarding-welcome-message {
  font-size: 15px;
  line-height: 1.7;
  color: #d4d4d4;
  margin-bottom: 30px;
}

.onboarding-welcome-features {
  background-color: #0a0a0a;
  border: 1px solid #2e2e2e;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 30px;
}

.onboarding-welcome-features h3 {
  font-size: 14px;
  font-weight: 600;
  color: #f59e0b;
  margin: 0 0 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.onboarding-welcome-features ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.onboarding-welcome-features li {
  padding: 8px 0;
  font-size: 14px;
  color: #d4d4d4;
  position: relative;
  padding-left: 24px;
}

.onboarding-welcome-features li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #f59e0b;
  font-weight: 700;
}

.onboarding-welcome-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.onboarding-welcome-btn {
  padding: 14px 24px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  outline: none;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.onboarding-welcome-btn-primary {
  background: linear-gradient(135deg, #f59e0b 0%, #fb923c 100%);
  color: #0a0a0a;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.onboarding-welcome-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.onboarding-welcome-btn-secondary {
  background-color: #1a1a1a;
  color: #f5f5f5;
  border: 1px solid #3a3a3a;
}

.onboarding-welcome-btn-secondary:hover {
  background-color: #2a2a2a;
  border-color: #f59e0b;
}

.onboarding-welcome-btn-tertiary {
  background-color: transparent;
  color: #b8b8b8;
  border: none;
  padding: 10px;
  font-size: 14px;
}

.onboarding-welcome-btn-tertiary:hover {
  color: #f5f5f5;
}

/* ============================================
   GETTING STARTED CHECKLIST
   ============================================ */

.onboarding-checklist {
  position: fixed;
  top: 80px;
  right: 20px;
  width: 320px;
  background-color: #1a1a1a;
  border: 1px solid #3a3a3a;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.onboarding-checklist.collapsed {
  width: 48px;
  height: 48px;
  overflow: hidden;
}

.onboarding-checklist-header {
  padding: 16px;
  border-bottom: 1px solid #2e2e2e;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.onboarding-checklist-title {
  font-size: 15px;
  font-weight: 600;
  color: #f5f5f5;
  margin: 0;
}

.onboarding-checklist-progress {
  font-size: 13px;
  color: #f59e0b;
  font-weight: 600;
  margin-left: 8px;
}

.onboarding-checklist-toggle {
  background: transparent;
  border: none;
  color: #d4d4d4;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.onboarding-checklist-toggle:hover {
  color: #f59e0b;
}

.onboarding-checklist-body {
  padding: 16px;
}

.onboarding-checklist-item {
  display: flex;
  align-items: flex-start;
  padding: 12px;
  margin-bottom: 8px;
  background-color: #0a0a0a;
  border: 1px solid #2e2e2e;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.onboarding-checklist-item.completed {
  border-color: #10b981;
  background-color: rgba(16, 185, 129, 0.05);
}

.onboarding-checklist-item:hover {
  border-color: #f59e0b;
}

.onboarding-checklist-checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid #3a3a3a;
  border-radius: 50%;
  margin-right: 12px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.onboarding-checklist-item.completed .onboarding-checklist-checkbox {
  background-color: #10b981;
  border-color: #10b981;
}

.onboarding-checklist-checkbox:after {
  content: "✓";
  color: #0a0a0a;
  font-weight: 700;
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.onboarding-checklist-item.completed .onboarding-checklist-checkbox:after {
  opacity: 1;
}

.onboarding-checklist-text {
  font-size: 14px;
  color: #d4d4d4;
  line-height: 1.4;
  flex: 1;
}

.onboarding-checklist-item.completed .onboarding-checklist-text {
  color: #b8b8b8;
  text-decoration: line-through;
}

.onboarding-checklist-progress-bar {
  height: 6px;
  background-color: #2e2e2e;
  border-radius: 3px;
  overflow: hidden;
  margin: 16px 16px 0;
}

.onboarding-checklist-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b 0%, #fb923c 100%);
  transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-radius: 3px;
}

.onboarding-checklist-completion {
  padding: 16px;
  text-align: center;
  border-top: 1px solid #2e2e2e;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(251, 146, 60, 0.1) 100%);
}

.onboarding-checklist-completion-title {
  font-size: 16px;
  font-weight: 600;
  color: #f59e0b;
  margin: 0 0 8px;
}

.onboarding-checklist-completion-text {
  font-size: 13px;
  color: #d4d4d4;
  line-height: 1.5;
  margin: 0;
}

/* ============================================
   USE CASE TEMPLATES GALLERY
   ============================================ */

.onboarding-templates-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(10, 10, 10, 0.92);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(8px);
  animation: fadeIn 0.3s ease;
}

.onboarding-templates-modal {
  background-color: #1a1a1a;
  border: 1px solid #3a3a3a;
  border-radius: 20px;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
  animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.onboarding-templates-header {
  padding: 30px;
  border-bottom: 1px solid #2e2e2e;
  position: sticky;
  top: 0;
  background-color: #1a1a1a;
  z-index: 10;
}

.onboarding-templates-title {
  font-size: 24px;
  font-weight: 700;
  color: #f5f5f5;
  margin: 0 0 8px;
}

.onboarding-templates-subtitle {
  font-size: 14px;
  color: #d4d4d4;
  margin: 0;
}

.onboarding-templates-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  background-color: transparent;
  color: #d4d4d4;
  border: 1px solid #2e2e2e;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: all 0.2s ease;
}

.onboarding-templates-close:hover {
  background-color: #2a2a2a;
  border-color: #f59e0b;
  color: #f59e0b;
}

.onboarding-templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  padding: 30px;
}

.onboarding-template-card {
  background-color: #0a0a0a;
  border: 1px solid #2e2e2e;
  border-radius: 12px;
  padding: 24px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.onboarding-template-card:hover {
  border-color: #f59e0b;
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.2);
}

.onboarding-template-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #f59e0b 0%, #fb923c 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 16px;
}

.onboarding-template-title {
  font-size: 16px;
  font-weight: 600;
  color: #f5f5f5;
  margin: 0 0 8px;
}

.onboarding-template-description {
  font-size: 13px;
  color: #b8b8b8;
  line-height: 1.5;
  margin: 0;
}

.onboarding-template-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  background-color: #f59e0b;
  color: #0a0a0a;
  font-size: 11px;
  font-weight: 700;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============================================
   CONTEXTUAL TOOLTIPS
   ============================================ */

.onboarding-contextual-tooltip {
  position: absolute;
  background-color: #1a1a1a;
  border: 1px solid #f59e0b;
  border-radius: 10px;
  padding: 12px 16px;
  max-width: 280px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  z-index: 9998;
  animation: bounceIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.onboarding-contextual-tooltip:before {
  content: "";
  position: absolute;
  width: 0;
  height: 0;
  border-style: solid;
}

.onboarding-contextual-tooltip.top:before {
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 8px 8px 0 8px;
  border-color: #f59e0b transparent transparent transparent;
}

.onboarding-contextual-tooltip.bottom:before {
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 0 8px 8px 8px;
  border-color: transparent transparent #f59e0b transparent;
}

.onboarding-contextual-tooltip-text {
  font-size: 13px;
  color: #f5f5f5;
  line-height: 1.5;
  margin: 0;
}

.onboarding-contextual-tooltip-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  background: transparent;
  border: none;
  color: #b8b8b8;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.onboarding-contextual-tooltip-close:hover {
  color: #f59e0b;
}

/* ============================================
   HELP SYSTEM MENU
   ============================================ */

.onboarding-help-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background-color: #1a1a1a;
  border: 1px solid #3a3a3a;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  min-width: 220px;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}

.onboarding-help-menu-item {
  padding: 12px 16px;
  font-size: 14px;
  color: #d4d4d4;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #2e2e2e;
}

.onboarding-help-menu-item:last-child {
  border-bottom: none;
}

.onboarding-help-menu-item:hover {
  background-color: #2a2a2a;
  color: #f59e0b;
}

.onboarding-help-menu-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(-10px);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
  .onboarding-welcome-modal {
    max-width: 100%;
    margin: 20px;
  }

  .onboarding-welcome-header,
  .onboarding-welcome-body {
    padding: 30px 24px;
  }

  .onboarding-checklist {
    right: 10px;
    top: 70px;
    width: 280px;
  }

  .onboarding-templates-grid {
    grid-template-columns: 1fr;
  }

  .driver-popover {
    max-width: 320px;
  }
}

@media (max-width: 480px) {
  .onboarding-checklist {
    width: calc(100vw - 20px);
    right: 10px;
    left: 10px;
  }

  .onboarding-welcome-title {
    font-size: 24px;
  }

  .onboarding-templates-modal {
    border-radius: 12px;
  }
}
