/* Live Palette widget. It owns no fonts and no colours: every tone derives from the host's own text colour and
   fonts, plus an optional accent the merchant picks in the theme editor (--lp-accent-color). Layout, columns,
   image ratio, corners and motion are data attributes the block settings write on the root. */
.lp {
  --lp-ink: currentColor;
  --lp-accent: var(--lp-accent-color, currentColor);
  --lp-soft: color-mix(in srgb, currentColor 66%, transparent);
  --lp-faint: color-mix(in srgb, currentColor 46%, transparent);
  --lp-line: color-mix(in srgb, currentColor 14%, transparent);
  --lp-wash: color-mix(in srgb, currentColor 4%, transparent);
  --lp-radius: var(--lp-radius-setting, 4px);
  --lp-cols: 4;
  --lp-ratio: 1 / 1;
  --lp-gap: 20px;
  font: inherit;
  color: inherit;
  display: grid;
  gap: 16px;
  max-width: var(--lp-max-width, 1200px);
  margin-inline: auto;
  container-type: inline-size;
  position: relative;
}
.lp *, .lp *::before, .lp *::after { box-sizing: border-box; }
.lp[data-columns="3"] { --lp-cols: 3; }
.lp[data-ratio="portrait"] { --lp-ratio: 4 / 5; }
.lp[data-ratio="natural"] { --lp-ratio: auto; }
.lp[data-corners="none"] { --lp-radius: 0px; }
.lp[data-corners="soft"] { --lp-radius: 4px; }
.lp[data-corners="round"] { --lp-radius: 14px; }
.lp[data-price="false"] .lp-price, .lp[data-notes="false"] .lp-notes { display: none; }

/* Section groups such as Horizon's lay their blocks out in a flex row, which shrinks Shopify's block wrapper to
   its content; with inline-size containment on .lp that content is zero wide. */
.shopify-app-block:has(> .lp-block) { flex: 1 1 100%; width: 100%; min-width: 0; }
.lp-block { width: 100%; }

.lp-label { font-family: var(--lp-heading-font, var(--font-heading--family, var(--font-heading-family, inherit))); font-size: clamp(1.15rem, 2.4vw, 1.5rem); line-height: 1.2; text-wrap: balance; }
.lp-field { position: relative; }
.lp .lp-input {
  width: 100%; font: inherit; font-family: var(--lp-heading-font, var(--font-heading--family, var(--font-heading-family, inherit))); font-size: clamp(1.2rem, 2.8vw, 1.65rem); line-height: 1.3; color: inherit;
  background: transparent; border: 0; border-bottom: 1px solid var(--lp-ink); border-radius: 0;
  padding: 6px 28px 12px 0; margin: 0; outline: none; box-shadow: none; -webkit-appearance: none; appearance: none;
}
.lp .lp-input::placeholder { color: var(--lp-faint); opacity: 1; }
/* Focus thickens the rule; a box-shadow here painted a stray vertical line at the field's end in Chrome. */
.lp .lp-input:focus-visible { border-bottom: 2px solid var(--lp-accent); padding-bottom: 11px; }
/* A small dot at the end of the field breathes while a read is in flight. */
.lp-pulse { position: absolute; right: 4px; top: 50%; width: 6px; height: 6px; margin-top: -5px; border-radius: 50%; background: var(--lp-accent); opacity: 0; transition: opacity .25s; }
.lp[data-busy] .lp-pulse { opacity: .7; animation: lp-breathe 1.4s ease-in-out infinite; }
@keyframes lp-breathe { 50% { opacity: .2; } }

/* The read, said back as one sentence; the collection link and row arrows sit at its right. */
.lp-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 28px; }
.lp-head:has(.lp-read:empty):has(.lp-route[hidden]):has(.lp-nav[hidden]) { display: none; }
.lp-read { margin: 0; flex: 1 1 22ch; font-family: var(--lp-heading-font, var(--font-heading--family, var(--font-heading-family, inherit))); font-size: clamp(1.02rem, 1.8vw, 1.2rem); line-height: 1.4; text-wrap: pretty; }
.lp-read:empty { display: none; }
.lp-no { color: var(--lp-soft); }
.lp-side { display: flex; align-items: center; gap: 16px; margin-left: auto; }
@container (max-width: 520px) { .lp-side { margin-left: 0; } }
.lp-mode { justify-self: start; font-size: .8125rem; line-height: 1.3; color: var(--lp-soft); margin-top: -8px; }
.lp-mode[hidden] { display: none; }

