/* /themes/ — themed palette collection */

/* Filter chips */
.pal-filters {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  margin: 4px 0 10px;
}
.pal-filter {
  background: var(--surface); color: var(--text-muted);
  border: 1px solid var(--border); border-radius: 99px;
  padding: 7px 14px; font-size: 13px; font-weight: 600; cursor: pointer;
  font-family: inherit;
  transition: border-color .15s, color .15s, background .15s;
}
.pal-filter span {
  font-family: var(--mono); font-size: 10.5px; margin-left: 3px; opacity: .7;
}
.pal-filter:hover { border-color: var(--text); color: var(--text); }
.pal-filter.active {
  background: var(--accent); border-color: var(--accent);
  color: var(--accent-text);
}

/* Category sections */
.pal-section { padding: 26px 0 8px; }
.pal-section .section-head { margin-bottom: 16px; }
.pal-section .section-head .kicker { margin-bottom: 6px; }
.pal-section .section-head p { margin: 2px 0 0; font-size: 14px; max-width: 560px; }
.pal-section[hidden] { display: none; }

/* Palette grid */
.pal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
  gap: 16px;
}

/* Card */
.pal-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  transition: transform .15s, border-color .15s;
}
.pal-card:hover { transform: translateY(-2px); border-color: var(--accent); }

/* Swatch strip */
.pal-strip { display: flex; height: 88px; }
.pal-swatch {
  flex: 1; border: 0; padding: 0; cursor: pointer; position: relative;
  transition: flex-grow .18s ease;
  min-width: 0;
}
.pal-swatch code {
  position: absolute; left: 50%; bottom: 7px; transform: translateX(-50%);
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .02em;
  color: #fff; opacity: 0; transition: opacity .15s;
  pointer-events: none; white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .45);
}
.pal-swatch-dark code { color: #16161d; text-shadow: 0 1px 2px rgba(255, 255, 255, .4); }
.pal-swatch:hover, .pal-swatch:focus-visible { flex-grow: 2.1; }
.pal-swatch:hover code, .pal-swatch:focus-visible code { opacity: 1; }
.pal-swatch:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }

/* Meta row */
.pal-meta {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 10px; padding: 12px 14px 13px;
}
.pal-meta h3 { margin: 0 0 3px; font-size: 15px; letter-spacing: -.01em; }
.pal-meta p { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--text-muted); }
.pal-copy {
  flex-shrink: 0; background: none; color: var(--text-muted);
  border: 1px solid var(--border); border-radius: 99px;
  padding: 4px 11px; font-size: 12px; font-weight: 700; cursor: pointer;
  font-family: inherit;
  transition: border-color .15s, color .15s;
}
.pal-copy:hover { border-color: var(--accent); color: var(--accent); }

@media (max-width: 640px) {
  .pal-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .pal-strip { height: 68px; }
  .pal-meta { padding: 10px 12px 11px; flex-direction: column; gap: 8px; }
  .pal-filters { justify-content: flex-start; }
}
