/* ========== Onboarding Tour Styles ========== */

/* CSS Variables for Dropbox-style design */
:root {
  --bg-white: #FFFFFF;
  --bg-gray-200: #E4E7EA;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Overlay */
.tour-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(3px);
  z-index: 9999;
  transition: all 0.3s ease;
}

/* Element highlight */
.tour-highlight {
  position: relative;
  z-index: 10001 !important;
  box-shadow: 0 0 0 4px rgba(0, 97, 255, 0.6), 
              0 0 0 8px rgba(0, 97, 255, 0.3),
              0 8px 32px rgba(0, 97, 255, 0.4) !important;
  border-radius: var(--radius-lg) !important;
  transition: all 0.3s ease;
  background: inherit !important;
  color: inherit !important;
}

/* Special highlight for navigation elements */
.tour-highlight.nav-item {
  background: rgba(0, 97, 255, 0.1) !important;
  backdrop-filter: none !important;
}

/* Make sure highlighted nav items are fully visible */
nav .tour-highlight,
.navbar-fixed .tour-highlight {
  position: relative !important;
  z-index: 10001 !important;
  background: rgba(255, 255, 255, 0.15) !important;
  border-radius: 8px !important;
}

/* Tooltip container */
.tour-tooltip {
  position: absolute;
  z-index: 10002;
  max-width: 320px;
  min-width: 280px;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hover);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0;
  opacity: 0;
  transform: scale(0.9) translateY(10px);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tour-tooltip.show {
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* Tooltip arrow */
.tour-tooltip::before {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  background: var(--bg-white);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transform: rotate(45deg);
  z-index: -1;
}

/* Arrow positions */
.tour-tooltip.arrow-top::before {
  top: -6px;
  left: 50%;
  margin-left: -6px;
  border-bottom: none;
  border-right: none;
}

.tour-tooltip.arrow-bottom::before {
  bottom: -6px;
  left: 50%;
  margin-left: -6px;
  border-top: none;
  border-left: none;
}

.tour-tooltip.arrow-left::before {
  left: -6px;
  top: 50%;
  margin-top: -6px;
  border-top: none;
  border-right: none;
}

.tour-tooltip.arrow-right::before {
  right: -6px;
  top: 50%;
  margin-top: -6px;
  border-bottom: none;
  border-left: none;
}

/* Tooltip content */
.tour-tooltip-header {
  padding: 1rem 1rem 0.75rem;
  border-bottom: 1px solid var(--bg-gray-200);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.tour-tooltip-title-area {
  flex: 1;
}

.tour-tooltip-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #2d3748;
  margin: 0 0 0.25rem 0;
  line-height: 1.3;
}

.tour-tooltip-step {
  font-size: 0.8rem;
  color: #4a5568;
  font-weight: 600;
}

.tour-close-btn {
  background: none;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  margin-top: -2px;
}

.tour-close-btn:hover {
  background: #f3f4f6;
  color: #374151;
}

.tour-close-btn i {
  font-size: 18px;
}

.tour-tooltip-body {
  padding: 1rem 1.5rem 1.5rem;
}

.tour-tooltip-description {
  font-size: 1rem;
  color: #2d3748;
  line-height: 1.6;
  margin: 0;
  font-weight: 500;
}

.tour-tooltip-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--bg-gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Navigation buttons */
.tour-nav {
  display: flex;
  gap: 0.5rem;
}

.tour-nav-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #f3f4f6;
  color: #6b7280;
}

.tour-nav-btn:hover:not(:disabled) {
  background: #e5e7eb;
  color: #374151;
  transform: scale(1.1);
}

.tour-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
}

.tour-nav-btn.tour-nav-primary {
  background: linear-gradient(135deg, #0061FF, #004DCF);
  color: white;
}

.tour-nav-btn.tour-nav-primary:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 97, 255, 0.4);
}

.tour-nav-btn i {
  font-size: 20px;
}

.tour-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none !important;
  min-height: 44px;
  justify-content: center;
}

