/*
 * The look settings screen (POS-UX1): the choices, and a live preview that is a miniature of the sale screen
 * drawn by the same tokens. The preview box carries the five look attributes, so tokens.css and sale.css style it
 * exactly as they style the page; only the miniature's own geometry is here. No colour literal: tokens only.
 */

.look__cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}
.look__controls,
.look__preview {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}
.look__label {
  margin: 0.4rem 0 0;
  font-weight: 600;
}
.look__layouts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}
.look-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: var(--tap);
  padding: 0.6rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  text-align: start;
  cursor: pointer;
}
.look-card--on {
  border: 2px solid var(--accent);
}
.look-card__thumb {
  height: 3rem;
  border-radius: 0.5rem;
  background: var(--surface-2);
}
.look-card__thumb--classic {
  background: linear-gradient(90deg, var(--hue-0) 33%, var(--hue-1) 33% 66%, var(--hue-2) 66%);
}
.look-card__thumb--photo {
  background: linear-gradient(135deg, var(--hue-3), var(--hue-4));
}
.look-card__thumb--quick {
  background: repeating-linear-gradient(90deg, var(--ink) 0 3px, var(--surface-2) 3px 9px);
}
.look__swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.swatch {
  min-width: var(--tap-sm);
  min-height: var(--tap-sm);
  border: 3px solid var(--surface);
  border-radius: 50%;
  background: var(--a-strong);
  box-shadow: 0 0 0 1px var(--line-strong);
  cursor: pointer;
}
.swatch--on {
  border-color: var(--ink);
}
.look__seg {
  display: flex;
}
.look__seg .seg__btn {
  flex: 1;
}

/* ---------------------------------------------------------------- the miniature */

.look-preview {
  padding: 0.6rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--bg);
  color: var(--ink);
}
.lp {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30%;
  gap: 0.5rem;
  aspect-ratio: 16 / 10;
  min-height: 11rem;
}
.lp__main,
.lp__side {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  padding: 0.4rem;
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  background: var(--surface);
}
.lp__cats {
  display: flex;
  gap: 0.25rem;
}
.lp__cat {
  flex: 1;
  height: 0.9rem;
  border-radius: 0.3rem;
  background: var(--h);
}
.lp__grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.3rem;
}
.lp__item {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.15rem;
  min-width: 0;
  padding: 0.25rem;
  border-radius: 0.4rem;
  background: var(--h);
  color: var(--on-hue);
  font-size: 0.7rem;
  font-weight: 600;
  overflow: hidden;
}
.lp__media {
  display: none;
}
.look-preview[data-layout='photo'] .lp__item {
  justify-content: flex-start;
  padding: 0;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-top: 3px solid var(--h);
}
.look-preview[data-layout='photo'][data-photos='never'] .lp__media {
  display: none;
}
.look-preview[data-layout='photo']:not([data-photos='never']) .lp__media {
  display: grid;
  place-items: center;
  height: 1.6rem;
  background: color-mix(in srgb, var(--h) 16%, var(--surface));
}
.lp__initial {
  display: grid;
  place-items: center;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 0.3rem;
  background: var(--h);
  color: var(--on-hue);
  font-size: 0.7rem;
}
.lp__name {
  padding-inline: 0.25rem;
}
.look-preview[data-layout='classic'] .lp__name {
  padding: 0;
}
.lp__scan {
  height: 1.1rem;
  border: 2px solid var(--accent);
  border-radius: 0.4rem;
}
.lp__row {
  height: 0.8rem;
  border-bottom: 1px solid var(--line-strong);
}
.lp__line {
  height: 0.7rem;
  border-radius: 0.3rem;
  background: var(--surface-2);
}
.lp__keys {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.2rem;
}
.lp__keys > span {
  height: 0.8rem;
  border-radius: 0.2rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.lp__total {
  margin-top: auto;
  font-size: 0.75rem;
  font-weight: 700;
}
.lp__pay {
  display: grid;
  place-items: center;
  height: 1.6rem;
  border-radius: 0.4rem;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.75rem;
  font-weight: 700;
}
.look-preview[data-size='large'] .lp__pay {
  height: 2.1rem;
}

@media (max-width: 40rem) {
  .look__cols {
    grid-template-columns: minmax(0, 1fr);
  }
  .look__layouts {
    grid-template-columns: minmax(0, 1fr);
  }
}
