/* ============================================================
   Notes hub organizing layer — mijn-notities.html / en/my-notes.html
   Topic chips, per-topic sections, dates, lesson badges and the
   search field. Generated markup comes from scripts/build-posts.js.
   ============================================================ */

/* topic colors (brand palette from main.css; yellow darkened for contrast) */
[data-tcolor="teal"]   { --nh-c: var(--brand-turquoise); }
[data-tcolor="orange"] { --nh-c: var(--brand-orange); }
[data-tcolor="pink"]   { --nh-c: var(--brand-pink); }
[data-tcolor="yellow"] { --nh-c: #b4870c; }
[data-tcolor="ink"]    { --nh-c: #55504a; }

/* ── topic chips ─────────────────────────────────────────── */
.notes-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 0.75rem;
  margin: 0.5rem 0 0.3rem;
}
.notes-chip {
  font-family: var(--notebook-font);
  font-weight: 700;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  padding: 0.12rem 0.85rem 0.18rem;
  border: 2px solid var(--nh-c);
  color: var(--nh-c);
  background: #fff;
  text-decoration: none;
  border-radius: 14px 8px 16px 9px / 9px 15px 8px 14px;
  transform: rotate(-0.6deg);
  box-shadow: 1.5px 2px 0 rgba(0, 0, 0, 0.08);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.notes-chip:nth-child(2n) { transform: rotate(0.5deg); }
.notes-chip:hover,
.notes-chip:focus-visible {
  transform: rotate(0deg) translateY(-1px);
  box-shadow: 2px 3px 0 rgba(0, 0, 0, 0.12);
}
.notes-chip-count {
  font-size: 0.78em;
  font-weight: 400;
  opacity: 0.75;
}

/* ── search ──────────────────────────────────────────────── */
.notes-search-wrap { margin-top: 1.1rem; }
.notes-search-label {
  display: block;
  font-family: var(--hand-font);
  font-size: 1.25rem;
  color: #55504a;
  margin-bottom: 0.1rem;
}
#notes-search {
  font-family: var(--notebook-font);
  font-size: 1rem;
  width: 100%;
  max-width: 28rem;
  border: none;
  border-bottom: 2px dashed rgba(0, 0, 0, 0.3);
  background: transparent;
  padding: 0.25rem 0.2rem;
  outline: none;
  color: inherit;
}
#notes-search:focus { border-bottom: 2px solid var(--brand-turquoise); }
#notes-search::placeholder { opacity: 0.55; }
.notes-no-results { font-style: italic; opacity: 0.8; }

/* ── topic sections ──────────────────────────────────────── */
.notes-topic { scroll-margin-top: 2.5rem; }
.notes-count {
  font-family: var(--notebook-font);
  font-size: 0.5em;
  font-weight: 400;
  color: var(--nh-c);
  border: 1.5px solid var(--nh-c);
  border-radius: 12px 7px 13px 8px / 8px 12px 7px 11px;
  padding: 0.05em 0.6em 0.1em;
  margin-left: 0.55rem;
  vertical-align: middle;
  white-space: nowrap;
}
.notes-topic .heading-secondary { position: relative; }

/* ── list items: date + lesson badge ─────────────────────── */
.notes-meta {
  margin-left: 0.6rem;
  font-family: var(--notebook-font);
  font-size: 0.8em;
}
.notes-date { color: #8a8378; }
.notes-badge {
  color: var(--brand-pink);
  border: 1.5px solid var(--brand-pink);
  border-radius: 10px 6px 12px 7px / 7px 11px 6px 10px;
  padding: 0 0.5em 0.05em;
  margin-left: 0.55rem;
  white-space: nowrap;
}

/* ── back-to-topics + search filtering ───────────────────── */
.notes-backtotop {
  margin-top: 0.4rem;
  font-family: var(--notebook-font);
  font-size: 0.85rem;
}
.notes-backtotop a { text-decoration: none; opacity: 0.7; }
.notes-backtotop a:hover { opacity: 1; }
.notes-item.is-hidden,
.notes-topic.is-hidden,
.notes-recent.is-hidden { display: none; }

@media (max-width: 600px) {
  .notes-meta { display: block; margin-left: 0; margin-top: 0.1rem; }
}
