/* HartForge Deals Staging How-To Guide & Guided Tour Styles */

.header-guide-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.32rem;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.48);
  color: #bae6fd;
  font-weight: 800;
  font-size: 0.82rem;
  padding: 0.42rem 0.78rem;
  border-radius: 9999px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.header-guide-btn:hover {
  background: rgba(56, 189, 248, 0.24);
  border-color: rgba(56, 189, 248, 0.78);
  transform: scale(1.03);
}

.guide-qmark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.25);
  color: #e0f2fe;
  font-size: 0.74rem;
  font-weight: 900;
  line-height: 1;
}

@media (max-width: 640px) {
  .header-guide-btn {
    padding: 0.34rem 0.56rem;
    font-size: 0.76rem;
    gap: 0.24rem;
  }
}

@media (max-width: 480px) {
  .header-guide-btn {
    padding: 0.26rem 0.44rem;
    font-size: 0.7rem;
    min-width: 30px;
  }
  .guide-label-full {
    display: none;
  }
  .guide-qmark {
    width: 16px;
    height: 16px;
    font-size: 0.7rem;
  }
}

/* First-visit Welcome Bar */
.hf-welcome-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(14, 116, 144, 0.22) 0%, rgba(15, 23, 42, 0.92) 55%, rgba(16, 185, 129, 0.14) 100%);
  border: 1px solid rgba(56, 189, 248, 0.38);
  border-radius: 12px;
  padding: 0.68rem 0.95rem;
  margin: 0.75rem 0 1rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.42);
}

.hf-welcome-bar.hf-welcome-app {
  margin: 0.55rem 0.85rem 0.15rem;
  padding: 0.58rem 0.8rem;
}

.hf-welcome-bar[hidden] {
  display: none !important;
}

.hf-welcome-copy {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: 1 1 280px;
  min-width: 0;
}

.hf-welcome-pill {
  flex-shrink: 0;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  background: rgba(56, 189, 248, 0.18);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #bae6fd;
}

.hf-welcome-text {
  font-size: 0.81rem;
  line-height: 1.4;
  color: #e2e8f0;
}

.hf-welcome-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.hf-welcome-btn-primary {
  min-height: 34px;
  padding: 0.36rem 0.78rem;
  border-radius: 8px;
  border: 1px solid rgba(16, 185, 129, 0.65);
  background: linear-gradient(180deg, #10b981 0%, #059669 100%);
  color: #04150e;
  font-size: 0.76rem;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

.hf-welcome-btn-secondary {
  min-height: 34px;
  padding: 0.36rem 0.74rem;
  border-radius: 8px;
  border: 1px solid rgba(56, 189, 248, 0.45);
  background: rgba(56, 189, 248, 0.12);
  color: #bae6fd;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.hf-welcome-dismiss {
  min-width: 34px;
  min-height: 34px;
  padding: 0 0.5rem;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 768px) {
  .hf-welcome-bar.hf-welcome-app {
    margin: 0.45rem 0.65rem 0.1rem;
    padding: 0.52rem 0.68rem;
    gap: 0.5rem;
  }
  .hf-welcome-text {
    font-size: 0.75rem;
  }
}

/* Topbar mobile safety so ? Guide always fits cleanly on 1 sleek row */
@media (max-width: 768px) {
  .feed-topbar {
    flex-wrap: nowrap;
    gap: 0.35rem;
  }
  .feed-topbar-left {
    min-width: 0;
    flex: 1 1 auto;
    padding: 0.26rem 0.54rem;
  }
  .current-channel-title {
    min-width: 0;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.8rem;
  }
  .topbar-actions {
    flex-shrink: 0;
    flex-wrap: nowrap;
    gap: 0.3rem;
  }
  .topbar-actions .btn-top-action {
    min-block-size: 32px;
    padding: 0.26rem 0.5rem;
    font-size: 0.71rem;
  }
  .topbar-scan-time {
    display: none;
  }
}

/* How-To Guide Dialog */
.hf-guide-dialog {
  position: fixed;
  inset-block-start: max(env(safe-area-inset-top, 0px), var(--safe-top, 0px));
  inset-block-end: max(env(safe-area-inset-bottom, 0px), var(--safe-bottom, 0px));
  margin: auto;
  width: min(95vw, 760px);
  max-width: calc(100vw - 16px - max(env(safe-area-inset-left, 0px), var(--safe-left, 0px)) - max(env(safe-area-inset-right, 0px), var(--safe-right, 0px)));
  max-height: min(calc(100dvh - max(env(safe-area-inset-top, 0px), var(--safe-top, 0px)) - max(env(safe-area-inset-bottom, 0px), var(--safe-bottom, 0px)) - 20px), 840px);
  background: linear-gradient(180deg, #121823 0%, #090d14 100%);
  color: #f8fafc;
  border: 1px solid rgba(56, 189, 248, 0.38);
  border-radius: 16px;
  padding: 0;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.82);
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.hf-guide-dialog[open] {
  display: flex;
  flex-direction: column;
}

.hf-guide-dialog::backdrop {
  background: rgba(2, 6, 14, 0.78);
  backdrop-filter: blur(4px);
}

.hf-guide-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.85rem 1.05rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.76);
  flex-shrink: 0;
}

.hf-guide-title-wrap {
  min-width: 0;
}

.hf-guide-title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 900;
  color: #f8fafc;
}

.hf-guide-subtitle {
  margin-top: 0.15rem;
  font-size: 0.74rem;
  color: #94a3b8;
}

.hf-guide-header-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.hf-guide-close {
  min-width: 40px;
  min-height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
}

