/**
 * lookdump.css — styling for the LOOK-DUMP v1 · inc1 front-end shell (DEC-356).
 *
 * Dark-only: reuses the Studio's existing dark design tokens (--aif-*, --as-gold,
 * --as-radius, --as-tap) declared on #ppcp-ai-studio in ai-studio.css, so it stays
 * visually consistent with the rest of the Studio and needs no palette of its own.
 * Only enqueued when the previz flag is on (same gate as previz.css).
 *
 * Everything is scoped under #as-lookdump / the shell's own ids so nothing leaks
 * into the other Studio tabs. All controls meet the --as-tap (44px) touch floor.
 */

/* ── Shell shell / header ────────────────────────────────────────────────── */
#as-lookdump { margin-top: 20px; }

#as-lookdump .as-lookdump-head { margin-bottom: 14px; }

#as-lookdump .as-lookdump-modes {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

/* Mode tabs (Catalogue / Styling Studio) — pill toggle. */
#as-lookdump .as-lookdump-mode {
  background: transparent;
  border: 1px solid var(--aif-border, #2A3040);
  border-radius: 999px;
  color: var(--aif-text, #E6E9F0);
  cursor: pointer;
  font-weight: 600;
  min-height: var(--as-tap, 44px);
  padding: 6px 18px;
}
#as-lookdump .as-lookdump-mode.is-active {
  background: var(--as-gold, #c8a96e);
  border-color: var(--as-gold, #c8a96e);
  color: #1a1d26;
}

/* Basket button sits at the end of the mode row. */
#as-lookdump .as-lookdump-basket-btn { margin-left: auto; }
#as-lookdump .as-lookdump-basket-count {
  background: var(--as-gold, #c8a96e);
  border-radius: 999px;
  color: #1a1d26;
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  margin-left: 6px;
  min-width: 20px;
  padding: 1px 7px;
  text-align: center;
}

/* ── Styling-studio facet chips ──────────────────────────────────────────── */
#as-lookdump .as-lookdump-filters {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}
#as-lookdump .as-lookdump-facet {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
#as-lookdump .as-lookdump-facet-label {
  color: var(--aif-muted, #9AA3B5);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  min-width: 84px;
  text-transform: uppercase;
}
#as-lookdump .as-lookdump-chip {
  background: transparent;
  border: 1px solid var(--aif-border, #2A3040);
  border-radius: 999px;
  color: var(--aif-text, #E6E9F0);
  cursor: pointer;
  font-size: 13px;
  padding: 6px 14px;
}
#as-lookdump .as-lookdump-chip.is-active {
  background: rgba(200, 169, 110, 0.16);
  border-color: var(--as-gold, #c8a96e);
  color: var(--as-gold, #c8a96e);
}

/* ── Shared tile grid — scrollable catalogue gallery ─────────────────────── */
#as-lookdump .as-lookdump-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  /* Scroll cap so the full mock catalogue browses without pushing the page. */
  max-height: 560px;
  overflow-y: auto;
  padding: 2px;
}

#as-lookdump .as-lookdump-tile {
  background: var(--aif-panel, #161A22);
  border: 1px solid var(--aif-border, #2A3040);
  border-radius: var(--as-radius, 12px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#as-lookdump .as-lookdump-tile-img {
  aspect-ratio: 4 / 5;
  display: block;
  object-fit: cover;
  width: 100%;
}
#as-lookdump .as-lookdump-tile-meta {
  padding: 8px 10px 4px;
}
#as-lookdump .as-lookdump-tile-label {
  color: var(--aif-text, #E6E9F0);
  font-size: 13px;
  font-weight: 600;
}
#as-lookdump .as-lookdump-add {
  margin: 8px 10px 10px;
  min-height: var(--as-tap, 44px);
}
#as-lookdump .as-lookdump-add[aria-pressed="true"] {
  background: rgba(200, 169, 110, 0.16);
  border-color: var(--as-gold, #c8a96e);
  color: var(--as-gold, #c8a96e);
}

#as-lookdump .as-lookdump-empty {
  padding: 24px 4px;
  text-align: center;
}

/* ── Basket drawer ───────────────────────────────────────────────────────── */
.as-lookdump-drawer {
  background: var(--aif-panel, #161A22);
  border: 1px solid var(--aif-border, #2A3040);
  border-radius: var(--as-radius, 12px);
  margin-top: 16px;
  padding: 16px;
}
.as-lookdump-drawer-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
}
.as-lookdump-drawer-close {
  background: transparent;
  border: 0;
  color: var(--aif-muted, #9AA3B5);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}
.as-lookdump-basket-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
}
.as-lookdump-basket-item {
  align-items: center;
  background: var(--aif-bg, #0F1218);
  border: 1px solid var(--aif-border, #2A3040);
  border-radius: 10px;
  display: flex;
  gap: 10px;
  padding: 6px 8px;
}
.as-lookdump-basket-thumb {
  border-radius: 6px;
  height: 40px;
  object-fit: cover;
  width: 32px;
}
.as-lookdump-basket-item-label {
  color: var(--aif-text, #E6E9F0);
  flex: 1;
  font-size: 13px;
}
.as-lookdump-basket-remove {
  background: transparent;
  border: 0;
  color: var(--aif-muted, #9AA3B5);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  min-height: var(--as-tap, 44px);
  min-width: var(--as-tap, 44px);
}
.as-lookdump-drawer-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* ── Stubbed Generate interstitial ───────────────────────────────────────── */
.as-lookdump-modal {
  align-items: center;
  bottom: 0;
  display: flex;
  justify-content: center;
  left: 0;
  padding: 20px;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 100000;
}
.as-lookdump-modal[hidden] { display: none; }
.as-lookdump-modal-bg {
  background: rgba(0, 0, 0, 0.6);
  inset: 0;
  position: absolute;
}
.as-lookdump-modal-content {
  background: var(--aif-panel, #161A22);
  border: 1px solid var(--aif-border, #2A3040);
  border-radius: var(--as-radius, 12px);
  max-width: 420px;
  padding: 22px;
  position: relative;
  width: 100%;
  z-index: 1;
}
.as-lookdump-modal-close {
  background: transparent;
  border: 0;
  color: var(--aif-muted, #9AA3B5);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  position: absolute;
  right: 14px;
  top: 12px;
}
.as-lookdump-modal-list {
  list-style: disc;
  margin: 12px 0 16px;
  max-height: 220px;
  overflow-y: auto;
  padding-left: 20px;
}
.as-lookdump-modal-item {
  color: var(--aif-text, #E6E9F0);
  margin-bottom: 4px;
}
.as-lookdump-modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.as-lookdump-modal-note {
  margin-top: 14px;
  text-align: center;
}

/* ── Responsive: collapse facet labels + tighten the grid on small screens. */
@media (max-width: 720px) {
  #as-lookdump .as-lookdump-facet-label { min-width: 100%; }
  #as-lookdump .as-lookdump-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
}