.tour-btn-primary {
  background: linear-gradient(135deg, #0061FF, #004DCF);
  color: white;
  box-shadow: 0 2px 8px rgba(0, 97, 255, 0.2);
}

.tour-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-hover);
  color: white;
}

.tour-btn-secondary {
  background: #e2e8f0;
  color: #2d3748;
  border: 1px solid #cbd5e0;
}

.tour-btn-secondary:hover {
  background: #cbd5e0;
  color: #1a202c;
  transform: translateY(-1px);
}

.tour-btn-ghost {
  background: transparent;
  color: #4a5568;
  border: 1px solid #e2e8f0;
}

.tour-btn-ghost:hover {
  background: #f7fafc;
  color: #2d3748;
}

.tour-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* Progress indicator */
.tour-progress {
  font-size: 0.85rem;
  color: #4a5568;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tour-progress-bar {
  width: 60px;
  height: 3px;
  background: var(--bg-gray-200);
  border-radius: 2px;
  overflow: hidden;
}

.tour-progress-fill {
  height: 100%;
  background: linear-gradient(135deg, #0061FF, #004DCF);
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* Welcome modal */
.tour-welcome-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s ease;
}

.tour-welcome-modal.show {
  opacity: 1;
}

.tour-welcome-content {
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-hover);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  transform: scale(0.9) translateY(20px);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tour-welcome-modal.show .tour-welcome-content {
  transform: scale(1) translateY(0);
}

.tour-welcome-header {
  padding: 2rem 2rem 1rem;
  text-align: center;
  background: linear-gradient(135deg, #0061FF, #004DCF);
  color: white !important;
}

.tour-welcome-icon {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  backdrop-filter: blur(10px);
}

.tour-welcome-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  color: white !important;
}

.tour-welcome-subtitle {
  font-size: 1rem;
  opacity: 0.9;
  margin: 0;
  color: white !important;
}

.tour-welcome-body {
  padding: 2rem;
}

.tour-welcome-description {
  font-size: 1.05rem;
  color: #2d3748;
  line-height: 1.6;
  margin-bottom: 2rem;
  font-weight: 500;
}

.tour-welcome-features {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem 0;
}

.tour-welcome-features li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  font-size: 1rem;
  color: #2d3748;
  font-weight: 500;
}

.tour-welcome-features i {
  color: var(--primary-color);
  font-size: 1.2rem;
}

.tour-welcome-footer {
  padding: 1.5rem 2rem;
  border-top: 1px solid #e2e8f0;
  display: flex !important;
  gap: 1rem;
  justify-content: flex-end;
  background: white;
  position: relative;
  z-index: 10;
}

.tour-welcome-footer .tour-btn {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Animations */
@keyframes tour-pulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 97, 255, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(0, 97, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 97, 255, 0); }
}

.tour-pulse {
  animation: tour-pulse 2s infinite;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .tour-tooltip {
    max-width: 320px;
    min-width: 280px;
    left: 10px !important;
    right: 10px !important;
    width: calc(100vw - 20px) !important;
  }
  
  .tour-tooltip-footer {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
  
  .tour-nav {
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
    gap: 0.75rem;
  }
  
  .tour-btn {
    flex: 1;
    padding: 0.875rem 1rem;
    font-size: 0.85rem;
    min-height: 48px;
  }
  
  .tour-progress {
    order: -1;
    justify-content: center;
    width: 100%;
  }
  
.tour-welcome-body {
  flex: 1;
  overflow-y: auto;
}

.tour-welcome-footer {
  flex-shrink: 0;
  margin-top: auto;
}

@media (max-width: 768px) {
  .tour-welcome-content {
    margin: 0.5rem;
    width: calc(100% - 1rem);
    max-height: calc(100vh - 1rem);
  }
  
.tour-welcome-header {
    padding: 1.5rem 1.5rem 1rem;
  }
  
  .tour-welcome-body {
    padding: 1rem 1.5rem;
  }
  
  .tour-welcome-footer {
    padding: 1rem 1.5rem 1.5rem;
  }
  
  .tour-welcome-footer {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .tour-welcome-footer .tour-btn {
    width: 100% !important;
    justify-content: center;
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
}