.lp-route { display: inline-flex; align-items: center; gap: 10px; max-width: 100%; color: inherit; text-decoration: none; font-size: .9375rem; }
.lp-route[hidden] { display: none; }
.lp-route-line { width: 0; height: 1px; background: var(--lp-accent); transition: width .6s cubic-bezier(.22, .61, .36, 1); flex: none; }
.lp-route.lp-on .lp-route-line { width: 28px; }
.lp-route-text { opacity: 0; transition: opacity .4s .2s; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-route.lp-on .lp-route-text { opacity: 1; }
.lp-route-text b { font-weight: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; text-decoration-color: color-mix(in srgb, var(--lp-accent) 55%, transparent); }
.lp-route:hover .lp-route-text b { text-decoration-color: var(--lp-accent); }
.lp-route:focus-visible, .lp-step:focus-visible, .lp-aside-toggle:focus-visible, .lp-aside-list a:focus-visible { outline: 2px solid var(--lp-accent); outline-offset: 3px; border-radius: 2px; }
.lp-nav { display: flex; gap: 6px; }
.lp-nav[hidden] { display: none; }
.lp .lp-step { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border-radius: 50%; border: 1px solid var(--lp-line); background: transparent; color: inherit; cursor: pointer; transition: border-color .2s, opacity .2s; }
.lp-step:hover:not(:disabled) { border-color: var(--lp-ink); }
.lp-step:disabled { opacity: .35; cursor: default; }

/* Products. */
.lp-stage { position: relative; min-width: 0; }
.lp-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--lp-cols), minmax(0, 1fr)); gap: 36px var(--lp-gap); align-items: start; }
@container (max-width: 760px) { .lp-grid { --lp-cols: 3; } }
@container (max-width: 520px) { .lp-grid { --lp-cols: 2; --lp-gap: 12px; row-gap: 28px; } }
.lp-grid:empty { display: none; }
.lp-card { min-width: 0; }
.lp-card a { display: grid; gap: 12px; color: inherit; text-decoration: none; }
.lp-card a:focus-visible { outline: 2px solid var(--lp-accent); outline-offset: 4px; border-radius: var(--lp-radius); }
.lp-img { display: block; aspect-ratio: var(--lp-ratio); border-radius: var(--lp-radius); overflow: hidden; background: var(--lp-wash); }
.lp-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.lp[data-ratio="natural"] .lp-img img { height: auto; }
.lp-text { display: grid; gap: 4px; min-width: 0; }
.lp-title { font-size: .9375rem; line-height: 1.35; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lp-card a:hover .lp-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.lp-notes { font-size: .8125rem; line-height: 1.4; color: var(--lp-soft); }
.lp-notes:empty { display: none; }
.lp-price { font-size: .875rem; line-height: 1.3; font-variant-numeric: tabular-nums; margin-top: -4px; }
.lp-price:empty { display: none; }

/* Row: one line of cards that scrolls and snaps, the next card peeking in. */
.lp[data-layout="row"] .lp-grid {
  grid-template-columns: none; grid-auto-flow: column;
  grid-auto-columns: calc((100% - (var(--lp-cols) - 1) * var(--lp-gap)) / (var(--lp-cols) + .3));
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 2px;
}
.lp[data-layout="row"] .lp-grid::-webkit-scrollbar { display: none; }
.lp[data-layout="row"] .lp-card { scroll-snap-align: start; }
@container (max-width: 520px) { .lp[data-layout="row"] .lp-grid { grid-auto-columns: 62%; } }

/* List: compact rows with a thumbnail, two columns when there is room. */
.lp[data-layout="list"] .lp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; border-top: 1px solid var(--lp-line); }
@container (max-width: 640px) { .lp[data-layout="list"] .lp-grid { grid-template-columns: minmax(0, 1fr); } }
.lp[data-layout="list"] .lp-card { border-bottom: 1px solid var(--lp-line); }
.lp[data-layout="list"] .lp-card a { grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 0 16px; padding-block: 14px; }
.lp[data-layout="list"] .lp-price { margin: 0; justify-self: end; }
.lp[data-layout="list"] .lp-title { -webkit-line-clamp: 1; }

/* Set aside: one quiet line under the products that opens into the list and the reason for each. */
.lp-aside { font-size: .875rem; line-height: 1.45; }
.lp-aside[hidden] { display: none; }
.lp .lp-aside-toggle { display: flex; align-items: baseline; gap: 8px; max-width: 100%; padding: 4px 0; margin: 0; border: 0; background: none; font: inherit; color: var(--lp-soft); text-align: left; cursor: pointer; }
.lp-aside-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-aside-label { color: var(--lp-ink); }
.lp-chev { display: inline-grid; transform: translateY(3px); transition: transform .3s cubic-bezier(.22, .61, .36, 1); }
.lp-aside-toggle[aria-expanded="true"] .lp-chev { transform: translateY(3px) rotate(180deg); }
.lp-aside-body { display: grid; grid-template-rows: 0fr; visibility: hidden; transition: grid-template-rows .32s cubic-bezier(.22, .61, .36, 1), visibility 0s .32s; }
.lp-aside-toggle[aria-expanded="true"] + .lp-aside-body { grid-template-rows: 1fr; visibility: visible; transition-delay: 0s; }
.lp-aside-list { list-style: none; margin: 0; padding: 0; overflow: hidden; display: grid; }
.lp-aside-list li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 8px; border-top: 1px solid var(--lp-line); }
.lp-aside-list li:first-child { margin-top: 8px; }
.lp-aside-list a { display: flex; align-items: center; gap: 12px; min-width: 0; color: inherit; text-decoration: none; }
.lp-aside-list a:hover .lp-aside-title { text-decoration: underline; text-underline-offset: 3px; }
.lp-thumb { flex: none; width: 36px; aspect-ratio: var(--lp-ratio); border-radius: min(var(--lp-radius), 6px); overflow: hidden; background: var(--lp-wash); opacity: .75; }
.lp[data-ratio="natural"] .lp-thumb { aspect-ratio: 1; }
.lp-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; filter: grayscale(.6); }
.lp-aside-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-aside-why { flex: none; color: var(--lp-soft); }

