/* paletteSearch.css — Block Palettes, tab Cari Warna: masukan warna,
   contoh cepat, dan daftar hasil. */

.bp-search { display: flex; flex-direction: column; gap: var(--space-3); }
.bp-search__top { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--space-4) var(--space-6); }
.bp-search__controls { display: flex; flex-direction: column; gap: var(--space-3); flex: 1 1 260px; min-width: 0; max-width: 460px; }

/* ── roda warna ── */
.bp-wheel { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); flex: 0 0 auto; margin: 0 auto; }
.bp-wheel__disc {
  position: relative; border-radius: 50%; cursor: crosshair; touch-action: none; user-select: none;
  background: var(--bg-inset); box-shadow: 0 0 0 1px var(--border-strong);
}
.bp-wheel__disc:focus-visible { outline: var(--focus-outline); outline-offset: 3px; }
.bp-wheel__canvas { display: block; width: 100%; height: 100%; border-radius: 50%; }
.bp-wheel__marks { position: absolute; inset: 0; pointer-events: none; }
.bp-wheel__mark {
  position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 2px;
  border: 1.5px solid var(--text-primary); box-shadow: 0 0 0 1px var(--bg-base);
}
.bp-wheel__mark.is-best { width: 14px; height: 14px; margin: -7px 0 0 -7px; border-width: 2px; }
.bp-wheel__knob {
  position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; pointer-events: none;
  border: 3px solid var(--text-primary); box-shadow: 0 0 0 1px var(--bg-base), var(--shadow-sm);
}
.bp-wheel__val { display: flex; align-items: center; gap: var(--space-2); width: 100%; }
.bp-wheel__valout { min-width: 3.2em; text-align: right; font: 600 var(--fs-xs) var(--font-mono); color: var(--text-secondary); }

/* ── penggeser RGB ── */
.bp-rgb { display: flex; flex-direction: column; gap: var(--space-2); }
.bp-rgb__row { display: grid; grid-template-columns: 1.4em minmax(0, 1fr) 4.6em; align-items: center; gap: var(--space-2); }
.bp-rgb__ch { font: 700 var(--fs-sm) var(--font-mono); color: var(--text-secondary); text-align: center; }
.bp-rgb__num { min-height: 32px; padding: 0 var(--space-2); font: 600 var(--fs-sm) var(--font-mono); text-align: right; }
.bp-wheel__range, .bp-rgb__range {
  -webkit-appearance: none; appearance: none; flex: 1 1 auto; min-width: 0; height: 14px; margin: 0;
  border-radius: 999px; border: 1px solid var(--border-strong); cursor: pointer;
}
.bp-wheel__range:focus-visible, .bp-rgb__range:focus-visible { outline: var(--focus-outline); }
.bp-wheel__range::-webkit-slider-thumb, .bp-rgb__range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%;
  background: var(--text-primary); border: 3px solid var(--bg-base); box-shadow: 0 0 0 1px var(--border-strong);
}
.bp-wheel__range::-moz-range-thumb, .bp-rgb__range::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--text-primary); border: 3px solid var(--bg-base); box-shadow: 0 0 0 1px var(--border-strong);
}
.bp-search__more { align-self: center; }

/* ── masukan warna ── */
/* flex 0 0 auto: induknya (.bp-search__controls) KOLOM — basis 260px dulu
   menjadi TINGGI dan menyisakan celah kosong besar di bawah kode warna. */
.bp-colorin { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; flex: 0 0 auto; max-width: 420px; }
.bp-colorin__row { display: flex; gap: var(--space-2); align-items: center; }
.bp-colorin__picker {
  width: 44px; height: 36px; padding: 2px; flex: 0 0 auto; cursor: pointer;
  background: var(--bg-inset); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm);
}
.bp-colorin__text {
  flex: 1 1 auto; min-width: 0; min-height: 36px; padding: 0 var(--space-3);
  font: 600 var(--fs-sm) var(--font-mono); color: var(--text-primary); text-transform: none;
  background: var(--bg-inset); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm);
}
.bp-colorin__text:focus { outline: var(--focus-outline); }
.bp-colorin.is-bad .bp-colorin__text { border-color: var(--status-error); }
.bp-colorin__msg { min-height: 0; font-size: var(--fs-xs); color: var(--status-error); }
.bp-colorin__msg:empty { display: none; }

.bp-quick { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.bp-quick .bp-label { margin-right: var(--space-1); }
.bp-quick__sw {
  width: 26px; height: 26px; padding: 0; cursor: pointer;
  border: 2px solid var(--border-strong); border-radius: var(--radius-sm);
}
.bp-quick__sw:hover { transform: scale(1.1); }
.bp-quick__sw:focus-visible { outline: var(--focus-outline); }

/* ── hasil ── */
.bp-hits { display: flex; flex-direction: column; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.bp-hit {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-2) var(--space-3); align-items: center;
  padding: var(--space-3); background: var(--bg-surface);
  border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
}
.bp-hit__cube { grid-row: span 2; }
.bp-hit__info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.bp-hit__name { font-weight: 700; color: var(--text-primary); }
.bp-hit__id, .bp-hit__hex { font: var(--fs-xs) var(--font-mono); color: var(--text-muted); overflow-wrap: anywhere; }
.bp-hit__cmp { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.bp-hit__acts { display: flex; gap: var(--space-1); grid-column: 2; }
.bp-swatch2 { display: flex; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border-strong); }
.bp-swatch2__a, .bp-swatch2__b { width: 30px; height: 26px; }
.bp-hit__score { display: flex; flex-direction: column; line-height: 1.2; }
.bp-hit__sim { font-weight: 700; font-size: var(--fs-sm); }
.bp-hit__dist { font-size: var(--fs-xs); color: var(--text-muted); }
.bp-hit__score.is-same .bp-hit__sim { color: var(--status-success); }
.bp-hit__score.is-close .bp-hit__sim { color: var(--accent-teal-bright); }
.bp-hit__score.is-near .bp-hit__sim { color: var(--status-warn); }
.bp-hit__score.is-far .bp-hit__sim { color: var(--status-error); }
@media (min-width: 760px) {
  .bp-hit { grid-template-columns: auto minmax(0, 1fr) auto auto; }
  .bp-hit__cube { grid-row: auto; }
  .bp-hit__acts { grid-column: auto; }
}
