/* =============================================================================
   Driver.js Onboarding Styles for Herodotus
   ============================================================================= */

/* Import driver.js base styles */
@import '/driver.css';

/* =============================================================================
   Fix base driver.css zoom artifacts (causes double/blurry text on HiDPI)
   ============================================================================= */

.driver-popover-title,
.driver-popover-description,
.driver-popover-footer,
.driver-popover-progress-text,
.driver-popover-footer button {
  zoom: normal;
}

/* =============================================================================
   Dark Theme (default for Herodotus)

   NOTE: popoverClass adds the class TO .driver-popover itself,
   so we use compound selectors (.driver-popover.theme) not descendant.
   Child elements use .driver-popover.theme .child (descendant is correct).
   ============================================================================= */

.driver-popover.herodotus-dark {
  background: #1e293b;
  color: #e2e8f0;
  border: 1px solid #334155;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  max-width: 360px;
}

/* Arrow colors — set only the visible side to match popover background */
.driver-popover.herodotus-dark .driver-popover-arrow-side-left {
  border-left-color: #1e293b;
}
.driver-popover.herodotus-dark .driver-popover-arrow-side-right {
  border-right-color: #1e293b;
}
.driver-popover.herodotus-dark .driver-popover-arrow-side-top {
  border-top-color: #1e293b;
}
.driver-popover.herodotus-dark .driver-popover-arrow-side-bottom {
  border-bottom-color: #1e293b;
}

.driver-popover.herodotus-dark .driver-popover-title {
  font-size: 16px;
  font-weight: 600;
  color: #60a5fa;
  margin-bottom: 8px;
}

.driver-popover.herodotus-dark .driver-popover-description {
  color: #94a3b8;
  font-size: 14px;
  line-height: 1.6;
}

.driver-popover.herodotus-dark .driver-popover-description kbd {
  background: #0f172a;
  border: 1px solid #475569;
  border-radius: 4px;
  padding: 2px 6px;
  font-family: ui-monospace, monospace;
  font-size: 12px;
  color: #e2e8f0;
}

.driver-popover.herodotus-dark .driver-popover-progress-text {
  color: #64748b;
  font-size: 12px;
}

.driver-popover.herodotus-dark .driver-popover-navigation-btns {
  gap: 8px;
}

.driver-popover.herodotus-dark .driver-popover-navigation-btns button {
  background: #3b82f6;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.15s ease;
}

.driver-popover.herodotus-dark .driver-popover-navigation-btns button:hover {
  background: #2563eb;
}

.driver-popover.herodotus-dark .driver-popover-navigation-btns button:disabled {
  background: #475569;
  cursor: not-allowed;
}

.driver-popover.herodotus-dark .driver-popover-close-btn {
  color: #64748b;
  font-size: 20px;
}

.driver-popover.herodotus-dark .driver-popover-close-btn:hover {
  color: #94a3b8;
}

/* Highlight stage (cutout) styling — applied to page elements, not popover */
.driver-active .driver-highlighted-element {
  outline: 2px solid #3b82f6 !important;
  outline-offset: 2px;
}

/* =============================================================================
   Light Theme
   ============================================================================= */

.driver-popover.herodotus-light {
  background: #ffffff;
  color: #1e293b;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  max-width: 360px;
}

.driver-popover.herodotus-light .driver-popover-arrow-side-left {
  border-left-color: #ffffff;
}
.driver-popover.herodotus-light .driver-popover-arrow-side-right {
  border-right-color: #ffffff;
}
.driver-popover.herodotus-light .driver-popover-arrow-side-top {
  border-top-color: #ffffff;
}
.driver-popover.herodotus-light .driver-popover-arrow-side-bottom {
  border-bottom-color: #ffffff;
}

.driver-popover.herodotus-light .driver-popover-title {
  font-size: 16px;
  font-weight: 600;
  color: #2563eb;
  margin-bottom: 8px;
}

.driver-popover.herodotus-light .driver-popover-description {
  color: #64748b;
  font-size: 14px;
  line-height: 1.6;
}

.driver-popover.herodotus-light .driver-popover-description kbd {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 2px 6px;
  font-family: ui-monospace, monospace;
  font-size: 12px;
  color: #334155;
}

.driver-popover.herodotus-light .driver-popover-progress-text {
  color: #94a3b8;
  font-size: 12px;
}

.driver-popover.herodotus-light .driver-popover-navigation-btns button {
  background: #2563eb;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.15s ease;
}

.driver-popover.herodotus-light .driver-popover-navigation-btns button:hover {
  background: #1d4ed8;
}

.driver-popover.herodotus-light .driver-popover-navigation-btns button:disabled {
  background: #cbd5e1;
  cursor: not-allowed;
}

.driver-popover.herodotus-light .driver-popover-close-btn {
  color: #94a3b8;
}

.driver-popover.herodotus-light .driver-popover-close-btn:hover {
  color: #64748b;
}

/* =============================================================================
   Shared Styles
   ============================================================================= */

/* Keyboard shortcut styling in descriptions */
.driver-popover-description .kbd-group {
  display: inline-flex;
  gap: 4px;
  margin: 0 4px;
}

/* Tour step indicator dots */
.driver-popover-progress-text {
  text-align: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(128, 128, 128, 0.2);
}

/* =============================================================================
   Demo Picker Overlay
   ============================================================================= */

.demo-picker-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.demo-picker-overlay.dark {
  background: rgba(11, 18, 32, 0.95);
}

.demo-picker-overlay.light {
  background: rgba(248, 250, 252, 0.95);
}

.demo-picker-content {
  max-width: 720px;
  width: 100%;
  text-align: center;
}

.demo-picker-title {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 8px 0;
}

.demo-picker-overlay.dark .demo-picker-title {
  color: #e2e8f0;
}

.demo-picker-overlay.light .demo-picker-title {
  color: #1e293b;
}

.demo-picker-subtitle {
  font-size: 15px;
  margin: 0 0 32px 0;
}

.demo-picker-overlay.dark .demo-picker-subtitle {
  color: #94a3b8;
}

.demo-picker-overlay.light .demo-picker-subtitle {
  color: #64748b;
}

.demo-picker-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 600px) {
  .demo-picker-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Card */
.demo-picker-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 16px;
  border-radius: 12px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  font-family: inherit;
}

.demo-picker-card.dark {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

.demo-picker-card.dark:hover {
  background: #253347;
  border-color: #3b82f6;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.15);
}

.demo-picker-card.light {
  background: #ffffff;
  border-color: #e2e8f0;
  color: #1e293b;
}

.demo-picker-card.light:hover {
  background: #f8fafc;
  border-color: #3b82f6;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.1);
}

.demo-picker-card-icon {
  font-size: 32px;
  line-height: 1;
}

.demo-picker-card-title {
  font-size: 15px;
  font-weight: 600;
}

.demo-picker-card-desc {
  font-size: 12px;
  line-height: 1.4;
}

.demo-picker-card.dark .demo-picker-card-desc {
  color: #94a3b8;
}

.demo-picker-card.light .demo-picker-card-desc {
  color: #64748b;
}

/* Loading spinner */
.demo-picker-loading {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.demo-picker-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(59, 130, 246, 0.2);
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: demo-picker-spin 0.8s linear infinite;
}

@keyframes demo-picker-spin {
  to { transform: rotate(360deg); }
}
