/* Shepherd.js Tour Theme — matches WareSquared design system */

.shepherd-has-cancel-icon .shepherd-cancel-icon {
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  padding: 0;
  transition: color 0.15s;
}

.shepherd-has-cancel-icon .shepherd-cancel-icon:hover {
  color: var(--text-primary);
}

.shepherd-element {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  box-shadow: 0 20px 40px -8px rgba(0, 0, 0, 0.18), 0 4px 12px -2px rgba(0, 0, 0, 0.08);
  max-width: 360px;
  min-width: 280px;
  outline: none;
  z-index: 9999;
}

/* Center floating steps (welcome/intro steps with no attachTo target) */
.shepherd-element.shepherd-centered {
  position: fixed !important;
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
}

.shepherd-element.shepherd-has-title .shepherd-content .shepherd-header {
  background: transparent;
  padding: 1.25rem 1.25rem 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.shepherd-title {
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
  flex: 1;
}

.shepherd-text {
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.875rem;
  line-height: 1.6;
  padding: 0.75rem 1.25rem 1rem;
}

.shepherd-text p {
  margin: 0;
}

.shepherd-footer {
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.875rem 1.25rem;
}

/* Primary button */
.shepherd-button {
  background: var(--color-primary-600);
  border: none;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  transition: background 0.15s, opacity 0.15s;
  white-space: nowrap;
}

.shepherd-button:hover {
  background: var(--color-primary-700);
}

/* Secondary button (Skip, Back) */
.shepherd-button.shepherd-button-secondary {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
}

.shepherd-button.shepherd-button-secondary:hover {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
}

/* Modal overlay */
.shepherd-modal-overlay-container {
  height: 100%;
  left: 0;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  top: 0;
  transition: all 0.3s ease;
  width: 100%;
  z-index: 9997;
}

.shepherd-modal-overlay-container.shepherd-modal-is-visible {
  opacity: 1;
  pointer-events: all;
  transform: translateZ(0);
}

.shepherd-modal-overlay-container path {
  pointer-events: all;
}

/* Arrow */
.shepherd-arrow,
.shepherd-arrow::before {
  position: absolute;
  width: 10px;
  height: 10px;
  z-index: -1;
}

.shepherd-arrow::before {
  content: '';
  transform: rotate(45deg);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
}

.shepherd-element[data-popper-placement^='top'] > .shepherd-arrow {
  bottom: -5px;
}
.shepherd-element[data-popper-placement^='top'] > .shepherd-arrow::before {
  border-top: none;
  border-left: none;
}

.shepherd-element[data-popper-placement^='bottom'] > .shepherd-arrow {
  top: -5px;
}
.shepherd-element[data-popper-placement^='bottom'] > .shepherd-arrow::before {
  border-bottom: none;
  border-right: none;
}

.shepherd-element[data-popper-placement^='left'] > .shepherd-arrow {
  right: -5px;
}
.shepherd-element[data-popper-placement^='left'] > .shepherd-arrow::before {
  border-bottom: none;
  border-left: none;
}

.shepherd-element[data-popper-placement^='right'] > .shepherd-arrow {
  left: -5px;
}
.shepherd-element[data-popper-placement^='right'] > .shepherd-arrow::before {
  border-top: none;
  border-right: none;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  .shepherd-element {
    background: var(--bg-surface);
    border-color: var(--border-light);
    box-shadow: 0 20px 40px -8px rgba(0, 0, 0, 0.5), 0 4px 12px -2px rgba(0, 0, 0, 0.3);
  }

  .shepherd-arrow::before {
    background: var(--bg-surface);
    border-color: var(--border-light);
  }
}

.dark .shepherd-element,
[data-theme="dark"] .shepherd-element {
  background: var(--bg-surface);
  border-color: var(--border-light);
  box-shadow: 0 20px 40px -8px rgba(0, 0, 0, 0.5), 0 4px 12px -2px rgba(0, 0, 0, 0.3);
}

.dark .shepherd-arrow::before,
[data-theme="dark"] .shepherd-arrow::before {
  background: var(--bg-surface);
  border-color: var(--border-light);
}

/* Step counter badge */
.shepherd-step-counter {
  background: var(--bg-surface-elevated);
  border-radius: 99px;
  color: var(--text-tertiary);
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.125rem 0.5rem;
  white-space: nowrap;
}

/* Progress dots */
.shepherd-dots {
  display: flex;
  gap: 5px;
  justify-content: center;
  margin-top: 14px;
}

.shepherd-dot {
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: var(--border-light);
  transition: width 0.2s ease, background 0.2s ease;
}

.shepherd-dot.active {
  width: 16px;
  background: var(--color-primary-600);
}

/* "Don't show again" checkbox row */
.shepherd-dont-show-wrapper {
  border-top: 1px solid var(--border-light);
  margin-top: 0.75rem;
  padding-top: 0.75rem;
}

.shepherd-dont-show-label {
  align-items: center;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  font-size: 0.8125rem;
  gap: 0.5rem;
}

/* Skip tour button (ghost, smaller) */
.shepherd-button.shepherd-button-skip {
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  font-size: 0.8125rem;
  margin-right: auto;
  padding: 6px 4px;
}

.shepherd-button.shepherd-button-skip:hover {
  background: transparent;
  color: var(--text-secondary);
  text-decoration: underline;
}
