/* ==========================================================================
   CRAFT INTENT TOUR - Tour-Specific Styles

   This file contains ONLY tour-specific UI elements.
   All app styling is inherited from styles.css.
   ========================================================================== */

/* ==========================================================================
   TOUR WRAPPER - Container for full-height layout
   ========================================================================== */

.tour-wrapper {
  height: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: background 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Make tour elements non-interactive */
.tour-wrapper .hamburger-menu,
.tour-wrapper .save-button,
.tour-wrapper .hamburger-icon:not(.tour-play-btn):not(.tour-restart-btn):not(.tour-close-btn),
.tour-wrapper .one-thing,
.tour-wrapper .add-project-status-button,
.tour-wrapper .add-section-item-button {
  pointer-events: none;
  cursor: default;
}

/* Hide scrollbars in tour */
.tour-wrapper,
.tour-wrapper *,
#tour-container,
#tour-container * {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.tour-wrapper::-webkit-scrollbar,
.tour-wrapper *::-webkit-scrollbar,
#tour-container::-webkit-scrollbar,
#tour-container *::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* ==========================================================================
   TOUR CHECKBOX PATTERN - Mirror app's checkbox selectors for tour IDs
   ========================================================================== */

/* Todos - show container when checked */
#tour-todos:checked ~ .todos-container {
  display: block;
}

/* Todos - rotate chevron when open */
#tour-todos:checked ~ .todos-button::before {
  content: '▾';
}

/* Projects Dashboard - show container when checked */
#tour-projects-dashboard-checkbox:checked ~ .projects-dashboard-container {
  display: block;
}

/* Projects Dashboard - rotate chevron when open */
#tour-projects-dashboard-checkbox:checked ~ .projects-dashboard-button::before {
  content: '▾';
}

/* ==========================================================================
   TOUR PROGRESS BAR
   ========================================================================== */

.tour-progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: #ddd;
  z-index: 100;
}

.tour-progress-fill {
  height: 100%;
  background: var(--gold);
  transition: width 0.3s ease;
}

/* ==========================================================================
   TOUR CONTROLS (Play/Pause/Restart/Close)
   ========================================================================== */

.tour-controls {
  position: absolute;
  top: clamp(8px, 2vw, 20px);
  right: clamp(8px, 2vw, 20px);
  display: flex;
  gap: clamp(5px, 1.5vw, 10px);
  z-index: 100;
}

.tour-controls button {
  padding: clamp(5px, 1.5vw, 8px) clamp(10px, 3vw, 16px);
  font-size: clamp(11px, 2.5vw, 14px);
  cursor: pointer;
}

