/* Quick Tour - Spotlight guided tour */

#zf-tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#zf-tour-spotlight {
  position: absolute;
  border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.6);
  border: 2px solid #f38020;
  pointer-events: auto;
  transition: top 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              left 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              width 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#zf-tour-spotlight.is-round {
  border-radius: 50%;
}

#zf-tour-spotlight.is-hidden {
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.65);
  width: 0 !important;
  height: 0 !important;
  top: 50% !important;
  left: 50% !important;
  border: none;
}

#zf-tour-tooltip {
  position: absolute;
  pointer-events: auto;
  background: #fff;
  border-radius: 16px;
  padding: 20px 24px;
  max-width: 360px;
  width: max-content;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.08);
  z-index: 1;
  transition: opacity 0.25s ease;
}

#zf-tour-tooltip.is-entering {
  animation: tourFadeIn 0.35s ease-out;
}

#zf-tour-tooltip.is-center {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 400px;
  width: calc(100% - 32px);
  text-align: center;
}

.tour-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #964900 0%, #f38020 100%);
  color: #fff;
  margin-bottom: 12px;
}

.tour-icon .material-symbols-outlined {
  font-size: 24px;
}

.tour-title {
  font-family: 'Plus Jakarta Sans', 'Noto Sans TC', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  color: #1c1410;
  margin-bottom: 8px;
  line-height: 1.3;
}

.tour-desc {
  font-size: 0.875rem;
  color: #564336;
  line-height: 1.6;
  margin-bottom: 16px;
}

.tour-step-counter {
  font-size: 0.75rem;
  font-weight: 700;
  color: #8a7264;
  text-align: center;
  margin-bottom: 12px;
}

.tour-step-counter span {
  color: #964900;
  font-size: 0.875rem;
}

.tour-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 16px;
}

.tour-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ddc1b1;
  transition: all 0.3s ease;
}

.tour-dot.active {
  background: #964900;
  width: 20px;
  border-radius: 4px;
}

.tour-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tour-btn {
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  font-family: 'Plus Jakarta Sans', 'Noto Sans TC', sans-serif;
}

.tour-btn-skip {
  background: none;
  color: #8a7264;
  margin-right: auto;
  padding: 8px 4px;
}

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

.tour-btn-prev {
  background: #f5ebe4;
  color: #564336;
}

.tour-btn-prev:hover {
  background: #e8d5c8;
}

.tour-btn-next {
  background: #964900;
  color: #fff;
  padding: 8px 20px;
}

.tour-btn-next:hover {
  background: #7a3b00;
}

/* Complete screen */
.tour-complete-card {
  text-align: center;
}

.tour-celebrate {
  font-size: 3.5rem;
  animation: tourBounce 0.6s ease;
  display: block;
  margin-bottom: 12px;
}

/* A2HS step */
.tour-a2hs-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  background: #fdf4ed;
  border-radius: 12px;
  margin-bottom: 16px;
}

.tour-a2hs-visual .material-symbols-outlined {
  font-size: 32px;
  color: #964900;
}

.tour-a2hs-label {
  font-size: 0.8125rem;
  color: #564336;
  text-align: left;
  line-height: 1.5;
}

.tour-a2hs-label strong {
  color: #964900;
}

.tour-install-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: #964900;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.875rem;
  cursor: pointer;
  margin-bottom: 12px;
  transition: all 0.2s;
  font-family: 'Plus Jakarta Sans', 'Noto Sans TC', sans-serif;
}

.tour-install-btn:hover {
  background: #7a3b00;
}

.tour-install-btn-lg {
  width: 100%;
  justify-content: center;
  padding: 14px 24px;
  font-size: 1rem;
  margin-bottom: 16px;
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(150, 73, 0, 0.3);
}

.tour-install-btn-lg:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(150, 73, 0, 0.4);
}

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

.tour-a2hs-hint {
  min-height: 0;
}

.tour-a2hs-fallback {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #fff8f0;
  border: 1px solid #f0d4b8;
  border-radius: 10px;
  font-size: 0.8125rem;
  color: #564336;
  line-height: 1.5;
  margin-bottom: 12px;
  animation: tourFadeIn 0.3s ease-out;
}

.tour-a2hs-fallback .material-symbols-outlined {
  font-size: 18px;
  color: #964900;
  flex-shrink: 0;
}

.tour-a2hs-fallback kbd {
  display: inline-block;
  padding: 2px 6px;
  background: #fff;
  border: 1px solid #ddc1b1;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  color: #964900;
}

/* Mobile: bottom sheet mode */
@media (max-width: 767px) {
  #zf-tour-tooltip:not(.is-center) {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    max-width: 100%;
    width: 100%;
    border-radius: 20px 20px 0 0;
    padding: 24px 20px calc(env(safe-area-inset-bottom, 16px) + 16px);
    animation: tourSlideUp 0.35s ease-out;
  }
}

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

@keyframes tourSlideUp {
  from { opacity: 0; transform: translateY(100%); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes tourBounce {
  0% { transform: scale(0.3); opacity: 0; }
  50% { transform: scale(1.15); }
  70% { transform: scale(0.9); }
  100% { transform: scale(1); opacity: 1; }
}
