/* ===========================================================
   Nickgram — small additions on top of the demo design system.
   Covers the WordPress-specific bits (search results, pagination,
   form labels) that the static export didn't need.
   =========================================================== */

.ng-results:empty { display: none; }

.ng-search-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.loadmore-wrap { text-align: center; margin-top: 18px; }

.lbl {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 7px;
  color: var(--text-2);
}

/* loading state for buttons (load more / submit) */
.btn.loading,
.btn[disabled] { opacity: .6; pointer-events: none; }
.btn.loading::after {
  content: "";
  width: 14px; height: 14px;
  margin-left: 8px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  display: inline-block;
  vertical-align: -2px;
  animation: ng-spin .6s linear infinite;
}
@keyframes ng-spin { to { transform: rotate(360deg); } }

/* WordPress pagination */
.pagination .nav-links,
.pagination {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  transition: background .15s, border-color .15s;
}
.pagination .page-numbers:hover { border-color: var(--brand); }
.pagination .page-numbers.current {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

/* ----- search: processing state ----- */
/* spinner inside the search/generator box while a query is in flight */
.genbig.searching { position: relative; }
.genbig.searching::after {
  content: "";
  position: absolute;
  right: 16px; top: 50%;
  width: 18px; height: 18px;
  margin-top: -9px;
  border: 2px solid var(--brand);
  border-right-color: transparent;
  border-radius: 50%;
  animation: ng-spin .6s linear infinite;
  pointer-events: none;
}
/* don't let the spinner overlap a trailing clear button */
.genbig.searching .clr { opacity: 0; }

/* skeleton placeholder cards while loading */
.ng-skel-title {
  width: 180px; height: 18px; border-radius: 6px;
  background: var(--surface-2);
  position: relative; overflow: hidden;
}
.ng-skel {
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
}
.ng-skel-line, .ng-skel-row {
  display: block;
  border-radius: 6px;
  background: var(--surface-2);
  position: relative; overflow: hidden;
}
.ng-skel-line { height: 22px; width: 70%; }
.ng-skel-row { height: 32px; width: 100%; }
.ng-skel-title::after,
.ng-skel-line::after,
.ng-skel-row::after {
  content: "";
  position: absolute; inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, oklch(1 0 0 / .18), transparent);
  animation: ng-shimmer 1.2s infinite;
}
@keyframes ng-shimmer { 100% { transform: translateX(100%); } }

/* keep editorial post content inside .prose readable on dark mode */
.ng-body .prose img { border-radius: var(--r-sm); max-width: 100%; height: auto; }

/* -----------------------------------------------------------------
   Mobile overflow guards — long decorated names (꧁༒☬…☬༒꧂) must wrap
   instead of pushing the page wider than the viewport.
   ----------------------------------------------------------------- */
.ng-body { overflow-x: hidden; }

/* flex children need min-width:0 to allow long unbreakable strings to wrap */
.gen-line { min-width: 0; }
.gen-line .gv {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.nick-text,
.ng-search-head .h2,
.hhead .ht,
.sec-title {
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
}
.genbig { min-width: 0; }
.genbig input { min-width: 0; }
.cat, .topic { min-width: 0; }
.cat .cat-name { overflow-wrap: anywhere; }

/* themed emoji / kaomoji grid: flexible cells that wrap long samples */
.emojigrid { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }
.emojigrid .symtile {
  height: auto;
  min-height: 50px;
  padding: 8px 6px;
  font-size: 16px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-align: center;
}
