/* ---- Icon picker popover (js/icon-picker.js openIconPicker())
   Appended to <body> and positioned absolutely under whichever 🔍 button
   opened it — Inject-event form, Day editor, and the drag-select range
   toolbar below all share this one implementation. ------------------------ */
.icon-picker-popover {
  /* Must beat .record-edit-overlay's z-index: 10001 (css/styles.css) —
     the Day Editor modal that this popover is opened from — or it renders
     invisible/unclickable underneath the modal's overlay background. */
  z-index: 10600;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 24px -8px rgba(20, 30, 55, 0.35);
  padding: 8px;
  width: 260px;
  max-width: 90vw;
}
.icon-picker-search { margin-bottom: 6px; font-size: 13px; }
.icon-picker-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  max-height: 220px;
  overflow-y: auto;
}
.icon-picker-item {
  font-size: 20px;
  line-height: 1;
  padding: 5px 0;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
}
.icon-picker-item:hover { background: var(--cream); border-color: var(--border); }
.icon-picker-empty {
  grid-column: 1 / -1;
  font-size: 11px;
  color: var(--muted);
  padding: 8px 2px;
}

/* ---- Curated/"Browse all emoji" tabs — see the open-source
   emoji-picker-element integration in openIconPicker() (js/admin-
   academic-calendar.js). The curated grid above stays the default,
   fast, Nepali-keyword-searchable pane; this just adds a second one
   for when an admin wants any emoji at all, not only the ~100-icon
   shortlist. --------------------------------------------------------- */
.icon-picker-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 6px;
}
.icon-picker-tab {
  flex: 1;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 4px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--cream);
  color: var(--muted);
  cursor: pointer;
}
.icon-picker-tab.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.icon-picker-pane[hidden] { display: none; }
.icon-picker-all-status {
  font-size: 11px;
  color: var(--muted);
  padding: 16px 4px;
  text-align: center;
}
/* Widened only while the "Browse all emoji" pane is open — the curated
   grid's 260px is too narrow for emoji-picker-element's own search bar
   and category strip. */
.icon-picker-popover.icon-picker-popover--wide {
  width: 352px;
}
.icon-picker-pane[data-pane="all"] emoji-picker {
  width: 100%;
  height: 320px;
  --num-columns: 8;
}
/* ---- "Search unlimited" tab (js/admin-academic-calendar.js —
   ensureEmojiFamilyList()/searchEmojiFamilyList()) — a keyword search
   over emoji.family's full dataset, fetched once per page load and
   filtered locally on every keystroke. Shares .icon-picker-grid/
   .icon-picker-item styling with the curated tab (same 7-column grid,
   same hover state) so results look identical either way. --------------- */
.icon-picker-web-search { margin-bottom: 4px; font-size: 13px; }
.icon-picker-web-status {
  font-size: 11px;
  color: var(--muted);
  padding: 4px 2px 6px;
  text-align: center;
}
.icon-picker-web-grid { max-height: 260px; }
/* FA Icon Search results render actual Font Awesome <i> icons instead
   of emoji text — give them a colour so they read clearly against the
   plain grid instead of sitting flat gray/black. */
.icon-picker-fa-grid .icon-picker-item i { color: var(--gold-dark); font-size: 16px; }
.icon-picker-fa-grid .icon-picker-item:hover i { color: var(--ink); }
