/* HoloAlmanac Toolkit for eBay — marketing visuals (Bot 8)
   Load after vendor/ha.css, vendor/ha-v2.css, and vendor/toolkit-panel.css.
   No @import, no url(), no rasters. Marketplace mock uses HoloAlmanac tokens,
   not eBay colors or trade dress.
*/

.viz-page {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 3rem;
}

.viz-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.viz-kicker {
  margin: 0 0 0.5rem;
  color: var(--gold-soft, #d4b36a);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.viz-lede {
  margin: 0 0 1.5rem;
  max-width: 38rem;
  color: var(--text-muted, #a39a88);
  font-size: 1.05rem;
  line-height: 1.5;
}

.viz-section {
  margin: 2.75rem 0 0;
}

.viz-section h2 {
  margin: 0 0 1.25rem;
}

.viz-caption {
  margin: 0.75rem 0 0;
  color: var(--text-muted, #a39a88);
  font-size: 0.8125rem;
}

.viz-legal {
  margin: 2.5rem 0 0;
  color: var(--text-muted, #a39a88);
  font-size: 0.8125rem;
  line-height: 1.5;
}

/* ---- Browser marketplace mock ------------------------------------------- */

.viz-stage {
  position: relative;
}

.viz-stage .frame-browser {
  width: 100%;
}

.viz-stage .frame-body {
  padding: 0.75rem 0.85rem 0.9rem;
}

.mk {
  color: var(--text, #f3eee4);
}

.mk-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.85rem;
  margin-bottom: 0.75rem;
}

.mk-sort {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.55rem 0.3rem 0.7rem;
  border: 1px solid var(--line-strong, #7a7262);
  border-radius: var(--r-md, 8px);
  background: var(--surface-2, #242119);
}

.mk-sort-label {
  color: var(--text-muted, #a39a88);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mk-sort-value {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text, #f3eee4);
  font-size: 0.8125rem;
  font-weight: 600;
}

.mk-sort-value::after {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-0.1rem) rotate(45deg);
}

.mk-sorted {
  margin: 0;
  color: var(--gold-soft, #d4b36a);
  font-size: 0.8125rem;
  font-weight: 600;
}

.mk-stage {
  position: relative;
}

.mk-results {
  width: 100%;
  min-width: 0;
}

.mk-col {
  min-width: 0;
  padding: 0.45rem 0.5rem 0.5rem;
  background: var(--surface, #1b1914);
  border: 1px solid var(--line, #3a352c);
  border-radius: var(--r-md, 8px);
}

.mk-col h3 {
  margin: 0 0 0.45rem;
  color: var(--text-muted, #a39a88);
  font-family: var(--font-sans, system-ui, sans-serif);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.mk-row {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  gap: 0.7rem 0.85rem;
  align-items: start;
  padding: 0.55rem 0;
  border-top: 1px solid var(--line, #3a352c);
}

.mk-row:first-of-type { border-top: 0; padding-top: 0; }

.mk-thumb {
  display: block;
  width: 3rem;
  height: 3.6rem;
  border-radius: 4px;
  background:
    linear-gradient(165deg, var(--gold-dim, #2a2416) 0%, var(--surface-2, #242119) 55%, #161410 100%);
  border: 1px solid var(--line, #3a352c);
}

.mk-thumb-2 {
  background:
    linear-gradient(200deg, #2a2218 0%, #1a1814 60%, var(--gold-dim, #2a2416) 100%);
}

.mk-thumb-3 {
  background:
    linear-gradient(20deg, #1c1a16 0%, var(--gold-dim, #2a2416) 45%, #12100c 100%);
}

.mk-meta { min-width: 0; }

.mk-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin: 0 0 0.2rem;
  font-size: 0.9rem;
  font-weight: 650;
  line-height: 1.3;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.mk-facts {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.85rem;
}

.mk-price {
  display: inline;
  margin: 0;
  font-size: 0.9rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--text, #f3eee4);
  white-space: nowrap;
}

.mk-ship {
  color: var(--text-muted, #a39a88);
  font-size: 0.7rem;
  font-weight: 500;
}

.mk-listed {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.2rem;
  color: var(--text-muted, #a39a88);
  font-size: 0.7rem;
}

.mk-new {
  display: inline-block;
  padding: 0.05rem 0.35rem;
  border-radius: var(--r-sm, 4px);
  background: var(--gold-dim, #2a2416);
  color: var(--gold-soft, #d4b36a);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mk-rails {
  display: none;
}

.mk-open {
  margin: 0 0 0.35rem !important;
  padding: 0 !important;
  border: 0 !important;
  color: var(--gold-soft, #d4b36a);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mk-sold p,
.mk-bin p {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem;
  margin: 0 0 0.4rem;
  padding: 0.28rem 0 0.35rem;
  border-top: 1px solid var(--line, #3a352c);
  font-size: 0.75rem;
  color: var(--text-muted, #a39a88);
}

.mk-sold p:first-of-type,
.mk-bin p:first-of-type { border-top: 0; }

.mk-sold b,
.mk-bin b {
  color: var(--text, #f3eee4);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

/* Overlapping Toolkit popup (real settings panel, compact).
   Vendored toolkit-panel.css keys off #tp-tab-* IDs; this sample uses #viz-tab-*. */
.viz-stage-frame {
  position: relative;
}

.viz-popup {
  display: none;
}

#viz-tab-search:checked ~ .tp-tabs [for="viz-tab-search"],
#viz-tab-saved:checked ~ .tp-tabs [for="viz-tab-saved"],
#viz-tab-cl:checked ~ .tp-tabs [for="viz-tab-cl"],
#viz-tab-settings:checked ~ .tp-tabs [for="viz-tab-settings"] {
  background: var(--tp-tab, #2c2c32);
  color: var(--tp-title, #f2f2f5);
}

#viz-tab-search:focus-visible ~ .tp-tabs [for="viz-tab-search"],
#viz-tab-saved:focus-visible ~ .tp-tabs [for="viz-tab-saved"],
#viz-tab-cl:focus-visible ~ .tp-tabs [for="viz-tab-cl"],
#viz-tab-settings:focus-visible ~ .tp-tabs [for="viz-tab-settings"] {
  outline: 2px solid var(--tp-focus, var(--focus, #e0c078));
  outline-offset: 2px;
}

#viz-tab-search:checked ~ #viz-panel-search,
#viz-tab-saved:checked ~ #viz-panel-saved,
#viz-tab-cl:checked ~ #viz-panel-cl,
#viz-tab-settings:checked ~ #viz-panel-settings {
  display: block;
}

/* Do not reserve a right gutter for the popup or rails — that crushed the rows.
   Results stay full width; overlays sit on top of the right edge. */
@media (min-width: 40em) {
  .viz-stage-frame .frame-body {
    min-height: 22rem;
    padding-right: 0.85rem;
  }

  .mk-rails {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.45rem;
    position: static;
    width: auto;
    margin: 0 0 0.65rem;
    z-index: 1;
    pointer-events: none;
  }

  .mk-rails .mk-col {
    flex: 1 1 10rem;
    min-width: 9rem;
  }

  .mk-rails .mk-col p {
    display: inline-flex;
    margin: 0 0.55rem 0.15rem 0;
    padding: 0;
    border: 0;
    gap: 0.35rem;
  }

  .mk-rails .mk-open {
    display: block;
    width: 100%;
    margin: 0 0 0.25rem !important;
  }

  .viz-popup {
    display: block;
    position: absolute;
    top: auto;
    bottom: 0.55rem;
    right: 0.45rem;
    width: 16.75rem;
    z-index: 3;
    filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.45));
  }

  .viz-popup .toolkit-panel,
  .viz-popup .frame-extension {
    max-width: none;
    width: 100%;
  }

  .viz-popup .tp-tabs {
    flex-wrap: nowrap;
    gap: 0.2rem;
  }

  .viz-popup .tp-tab {
    padding: 0.28rem 0.45rem;
    font-size: 0.7rem;
  }

  .viz-popup .tp-desc { display: none; }

  .viz-popup .tp-row { padding: 0.5rem 0.2rem; }

  .viz-popup .tp-card { padding: 0.75rem 0.6rem 0.5rem; }
}

@media (min-width: 80em) {
  .viz-popup {
    width: 17.5rem;
    right: 0.35rem;
  }
}

/* ---- Price card ---------------------------------------------------------- */

.ot-price {
  max-width: 28rem;
  margin: 0;
  padding: 1.5rem 1.4rem 1.35rem;
  background: var(--surface, #1b1914);
  border: 1px solid transparent;
  border-radius: var(--r-lg, 14px);
  background-image:
    linear-gradient(var(--surface, #1b1914), var(--surface, #1b1914)),
    linear-gradient(135deg, var(--gold, #c6a35a), var(--gold-bright, #e0c078));
  background-origin: border-box;
  background-clip: padding-box, border-box;
  box-shadow: 0 0 0 1px rgba(198, 163, 90, 0.12), 0 16px 40px rgba(0, 0, 0, 0.28);
}

.ot-kicker {
  margin: 0 0 0.35rem;
  color: var(--gold-soft, #d4b36a);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ot-amount {
  margin: 0;
  font-family: var(--font-serif, Georgia, "Times New Roman", serif);
  font-size: 3rem;
  font-weight: 600;
  line-height: 1.1;
  color: var(--text, #f3eee4);
  font-variant-numeric: tabular-nums;
}

.ot-amount span {
  display: block;
  margin: 0.35rem 0 0;
  color: var(--text-muted, #a39a88);
  font-family: var(--font-sans, system-ui, sans-serif);
  font-size: 0.95rem;
  font-weight: 600;
}

.ot-blurb {
  margin: 0.65rem 0 1rem;
  color: var(--text-muted, #a39a88);
  font-size: 0.95rem;
  line-height: 1.45;
}

.ot-list {
  list-style: none;
  margin: 0 0 1.15rem;
  padding: 0;
}

.ot-list li {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  margin: 0 0 0.55rem;
  color: var(--text, #f3eee4);
  font-size: 0.9375rem;
  line-height: 1.4;
}

.ot-list .icon {
  flex: 0 0 auto;
  margin-top: 0.1rem;
  color: var(--gold-soft, #d4b36a);
}

.ot-note {
  margin: 0.85rem 0 0;
  color: var(--text-muted, #a39a88);
  font-size: 0.75rem;
  line-height: 1.45;
}

/* Feature grid icons on this page */
.viz-section .feature-card .icon {
  color: var(--gold-soft, #d4b36a);
}

.feature-icon-grid.viz-features {
  grid-template-columns: 1fr;
}

@media (min-width: 40em) {
  .feature-icon-grid.viz-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 64em) {
  .feature-icon-grid.viz-features { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---- Responsive mock ----------------------------------------------------- */

@media (max-width: 39.99em) {
  .mk-rails {
    display: none;
  }

  .viz-popup {
    display: block;
    position: static;
    width: 100%;
    max-width: 22rem;
    margin: 0.75rem 0 0 auto;
    filter: none;
  }

  .mk-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .frame-url {
    font-size: 0.65rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ot-price,
  .viz-popup,
  .mk-sort {
    transition: none;
  }
}
