/* =========================================================
   Homepage Tutorial / Guided Tour
   ========================================================= */

/* Overlay container */
.tut-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
}
.tut-overlay[hidden] { display: none !important; }
.tut-overlay > * { pointer-events: auto; }

/* Dark backdrop */
.tut-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  transition: opacity .3s ease;
}

/* Spotlight border frame */
.tut-spotlight {
  position: fixed;
  border-radius: 14px;
  border: 3px solid #0b4f2d;
  transition: all .4s cubic-bezier(0.4,0,0.2,1);
  pointer-events: none;
  z-index: 10002;
}
.tut-spotlight::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 18px;
  border: 2px solid rgba(7,41,8,0.3);
  animation: tutPulse 2s ease-in-out infinite;
}
@keyframes tutPulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.01); }
}

/* Tooltip */
.tut-tooltip {
  position: fixed;
  z-index: 10001;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.22), 0 2px 8px rgba(0,0,0,0.10);
  padding: 20px 22px 16px;
  max-width: 380px;
  min-width: 280px;
  transition: all .4s cubic-bezier(0.4,0,0.2,1);
  border: 1px solid rgba(7,41,8,0.15);
}

/* Step dots */
.tut-step-indicator {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}
.tut-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(0,0,0,0.12);
  transition: all .2s ease;
}
.tut-dot.active {
  background: #0b4f2d;
  transform: scale(1.25);
}
.tut-dot.done {
  background: #f0f4f1;
  border: 1.5px solid #0b4f2d;
}

/* Content */
.tut-content h4 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 800;
  color: #111827;
}
.tut-content p {
  margin: 0 0 6px;
  font-size: 13px;
  line-height: 1.55;
  color: #374151;
}
.tut-content .tut-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: #f0f4f1;
  color: #072908;
  font-weight: 700;
  font-size: 12px;
  border: 1px solid rgba(7,41,8,0.2);
}

/* Buttons */
.tut-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(0,0,0,0.06);
}
.tut-btn {
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  transition: all .2s ease;
}
.tut-btn--skip {
  background: transparent;
  color: #6b7280;
  padding: 6px 12px;
}
.tut-btn--skip:hover {
  color: #111827;
  background: rgba(0,0,0,0.04);
}
.tut-btn--next {
  background: #072908;
  color: #fff;
  padding: 8px 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.tut-btn--next:hover:not(:disabled) {
  background: #0b4f2d;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.tut-btn--locked {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* Toolbar repositioned under search bar during search tutorial step */
.tut-toolbar-under-search {
  position: fixed !important;
  top: 90px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  z-index: 10000 !important;
  display: flex !important;
  background: var(--bg-page, #f4f5f7) !important;
  padding: 8px 16px !important;
  border-radius: 10px !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
  margin: 0 !important;
}

/* Mobile */
@media (max-width: 700px) {
  .tut-tooltip {
    max-width: calc(100vw - 24px);
    min-width: unset;
    padding: 14px 14px 10px;
  }
  .tut-content {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
  }
  .tut-content h4 { font-size: 15px; }
  .tut-content p { font-size: 12px; line-height: 1.45; margin-bottom: 6px; }
  .tut-content .tut-action { font-size: 11px; padding: 5px 10px; }
  .tut-actions { margin-top: 10px; padding-top: 8px; }
  .tut-btn { font-size: 13px; padding: 7px 14px; }
  .tut-step-indicator { margin-bottom: 8px; }
}