.lp-note { margin: 0; font-size: .9375rem; color: var(--lp-soft); }
.lp-note:empty { display: none; }
.lp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; }

/* Floating launcher and its panel: a drawer from the right on wide screens, a bottom sheet on a phone. */
.lp-launch {
  position: fixed; z-index: 2147483000; bottom: max(20px, env(safe-area-inset-bottom)); right: max(20px, env(safe-area-inset-right));
  max-width: calc(100vw - 40px); padding: 13px 20px; margin: 0; border: 0; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: .9375rem; line-height: 1.2; letter-spacing: .005em; text-align: left;
  background: var(--lp-accent-color, var(--lp-page-ink, #000)); color: var(--lp-launch-ink, #fff);
  box-shadow: 0 1px 2px rgb(0 0 0 / .12), 0 10px 30px -10px rgb(0 0 0 / .35);
  transition: transform .25s cubic-bezier(.22, .61, .36, 1), box-shadow .25s, opacity .25s;
}
.lp-launch.lp-away { opacity: 0; transform: translateY(8px); pointer-events: none; visibility: hidden; transition: opacity .25s, transform .25s, visibility 0s .25s; }
.lp-launch[data-position="bottom-left"] { right: auto; left: max(20px, env(safe-area-inset-left)); }
.lp-launch:hover { transform: translateY(-1px); box-shadow: 0 1px 2px rgb(0 0 0 / .12), 0 14px 34px -12px rgb(0 0 0 / .4); }
.lp-launch:focus-visible { outline: 2px solid var(--lp-launch-ink, #fff); outline-offset: -5px; }
html.lp-locked { overflow: hidden; }
.lp-panel {
  --lp-max-width: none;
  position: fixed; inset: 0 0 0 auto; margin: 0; padding: 0; border: 0;
  width: min(460px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh;
  background: var(--lp-page, Canvas); color: var(--lp-page-ink, CanvasText); font: inherit;
  box-shadow: -24px 0 60px -30px rgb(0 0 0 / .35);
  transform: translateX(100%); transition: transform .34s cubic-bezier(.22, .61, .36, 1);
}
.lp-panel.lp-shown { transform: none; }
.lp-panel::backdrop { background: rgb(0 0 0 / .32); opacity: 0; transition: opacity .3s; }
.lp-panel.lp-shown::backdrop { opacity: 1; }
.lp-panel-inner { height: 100%; overflow-y: auto; overscroll-behavior: contain; padding: 28px 28px 40px; }
.lp-panel .lp { gap: 18px; }
.lp-panel .lp-label { padding-right: 44px; font-size: 1.2rem; }
.lp-close { position: absolute; z-index: 1; top: 18px; right: 18px; display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 1px solid transparent; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; }
.lp-close:hover { border-color: color-mix(in srgb, currentColor 18%, transparent); }
.lp-close:focus-visible { outline: 2px solid var(--lp-accent-color, currentColor); outline-offset: 2px; }
@media (max-width: 640px) {
  .lp-panel { inset: auto 0 0 0; width: 100vw; height: auto; max-height: 88dvh; border-radius: 16px 16px 0 0; transform: translateY(100%); box-shadow: 0 -20px 50px -30px rgb(0 0 0 / .4); }
  .lp-panel-inner { max-height: 88dvh; padding: 22px 16px max(28px, env(safe-area-inset-bottom)); }
  .lp-panel-inner::before { content: ""; display: block; width: 36px; height: 4px; margin: -8px auto 14px; border-radius: 2px; background: color-mix(in srgb, currentColor 18%, transparent); }
  .lp-close { top: 22px; right: 10px; }
  .lp-launch { font-size: .875rem; padding: 12px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .lp-route-line, .lp-route-text, .lp-chev, .lp-aside-body, .lp-launch, .lp-panel, .lp-panel::backdrop { transition: none; }
  .lp[data-busy] .lp-pulse { animation: none; }
}
.lp[data-motion="off"] .lp-route-line, .lp[data-motion="off"] .lp-route-text, .lp[data-motion="off"] .lp-chev, .lp[data-motion="off"] .lp-aside-body { transition: none; }
.lp[data-motion="off"][data-busy] .lp-pulse { animation: none; }
.lp-panel:has(.lp[data-motion="off"]), .lp-panel:has(.lp[data-motion="off"])::backdrop { transition: none; }
