/**
 * Jobrella Product Tour Styles
 * Premium liquid glass aesthetic matching dashboard theme
 */

/* Page background - dark starfield */
body.tour-active {
  background: #0a0b0d !important;
  background-image: url('/static/imgs/nightsky2.png') !important;
  background-size: cover !important;
  background-attachment: fixed !important;
}

/* Override Shepherd default styles to match Jobrella theme */
.shepherd-element {
  z-index: 99999 !important;
}

.shepherd-modal-overlay-container {
  z-index: 99998 !important;
  opacity: 1 !important;
}

.shepherd-modal-overlay-container.shepherd-modal-is-visible path {
  fill: rgba(0, 0, 0, 0.75) !important;
}

/* Main tooltip container - EXACT Premium glass effect from dashboard */
.shepherd-element .shepherd-content {
  background: rgba(255, 255, 255, 0.04) !important;
  backdrop-filter: blur(20px) saturate(140%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(140%) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 16px !important;
  padding: 0 !important;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.6),
    0 4px 16px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 0 20px rgba(255, 255, 255, 0.03) !important;
  color: #e4e4e7 !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
  max-width: 380px !important;
  overflow: hidden !important;
}

/* Header section */
.shepherd-header {
  padding: 16px 20px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.shepherd-title {
  font-size: 15px;
  font-weight: 600;
  color: #fafafa;
  margin: 0;
  letter-spacing: -0.01em;
}

/* Text content */
.shepherd-text {
  padding: 16px 20px;
  font-size: 14px;
  line-height: 1.5;
  color: #d4d4d8;
}

.shepherd-text p {
  margin: 0;
}

/* Footer with buttons */
.shepherd-footer {
  padding: 12px 20px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Button styles - Premium liquid glass */
.shepherd-button {
  padding: 10px 20px !important;
  border-radius: 10px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  border: none !important;
  outline: none !important;
  letter-spacing: -0.01em !important;
  backdrop-filter: blur(20px) saturate(140%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(140%) !important;
}

.shepherd-button-primary {
  background: linear-gradient(135deg, 
    rgba(99, 102, 241, 0.6) 0%, 
    rgba(139, 92, 246, 0.6) 100%) !important;
  color: #fafafa !important;
  border: 1px solid rgba(139, 92, 246, 0.5) !important;
  box-shadow: 
    0 4px 16px rgba(99, 102, 241, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

.shepherd-button-primary:hover {
  background: linear-gradient(135deg, 
    rgba(99, 102, 241, 0.8) 0%, 
    rgba(139, 92, 246, 0.8) 100%) !important;
  transform: translateY(-2px) !important;
  box-shadow: 
    0 6px 20px rgba(99, 102, 241, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
  border-color: rgba(139, 92, 246, 0.7) !important;
}

.shepherd-button-secondary {
  background: rgba(255, 255, 255, 0.04) !important;
  color: #d4d4d8 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

.shepherd-button-secondary:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  color: #fafafa !important;
}

/* Cancel/Skip button */
.shepherd-cancel-icon {
  background: transparent;
  border: none;
  color: #a1a1aa;
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  margin: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.shepherd-cancel-icon:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fafafa;
}

/* Arrow pointing to element */
.shepherd-arrow {
  display: none; /* We'll use custom CSS arrows instead */
}

.shepherd-element[data-popper-placement^='top'] .shepherd-content::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid rgba(255, 255, 255, 0.12);
}

.shepherd-element[data-popper-placement^='bottom'] .shepherd-content::after {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid rgba(255, 255, 255, 0.12);
}

.shepherd-element[data-popper-placement^='left'] .shepherd-content::after {
  content: '';
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 8px solid rgba(255, 255, 255, 0.12);
}

.shepherd-element[data-popper-placement^='right'] .shepherd-content::after {
  content: '';
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 8px solid rgba(255, 255, 255, 0.12);
}

/* Highlight effect for targeted elements */
.shepherd-target-highlight {
  position: relative;
  z-index: 9997;
}

.shepherd-target-highlight::before {
  content: '';
  position: absolute;
  inset: -4px;
  border: 2px solid rgba(99, 102, 241, 0.5);
  border-radius: 8px;
  pointer-events: none;
  animation: shepherd-pulse 2s infinite;
}

@keyframes shepherd-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(99, 102, 241, 0);
  }
}

/* Progress indicator */
.shepherd-progress {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #a1a1aa;
}

.shepherd-progress-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transition: all 0.2s ease;
}

.shepherd-progress-dot.active {
  background: rgba(99, 102, 241, 0.8);
  width: 8px;
  height: 8px;
}

/* Guide Me button - Premium liquid glass style */
.tour-trigger-button,
#tour-start-button {
  position: fixed !important;
  bottom: 24px !important;
  right: 24px !important;
  padding: 12px 24px !important;
  background: linear-gradient(135deg, 
    rgba(99, 102, 241, 0.3) 0%, 
    rgba(139, 92, 246, 0.3) 100%) !important;
  backdrop-filter: blur(20px) saturate(140%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(140%) !important;
  border: 1px solid rgba(139, 92, 246, 0.4) !important;
  border-radius: 24px !important;
  color: #fafafa !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  box-shadow: 
    0 8px 32px rgba(99, 102, 241, 0.4),
    0 4px 16px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  z-index: 999999 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  letter-spacing: -0.01em !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

.tour-trigger-button:hover,
#tour-start-button:hover {
  background: linear-gradient(135deg, 
    rgba(99, 102, 241, 0.5) 0%, 
    rgba(139, 92, 246, 0.5) 100%) !important;
  transform: translateY(-2px) scale(1.02) !important;
  box-shadow: 
    0 12px 48px rgba(99, 102, 241, 0.5),
    0 6px 24px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
  border-color: rgba(139, 92, 246, 0.6) !important;
}

.tour-trigger-button:active,
#tour-start-button:active {
  transform: translateY(0) scale(0.98) !important;
}

/* Restart Tour link in header */
.tour-restart-link {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: #a1a1aa;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  z-index: 9990;
}

.tour-restart-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #e4e4e7;
  border-color: rgba(255, 255, 255, 0.12);
}

/* Modal overlay styling */
.shepherd-modal-overlay-container.shepherd-modal-is-visible {
  opacity: 0.7;
}

.shepherd-modal-overlay-container.shepherd-modal-is-visible path {
  fill: rgba(0, 0, 0, 0.6);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .shepherd-element .shepherd-content {
    max-width: 280px;
  }
  
  .tour-trigger-button {
    bottom: 16px;
    right: 16px;
    padding: 10px 16px;
    font-size: 12px;
  }
  
  .tour-restart-link {
    top: 12px;
    right: 12px;
    font-size: 11px;
    padding: 6px 12px;
  }
}

