/* Feature Tour Styling */

/* Tour Start Modal */
#tourStartModal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.tour-start-dialog {
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  max-width: 450px;
  text-align: center;
}

.tour-start-dialog h2 {
  color: #1a1a1a;
  font-size: 24px;
  margin-bottom: 16px;
}

.tour-start-dialog p {
  color: #666;
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 32px;
}

.tour-start-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.tour-start-buttons button {
  padding: 12px 32px;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.tour-start-yes {
  background: #d4af37;
  color: #1a1a1a;
}

.tour-start-yes:hover {
  background: #ffd700;
  transform: translateY(-2px);
}

.tour-start-no {
  background: #ddd;
  color: #333;
}

.tour-start-no:hover {
  background: #ccc;
}

/* Tour Tooltip */
.tour-tooltip-container {
  pointer-events: all !important;
  z-index: 10000 !important;
}

.tour-tooltip {
  background: white;
  border: 3px solid #d4af37;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  width: 320px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  pointer-events: all;
}

.tour-tooltip-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.tour-tooltip-title {
  color: #d4af37;
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  flex: 1;
}

.tour-step-counter {
  background: #f0f0f0;
  color: #666;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  margin-left: 12px;
}

.tour-tooltip-description {
  color: #666;
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 16px 0;
}

.tour-tooltip-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.tour-btn {
  padding: 8px 12px;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.tour-btn-skip {
  background: transparent;
  color: #999;
  text-decoration: underline;
  padding: 0;
}

.tour-btn-skip:hover {
  color: #666;
}

.tour-nav-buttons {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.tour-btn-primary {
  background: #d4af37;
  color: #1a1a1a;
}

.tour-btn-primary:hover {
  background: #ffd700;
  transform: translateY(-1px);
}

.tour-btn-secondary {
  background: #f0f0f0;
  color: #333;
}

.tour-btn-secondary:hover {
  background: #e0e0e0;
}

/* Spotlight Animation */
@keyframes spotlightPulse {
  0% {
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5), 0 0 15px #d4af37;
  }
  50% {
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5), 0 0 30px #d4af37;
  }
  100% {
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5), 0 0 15px #d4af37;
  }
}

#tourSpotlight {
  animation: spotlightPulse 2s infinite;
}

/* Prevent tour from interfering with page */
#tourOverlay.tour-overlay {
  background: rgba(0, 0, 0, 0.5);
}

/* ===== Inline row-box tour (in normal flow — responsive, no absolute positioning) ===== */
.tour-row-box {
  background: #fff;
  border: 2px solid #d4af37;
  border-left-width: 6px;
  border-radius: 8px;
  padding: 14px 16px;
  margin: 10px 12px 16px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
  animation: tourBoxIn 0.2s ease-out;
}

@keyframes tourBoxIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.tour-row-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 6px;
}

.tour-row-title {
  color: #d4af37;
  font-size: 16px;
  font-weight: 700;
  margin: 0;
}

.tour-row-desc {
  color: #555;
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

/* Highlight the active control */
.tour-highlight {
  outline: 3px solid #d4af37 !important;
  outline-offset: 2px;
  border-radius: 6px;
  position: relative;
  z-index: 1;
  animation: tourHighlightPulse 1.6s infinite;
}

@keyframes tourHighlightPulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.25), 0 0 12px rgba(212, 175, 55, 0.5); }
  50% { box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.4), 0 0 24px rgba(212, 175, 55, 0.85); }
}

/* Fixed bottom navigation bar */
.tour-navbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: #1a1a1a;
  border-top: 2px solid #d4af37;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
  z-index: 10001;
}

.tour-navbar .tour-btn { padding: 10px 16px; font-size: 14px; }
.tour-navbar .tour-btn-skip { color: #bbb; }
.tour-navbar .tour-btn-skip:hover { color: #fff; }

/* Keep page content clear of the fixed nav bar while the tour is active */
body.tour-active { padding-bottom: 84px; }

/* Completion message */
.tour-complete {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  padding: 36px 40px;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  z-index: 10002;
  text-align: center;
  max-width: 400px;
}
.tour-complete h2 { color: #d4af37; margin: 0 0 12px; }
.tour-complete p { color: #666; margin: 0 0 22px; }
.tour-complete button {
  background: #d4af37;
  color: #1a1a1a;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .tour-start-dialog {
    margin: 20px;
    padding: 30px 20px;
  }

  .tour-start-buttons {
    flex-direction: column;
  }

  .tour-start-buttons button {
    width: 100%;
  }

  .tour-row-box { margin: 8px; }
  .tour-row-title { font-size: 15px; }
  .tour-navbar { padding: 10px 12px; }
  .tour-navbar .tour-btn { padding: 9px 12px; font-size: 13px; }
}
