/* CSS Masonry Color Wall — styles for the named-color swatch wall. */

.wall-note {
  margin: -0.5rem 0 1.5rem;
  max-width: 60ch;
  font-size: 0.92rem;
  line-height: 1.55;
  color: #5a5a66;
}
.wall-note code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.85em;
  background: #f1f2f6;
  padding: 0.05em 0.35em;
  border-radius: 5px;
}

.wall-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.wall-filter {
  flex: 1 1 220px;
  min-width: 180px;
  padding: 0.6rem 0.9rem;
  font-size: 0.95rem;
  border: 1px solid #ccc;
  border-radius: 10px;
  outline: none;
}
.wall-filter:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-shadow, rgba(80,130,255,.18)); }

.wall-sort { display: inline-flex; border: 1px solid #ccc; border-radius: 10px; overflow: hidden; }
.sort-btn {
  padding: 0.55rem 0.95rem;
  font-size: 0.9rem;
  font-weight: 600;
  background: #fff;
  color: #444;
  border: none;
  cursor: pointer;
}
.sort-btn + .sort-btn { border-left: 1px solid #ddd; }
.sort-btn:hover { background: #f3f5fa; }
.sort-btn.is-active { background: var(--accent); color: #fff; }

.wall-count { font-size: 0.85rem; color: #777; margin-left: auto; }

/* Masonry: CSS multi-column layout; cards avoid breaking across columns. */
.color-wall {
  column-count: 5;
  column-gap: 16px;
}
@media (max-width: 1100px) { .color-wall { column-count: 4; } }
@media (max-width: 860px)  { .color-wall { column-count: 3; } }
@media (max-width: 600px)  { .color-wall { column-count: 2; } }
@media (max-width: 380px)  { .color-wall { column-count: 1; } }

.color-card {
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  -webkit-appearance: none;
  appearance: none;
  padding: 0;
  break-inside: avoid;
  margin: 0 0 16px;
  background: #fff;
  border: 1px solid #e7e7ee;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.color-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0,0,0,.14); }
.color-card:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* The swatch height is set inline per-card (JS) to create the masonry stagger. */
.color-swatch {
  width: 100%;
  border-bottom: 1px solid rgba(0,0,0,.06);
}

.color-info { padding: 0.7rem 0.8rem 0.85rem; }
.color-name { font-size: 0.98rem; font-weight: 700; color: #222; text-transform: capitalize; }
.color-hex  { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.85rem; color: #555; margin-top: 0.15rem; text-transform: uppercase; }
.color-rgb  { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.78rem; color: #999; margin-top: 0.1rem; }

.wall-empty { color: #888; padding: 2rem 0; }

/* Copy confirmation toast. */
.copy-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 20px);
  background: #1f2533;
  color: #fff;
  padding: 0.6rem 1.1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 50;
}
.copy-toast.show { opacity: 1; transform: translate(-50%, 0); }
