/* ============ Colour palette (paleta-kolorow) ============
   The share bar under the image, the eyedropper field in the panel and the
   palette itself: colour blocks with their codes in hairline rows. The rest
   comes from the shared tool components. */

/* Only a click picks a colour; the page scrolls over the image as usual. */
.pk__canvas{cursor:crosshair;touch-action:auto}
.pk__canvas:focus-visible{outline:2px solid var(--olive);outline-offset:3px}

/* ---- share bar: each colour as wide as the part of the image it covers ---- */
.pk__bar{display:flex;height:12px;max-width:100%;border-radius:999px;overflow:hidden;background:rgba(250,250,247,.06)}
.pk__bar:empty{display:none}
.pk__seg{display:block;flex-basis:0;min-width:2px}
.pk__seg + .pk__seg{box-shadow:inset 1px 0 0 rgba(10,10,10,.45)}
.pk__seg--rest{background:repeating-linear-gradient(135deg,rgba(250,250,247,.22) 0 2px,transparent 2px 6px)}

/* ---- eyedropper ---- */
.pk__pick{margin-top:10px;display:grid;grid-template-columns:56px minmax(0,1fr);align-items:center;gap:14px}
.pk__pickSw{width:56px;height:56px;border-radius:var(--r-sm);border:1px solid rgba(250,250,247,.2);transition:background .2s var(--ease)}
.pk__pickSw.is-empty{background:repeating-conic-gradient(var(--ink-3) 0 25%,var(--ink-2) 0 50%) 0 0/12px 12px}
.pk__pickBody{min-width:0}
.pk__pickHex{display:flex;flex-direction:column;gap:3px;font-size:14px;line-height:1.5;color:var(--fg-2)}
.pk__pickCode{font-size:15px;letter-spacing:.04em;color:var(--fg)}
.pk__pickSub{font-size:11px;letter-spacing:.06em;color:var(--fg-3)}
.pk__pickActs{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.pk .gen__action[disabled]{opacity:.45;cursor:default;background:transparent;color:var(--fg);border-color:var(--ghost)}

/* ---- the palette ---- */
.pk__list{list-style:none;display:grid;grid-template-columns:repeat(auto-fill,minmax(186px,1fr));gap:30px 18px}
.pk__sw{display:flex;flex-direction:column;min-width:0}
.pk__block{
  display:flex;flex-direction:column;justify-content:space-between;align-items:flex-start;
  height:136px;padding:12px 14px;border-radius:var(--r-sm);text-align:left;cursor:copy;
  background:var(--c);color:var(--t);box-shadow:inset 0 0 0 1px rgba(250,250,247,.14);
  transition:transform .4s var(--ease-out);
}
.pk__block:focus-visible{outline:2px solid var(--olive);outline-offset:3px}
.pk__num{font-size:11px;letter-spacing:.1em;opacity:.82}
.pk__aa{font-size:32px;line-height:1;font-style:italic;font-weight:900;letter-spacing:-.03em}
.pk__codes{margin-top:12px;border-top:1px solid var(--rule-d)}
.pk__code{
  display:flex;align-items:baseline;gap:10px;width:100%;min-height:38px;padding:10px 0;
  border-bottom:1px solid var(--rule-d);text-align:left;color:var(--fg);cursor:copy;
}
.pk__code:focus-visible{outline:2px solid var(--olive);outline-offset:2px}
.pk__k{flex:none;width:30px;font-size:11px;letter-spacing:.1em;color:var(--fg-3)}
.pk__v{min-width:0;font-size:12px;letter-spacing:.02em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  transition:transform .4s var(--ease-out),color .25s var(--ease)}
.pk__meta{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:32px;margin-top:6px;font-size:11px;letter-spacing:.06em;color:var(--fg-2)}
.pk__rm{min-height:32px;padding:6px 0;font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--fg-2);
  text-decoration:underline;text-decoration-color:var(--ghost);text-underline-offset:3px}
.pk__rm:focus-visible{outline:2px solid var(--olive);outline-offset:2px}
.pk__con{display:flex;flex-direction:column;gap:4px;font-size:11px;line-height:1.4;letter-spacing:.04em;color:var(--fg-3)}
.pk__con .is-best{color:var(--fg)}

.pk__foot{display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:14px 28px}
.pk__foot .tool__note{flex:1 1 420px}
.pk__files{display:flex;flex-wrap:wrap;gap:8px}
.pk__files .gen__action{min-height:40px}

/* Hover only where there is a real pointer: on phones a tap would leave it stuck. */
@media (hover:hover){
  .pk__block:hover{transform:translate3d(0,-4px,0)}
  .pk__code:hover .pk__v{transform:translate3d(4px,0,0);color:var(--olive)}
  .pk__rm:hover{color:var(--olive);text-decoration-color:var(--olive)}
}

@media (max-width:560px){
  .pk__list{grid-template-columns:repeat(2,minmax(0,1fr));gap:26px 14px}
  .pk__block{height:112px}
  .pk__v{font-size:11px}
  .pk__k{width:26px}
}
@media (prefers-reduced-motion:reduce){.pk__block,.pk__v,.pk__pickSw{transition:none}}
