/* SIGMAN - Look Builder
   The picker layer for the Styling Studio. It lives INSIDE .sgm-ctl on purpose:
   that root owns --sgm-gold / --sgm-line / --sgm-muted, and sgm-brand-accents.css
   re-points --sgm-gold per module, so everything here follows the brand palette
   with no duplicated colour values.
   Card visuals are reused from sgm-complete-the-look.css (.sgm-look-card). */

/* ---- promo line --------------------------------------------------------- *
   One line, in the brand red. The colour comes from the section's promo_color
   setting via an inline style; these rules only own the layout and weight.
   Loaded after sgm-style-studio.css, and carrying an extra class, so it wins
   over the default panel-title colour either way. */
.sgm-studio__panel-title.sgm-lb__promo {
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: .02em;
  text-wrap: balance;
}

.sgm-lb__tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 16px;
}
.sgm-lb__filters { display: flex; flex-wrap: wrap; gap: 8px; }
.sgm-lb__chip {
  appearance: none;
  border: 1px solid var(--sgm-line);
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: max(.66rem, 12px);
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .25s var(--sgm-ease), color .25s var(--sgm-ease), border-color .25s ease;
}
.sgm-lb__chip:hover { border-color: var(--sgm-gold); }
.sgm-lb__chip.is-on {
  background: var(--color-foreground);
  color: var(--color-background);
  border-color: var(--color-foreground);
}
.sgm-lb__chip-count { opacity: .55; margin-inline-start: 5px; font-weight: 500; }

.sgm-lb__search { position: relative; flex: 1 1 180px; max-width: 260px; }
.sgm-lb__search input {
  width: 100%;
  padding: 9px 12px 9px 34px;
  font: inherit;
  font-size: .82rem;
  color: inherit;
  background: transparent;
  border: 1px solid var(--sgm-line);
  border-radius: 999px;
}
.sgm-lb__search input:focus { outline: none; border-color: var(--sgm-gold); }
/* The frame is dark by default, where the browser's own placeholder grey is
   almost invisible. Silver on dark, muted foreground on a light frame. */
.sgm-lb__search input::placeholder { color: #c9ced6; opacity: 1; }
.sgm-studio--light .sgm-lb__search input::placeholder { color: var(--sgm-muted); opacity: 1; }
.sgm-lb__search svg {
  position: absolute;
  inset-inline-start: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  opacity: .5;
  pointer-events: none;
}

.sgm-lb__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 750px) {
  .sgm-lb__grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
}
.sgm-lb__item.is-hidden { display: none; }
.sgm-lb__empty { margin: 20px 2px 0; text-align: center; font-size: .85rem; color: var(--sgm-muted); }
.sgm-lb__more {
  display: block;
  margin: 18px auto 0;
  padding: 11px 24px;
  font: inherit;
  font-size: max(.66rem, 12px);
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 600;
  background: transparent;
  color: inherit;
  border: 1px solid var(--sgm-line);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color .25s ease;
}
.sgm-lb__more:hover { border-color: var(--sgm-gold); }

/* ---- selected state ----------------------------------------------------- *
   The tick is a pseudo-element so sgm-look-card.liquid needs no markup change. */
.sgm-look-card.is-selected { border-color: var(--sgm-gold); }
.sgm-look-card.is-selected .sgm-look-card__media::after {
  content: "\2713";
  position: absolute;
  top: 8px;
  inset-inline-end: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--sgm-gold);
  color: #1a1a1a;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}
.sgm-lb__item[data-lb-locked] .sgm-look-card__add { display: none; }

/* ---- ledger ------------------------------------------------------------- */
.sgm-lb__hint {
  margin: 18px 2px 0;
  text-align: center;
  font-size: .78rem;
  line-height: 1.5;
  color: var(--sgm-muted);
}
.sgm-lb__hint strong { color: var(--sgm-gold); font-weight: 700; }
.sgm-lb__hint + .sgm-ctl__bar { margin-top: 10px; }
.sgm-lb__count { font-variant-numeric: tabular-nums; }

/* The CTA carries the action red, matching the promo line above it. Doubled
   class (the pattern used in sgm-brand-accents.css) so it beats both
   sgm-complete-the-look.css and Horizon's own .button, whatever the load order. */
.sgm-ctl__buy.sgm-ctl__buy,
.sgm-ctl__buy.sgm-ctl__buy:hover {
  background: var(--sgm-brand-red, #e11900);
  border-color: var(--sgm-brand-red, #e11900);
  color: #fff;
}
.sgm-ctl__buy.sgm-ctl__buy:hover { filter: brightness(1.1); }
.sgm-ctl__buy.sgm-ctl__buy[disabled] { opacity: .45; cursor: not-allowed; }
.sgm-ctl__buy.sgm-ctl__buy[disabled]:hover { filter: none; }

/* ---- ledger sticks to the bottom of the viewport on mobile while building - */
@media (max-width: 749px) {
  .sgm-lb__bar-wrap.is-stuck .sgm-ctl__bar {
    position: sticky;
    bottom: 10px;
    z-index: 3;
    box-shadow: 0 10px 30px -12px rgb(0 0 0 / .45);
    background: var(--color-background);
  }
}
