/**
 * Curriculum Tour Styles
 * Custom styles for Shepherd.js tours
 */

/* Tour Menu Modal */
.tour-menu-modal {
   position: fixed;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   background: rgba(0, 0, 0, 0.8);
   display: flex;
   align-items: center;
   justify-content: center;
   z-index: 10000;
}

.tour-menu-content {
   background: white;
   padding: 2rem;
   border-radius: 12px;
   max-width: 500px;
   width: 90%;
   position: relative;
   text-align: center;
}

.tour-menu-content h3 {
   margin: 0 0 1rem 0;
   color: #2c3e50;
}

.tour-menu-options {
   display: grid;
   gap: 0.75rem;
   margin: 1.5rem 0;
}

.tour-menu-options .btn {
   padding: 0.75rem 1rem;
   border: none;
   border-radius: 6px;
   cursor: pointer;
   font-size: 1rem;
   transition: all 0.2s ease;
   text-align: left;
}

.tour-menu-options .btn:hover {
   transform: translateY(-1px);
   box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tour-menu-options .btn-primary {
   background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
   color: white;
}

.tour-menu-options .btn-secondary {
   background: #f8f9fa;
   color: #495057;
   border: 1px solid #dee2e6;
}

.tour-menu-close {
   position: absolute;
   top: 1rem;
   right: 1rem;
   background: none;
   border: none;
   font-size: 1.5rem;
   cursor: pointer;
   color: #6c757d;
   width: 30px;
   height: 30px;
   display: flex;
   align-items: center;
   justify-content: center;
   border-radius: 50%;
}

.tour-menu-close:hover {
   background: #f8f9fa;
   color: #495057;
}

/* Enhanced Shepherd Step Styles */
.curriculum-tour-step.shepherd-element {
   background: white;
   border-radius: 12px;
   box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
   border: none;
   overflow: hidden;
   max-width: 400px;
}

.curriculum-tour-step .shepherd-content {
   padding: 0;
}

.curriculum-tour-step .shepherd-header {
   background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
   color: white;
   padding: 1rem 1.5rem;
   margin: 0;
}

.curriculum-tour-step .shepherd-title {
   margin: 0;
   font-size: 1.1rem;
   font-weight: 600;
}

.curriculum-tour-step .shepherd-text {
   padding: 1.5rem;
   margin: 0;
   line-height: 1.6;
}

.curriculum-tour-step .shepherd-text p:last-child {
   margin-bottom: 0;
}

.curriculum-tour-step .shepherd-text ul {
   margin: 0.5rem 0;
   padding-left: 1.2rem;
}

.curriculum-tour-step .shepherd-text li {
   margin-bottom: 0.25rem;
}

.curriculum-tour-step .shepherd-footer {
   padding: 1rem 1.5rem;
   background: #f8f9fa;
   border-top: 1px solid #e9ecef;
   display: flex;
   justify-content: space-between;
   align-items: center;
}

.curriculum-tour-step .shepherd-button {
   border: none;
   padding: 0.5rem 1rem;
   border-radius: 6px;
   cursor: pointer;
   font-size: 0.9rem;
   transition: all 0.2s ease;
   margin-left: 0.5rem;
}

.curriculum-tour-step .shepherd-button.btn-primary {
   background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
   color: white;
}

.curriculum-tour-step .shepherd-button.btn-secondary {
   background: #6c757d;
   color: white;
}

.curriculum-tour-step .shepherd-button:hover {
   transform: translateY(-1px);
   box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.curriculum-tour-step .shepherd-button:first-child {
   margin-left: 0;
}

/* Tour-specific styles */
.ai-helper-tour .shepherd-header {
   background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
}

.search-tour .shepherd-header {
   background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
}

.favorites-tour .shepherd-header {
   background: linear-gradient(135deg, #fd79a8 0%, #e84393 100%);
}

/* Shepherd Arrow Customization */
.curriculum-tour-step.shepherd-element .shepherd-arrow:before {
   background: white;
   border: none;
}

/* Cancel icon styling */
.curriculum-tour-step .shepherd-cancel-icon {
   position: absolute;
   top: 0.75rem;
   right: 1rem;
   color: rgba(255, 255, 255, 0.8);
   cursor: pointer;
   font-size: 1.2rem;
   z-index: 1;
}

.curriculum-tour-step .shepherd-cancel-icon:hover {
   color: white;
}

/* Progress indicator */
.curriculum-tour-step .tour-progress {
   position: absolute;
   bottom: 0;
   left: 0;
   height: 3px;
   background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
   transition: width 0.3s ease;
}

/* Pulse effect for highlighted elements */
@keyframes tour-pulse {
   0% {
      box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
   }
   70% {
      box-shadow: 0 0 0 10px rgba(102, 126, 234, 0);
   }
   100% {
      box-shadow: 0 0 0 0 rgba(102, 126, 234, 0);
   }
}

.tour-highlight {
   animation: tour-pulse 2s infinite;
   position: relative;
   z-index: 9999;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
   .curriculum-tour-step.shepherd-element {
      max-width: 90vw;
      margin: 0 5vw;
   }

   .tour-menu-content {
      margin: 1rem;
      padding: 1.5rem;
      max-width: none;
   }

   .tour-menu-options {
      gap: 0.5rem;
   }

   .curriculum-tour-step .shepherd-text {
      padding: 1rem;
   }

   .curriculum-tour-step .shepherd-footer {
      padding: 0.75rem 1rem;
      flex-direction: column;
      gap: 0.5rem;
   }

   .curriculum-tour-step .shepherd-button {
      width: 100%;
      margin-left: 0;
   }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
   .tour-menu-content {
      background: #2d3748;
      color: white;
   }

   .tour-menu-content h3 {
      color: white;
   }

   .tour-menu-options .btn-secondary {
      background: #4a5568;
      color: white;
      border-color: #2d3748;
   }

   .curriculum-tour-step.shepherd-element {
      background: #2d3748;
      color: white;
   }

   .curriculum-tour-step .shepherd-footer {
      background: #1a202c;
      border-color: #4a5568;
   }
}

/* Animation for tour start */
.curriculum-tour-step.shepherd-element.shepherd-enabled {
   animation: tourFadeIn 0.3s ease-out;
}

@keyframes tourFadeIn {
   from {
      opacity: 0;
      transform: translateY(20px) scale(0.95);
   }
   to {
      opacity: 1;
      transform: translateY(0) scale(1);
   }
}

/* Help trigger button styling */
.tour-trigger-btn {
   position: fixed;
   bottom: 20px;
   right: 20px;
   background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
   color: white;
   border: none;
   width: 56px;
   height: 56px;
   border-radius: 50%;
   cursor: pointer;
   font-size: 1.5rem;
   box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
   transition: all 0.3s ease;
   z-index: 1000;
}

.tour-trigger-btn:hover {
   transform: translateY(-2px);
   box-shadow: 0 8px 24px rgba(102, 126, 234, 0.6);
}

.tour-trigger-btn:active {
   transform: translateY(0);
}