.hf-guide-tabs {
  display: flex;
  gap: 0.4rem;
  padding: 0.62rem 1.05rem;
  overflow-x: auto;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(7, 10, 15, 0.7);
  flex-shrink: 0;
  scrollbar-width: none;
}

.hf-guide-tabs::-webkit-scrollbar {
  display: none;
}

.hf-guide-tab-btn {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0.28rem 0.68rem;
  border-radius: 9999px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.hf-guide-tab-btn.active {
  background: rgba(56, 189, 248, 0.18);
  border-color: rgba(56, 189, 248, 0.65);
  color: #e0f2fe;
}

.hf-guide-body {
  padding: 0.95rem 1.05rem calc(1.25rem + max(env(safe-area-inset-bottom, 0px), var(--safe-bottom, 0px)));
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.hf-guide-card {
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  padding: 0.9rem 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hf-guide-card.is-highlighted {
  border-color: rgba(56, 189, 248, 0.72);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.hf-guide-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.hf-guide-card-title {
  margin: 0;
  font-size: 0.94rem;
  font-weight: 900;
  color: #f8fafc;
}

.hf-guide-step-pill {
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.16rem 0.48rem;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
  white-space: nowrap;
}

.hf-guide-card p {
  margin: 0 0 0.55rem;
  font-size: 0.82rem;
  line-height: 1.5;
  color: #cbd5e1;
}

.hf-guide-list {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8rem;
  line-height: 1.45;
  color: #cbd5e1;
}

.hf-guide-list strong {
  color: #f8fafc;
}

/* Dynamic Watched Retailers Grid */
.hf-sites-summary-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.55rem 0 0.7rem;
}

.hf-summary-chip {
  font-size: 0.73rem;
  font-weight: 800;
  padding: 0.24rem 0.58rem;
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #e2e8f0;
}

.hf-sites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  gap: 0.52rem;
}

.hf-site-card {
  display: flex;
  flex-direction: column;
  gap: 0.26rem;
  padding: 0.58rem 0.68rem;
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.62);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.hf-site-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
}

.hf-site-name {
  font-size: 0.82rem;
  font-weight: 900;
  color: #f8fafc;
}

.hf-site-mode {
  font-size: 0.64rem;
  font-weight: 800;
  padding: 0.12rem 0.4rem;
  border-radius: 6px;
  white-space: nowrap;
}

.hf-site-mode.mode-both {
  background: rgba(16, 185, 129, 0.16);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.hf-site-mode.mode-drops {
  background: rgba(56, 189, 248, 0.16);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.hf-site-mode.mode-clearance {
  background: rgba(245, 158, 11, 0.16);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.hf-site-domain {
  font-size: 0.71rem;
  color: #94a3b8;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.hf-site-counts {
  font-size: 0.72rem;
  color: #cbd5e1;
  font-weight: 700;
}

.hf-badge-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  margin-top: 0.45rem;
}

.hf-sample-pill {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
}

.hf-sample-atl {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #6ee7b7;
}

.hf-sample-drop {
  background: rgba(56, 189, 248, 0.18);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #7dd3fc;
}

.hf-sample-clr {
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fde68a;
}

.hf-guide-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.48rem;
  margin-top: 0.65rem;
}

/* Interactive Spotlight Guided Tour */
.hf-tour-overlay[hidden] {
  display: none !important;
}

.hf-tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 9500;
  pointer-events: auto;
}

.hf-tour-backdrop {
  position: fixed;
  inset: 0;
  background: transparent;
}

.hf-tour-overlay.no-spotlight .hf-tour-backdrop {
  background: rgba(2, 6, 14, 0.72);
}

.hf-tour-spotlight {
  position: fixed;
  border-radius: 12px;
  border: 2px solid #38bdf8;
  box-shadow: 0 0 0 9999px rgba(2, 6, 14, 0.72), 0 0 26px rgba(56, 189, 248, 0.58);
  pointer-events: none;
  transition: top 0.18s ease, left 0.18s ease, width 0.18s ease, height 0.18s ease;
}

.hf-tour-card {
  position: fixed;
  width: min(calc(100vw - 24px), 372px);
  max-width: calc(100vw - 24px);
  background: linear-gradient(180deg, #151d2b 0%, #0b1019 100%);
  border: 1px solid rgba(56, 189, 248, 0.58);
  border-radius: 14px;
  padding: 0.92rem 1rem;
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.85);
  color: #f8fafc;
  z-index: 9502;
}

.hf-tour-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.42rem;
}

.hf-tour-progress {
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #38bdf8;
}

.hf-tour-close-x {
  min-width: 32px;
  min-height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  font-weight: 800;
  cursor: pointer;
}

.hf-tour-heading {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 900;
  color: #f8fafc;
}

.hf-tour-copy {
  margin: 0 0 0.72rem;
  font-size: 0.81rem;
  line-height: 1.48;
  color: #cbd5e1;
}

.hf-tour-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.hf-tour-nav-left,
.hf-tour-nav-right {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.hf-tour-btn {
  min-height: 36px;
  padding: 0.38rem 0.76rem;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.hf-tour-btn-next {
  border-color: rgba(16, 185, 129, 0.7);
  background: linear-gradient(180deg, #10b981 0%, #059669 100%);
  color: #03150e;
  font-weight: 900;
}

.hf-tour-btn-link {
  border-color: rgba(56, 189, 248, 0.5);
  background: rgba(56, 189, 248, 0.14);
  color: #bae6fd;
}

@media (max-width: 560px) {
  .hf-sites-grid {
    grid-template-columns: 1fr;
  }
  .hf-guide-subtitle {
    display: none;
  }
}