/* Responsive controls */
@media (max-width: 768px) {
  .tour-controls {
    top: 10px;
    right: 10px;
  }

  .tour-controls button {
    padding: 6px 12px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .tour-controls {
    top: 5px;
    right: 5px;
    flex-wrap: wrap;
    gap: 5px;
  }

  .tour-controls button {
    padding: 5px 10px;
    font-size: 11px;
  }
}

@media (max-width: 360px) {
  .tour-controls {
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
  }

  .tour-controls button {
    padding: 4px 8px;
    font-size: 10px;
  }
}

/* ==========================================================================
   TOUR CONTENT ADJUSTMENTS
   ========================================================================== */

/* Content container fills available space */
.tour-wrapper .entire-content-border {
  flex: 1;
  overflow: hidden;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.tour-wrapper .content-container {
  height: calc(100% - 20px);
  overflow-y: scroll;
  overflow-x: hidden;
  margin: 10px auto;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Faded state during overlays */
.tour-wrapper .content-container.tour-faded {
  opacity: 0.15;
}

/* Spacer pushes content above caption bar */
.tour-content-spacer {
  height: clamp(200px, 50vh, 400px);
}

/* ==========================================================================
   TOUR CAPTION BAR
   ========================================================================== */

.tour-caption-bar {
  background: rgba(44, 62, 80, 0.95);
  color: white;
  padding: clamp(12px, 3vw, 20px) clamp(15px, 4vw, 30px);
  text-align: center;
  flex-shrink: 0;
  transition: opacity 0.3s ease;
}

.tour-caption-text {
  font-size: clamp(16px, 3vw, 20px);
  font-weight: 500;
}

.tour-caption-text.has-sub {
  margin-bottom: 8px;
}

.tour-caption-sub {
  font-size: clamp(12px, 2vw, 14px);
  opacity: 0.8;
}

@media (max-width: 480px) {
  .tour-caption-bar {
    padding: 12px 15px;
  }
}

/* ==========================================================================
   TOUR OVERLAY SCREENS
   ========================================================================== */

.tour-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: clamp(20px, 5vw, 40px);
  text-align: center;
  background: rgba(44, 62, 80, 0.95);
  z-index: 70;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Fade-in animation for overlay entering */
.tour-overlay.tour-entering {
  animation: overlayFadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes overlayFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.tour-overlay.tour-fading {
  opacity: 0.5;
}

.tour-overlay-logo {
  font-size: clamp(32px, 8vw, 56px);
  margin-bottom: 32px;
  letter-spacing: 4px;
}

.tour-overlay-logo .craft-logo {
  color: #C9A865;
  font-weight: 300;
}

.tour-overlay-logo .intent-logo {
  color: #fff;
  font-weight: 300;
}

.tour-overlay-title {
  font-size: clamp(18px, 4vw, 28px);
  font-weight: 400;
  color: #fff;
  margin-bottom: 16px;
  letter-spacing: 1px;
}

.tour-overlay-subtitle {
  font-size: clamp(14px, 3vw, 20px);
  color: rgba(255, 255, 255, 0.7);
  max-width: 500px;
  line-height: 1.5;
}

.tour-overlay-icon {
  margin-bottom: 24px;
}

.tour-overlay-caption {
  font-size: clamp(24px, 5vw, 36px);
  font-weight: 300;
  color: #fff;
  margin-bottom: 16px;
  letter-spacing: 1px;
}

.tour-overlay-subcaption {
  font-size: clamp(14px, 3vw, 20px);
  color: rgba(255, 255, 255, 0.8);
  max-width: 600px;
  line-height: 1.5;
}

/* ==========================================================================
   TOUR CTA BUTTON
   ========================================================================== */

.tour-cta {
  position: absolute;
  right: clamp(15px, 4vw, 30px);
  bottom: clamp(80px, 12vh, 100px);
  z-index: 80;
  transition: all 1s ease;
}

.tour-cta.tour-cta-overlay {
  bottom: clamp(20px, 5vh, 40px);
}

@media (max-width: 768px) {
  .tour-cta {
    padding: 0.5rem 1rem;
    font-size: 14px;
  }
}

@media (max-width: 360px) {
  .tour-cta {
    font-size: 12px;
    padding: 0.4rem 0.8rem;
  }
}

/* ==========================================================================
   TOUR SETTINGS MODAL ADJUSTMENTS
   ========================================================================== */

.tour-settings-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 50;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.tour-settings-backdrop.tour-fading {
  opacity: 0;
}

/* Override default display:none from styles.css */
.tour-wrapper .settings-page {
  display: block;
  z-index: 51;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.tour-wrapper .settings-page.tour-fading {
  opacity: 0;
}

/* ==========================================================================
   TOUR SEARCH BAR (demo) - positioned above CTA button
   ========================================================================== */

#craft-search-container.tour-search-visible {
  position: absolute;
  bottom: clamp(130px, 18vh, 160px);
  right: clamp(15px, 4vw, 30px);
  z-index: 45;
  animation: searchSlideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes searchSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  #craft-search-container.tour-search-visible {
    bottom: 130px;
    right: 10px;
  }
}

/* ==========================================================================
   TOUR HIGHLIGHT STATES (animations & visual feedback)
   ========================================================================== */

/* Search highlight for matching items */
.tour-search-highlight {
  border-left: 3px solid var(--gold) !important;
  padding-left: 8px !important;
  background-color: var(--gold-light) !important;
  transition: all 1s ease;
}

/* Indent/focus highlight animation */
@keyframes indentHighlight {
  0% { background-color: var(--gold-light); }
  100% { background-color: transparent; }
}

.tour-indent-highlight {
  animation: indentHighlight 1s ease-out;
}

/* Completed todo strikethrough */
.tour-todo-completed {
  text-decoration: line-through !important;
  opacity: 0.6 !important;
  transition: all 1s ease;
}

/* Button highlight (hide button, download, new section) */
.tour-highlight {
  background: var(--gold) !important;
  color: #fff !important;
  transform: scale(1.02);
  transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Drag handle highlight during drag demonstration */
.tour-drag-handle-highlight {
  background: var(--gold) !important;
  opacity: 0.6 !important;
  animation: dragHandlePulse 0.8s ease-in-out infinite;
}

@keyframes dragHandlePulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

/* Dragging item state */
.tour-dragging {
  opacity: 0.6 !important;
  background: var(--gold-light) !important;
}

/* Drag target section */
.tour-drag-target {
  background: var(--gold-light) !important;
}

/* Todos border highlight */
.tour-border-highlight {
  border: 2px solid var(--gold) !important;
  border-radius: 8px !important;
  padding: 8px !important;
}

/* Section highlights (projects, notes, search bar) */
.tour-section-highlight {
  background: var(--gold-light) !important;
  border-radius: 8px;
  transition: background 0.3s ease;
}

/* Search bar highlight */
#craft-search-container.tour-search-bar-highlight {
  background: var(--gold-light) !important;
  box-shadow: 0 0 15px rgba(201, 168, 101, 0.5);
  transition: all 0.3s ease;
}

/* ==========================================================================
   TOUR-SPECIFIC TRANSITIONS
   ========================================================================== */

/* Smooth transitions for tour elements */
.tour-wrapper .todoItem,
.tour-wrapper .hide-button,
.tour-wrapper .note-project-item,
.tour-wrapper .project-status-item,
.tour-wrapper .section-container {
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   WATCH DEMO BUTTON (for landing page)
   ========================================================================== */

.watch-demo-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: var(--gold);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  letter-spacing: 0.5px;
}

.watch-demo-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201, 162, 39, 0.4);
}

.watch-demo-btn:active {
  transform: translateY(0);
}

.watch-demo-btn svg {
  width: 20px;
  height: 20px;
}

/* ==========================================================================
   KEYFRAME ANIMATIONS
   ========================================================================== */

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Feature icon pulse animation */
@keyframes featurePulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.9;
  }
}

.tour-feature-icon {
  animation: featurePulse 2s ease-in-out infinite;
}
