/* ============================================================
   Nocturx - Marf Disegno MMXXVI
   ============================================================ */

#nx-comments {
  font-family: 'Arquitecta', sans-serif;
  color: #eee;
}

/* ── Formulario ─────────────────────────────────────────── */
.nxc-panel {
  background: #1d1d1d;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 28px;
}
.nxc-meta {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.nxc-meta-field {
  flex: 1;
  min-width: 180px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nxc-meta-field label {
  font-size: 12px;
  color: #b9b9b9;
  font-weight: 700;
  white-space: nowrap;
}
.nxc-meta-field input {
  flex: 1;
  width: 100%;
  background: #2a2a2a;
  border: 1px solid #3a3a3a;
  border-radius: 18px;
  color: #eee;
  font-family: 'Arquitecta', sans-serif;
  font-size: 12px;
  font-weight: 500;
  padding: 8px 14px;
  outline: none;
  transition: border-color .2s ease;
}
.nxc-meta-field input:focus { border-color: #ff621d; }

.nxc-editor-wrap {
  background: #2a2a2a;
  border: 1px solid #3a3a3a;
  border-radius: 10px;
  transition: border-color .2s ease;
}
.nxc-editor-wrap:focus-within { border-color: #ff621d; }
.nxc-editor {
  display: block;
  width: 100%;
  min-height: 88px;
  max-height: 260px;
  overflow-y: auto;
  background: transparent;
  border: none;
  outline: none;
  color: #eee;
  font-family: 'Arquitecta', sans-serif;
  font-size: 14px;
  line-height: 1.55;
  padding: 12px 14px;
  box-sizing: border-box;
  cursor: text;
  white-space: pre-wrap;
  word-wrap: break-word;
}
/* placeholder del editor contenteditable */
.nxc-editor:empty::before {
  content: attr(data-ph);
  color: #777;
  pointer-events: none;
}
/* aviso de moderación / error */
.nxc-notice {
  margin-top: 10px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  padding: 8px 10px;
  border-radius: 8px;
}
.nxc-notice.ok  { color: #ff621d; background: rgba(255, 98, 29, .08); }
.nxc-notice.err { color: #e05c5c; background: rgba(224, 92, 92, .08); }
/* mención al responder una respuesta */
.nxc-replyto { color: #9200b5; font-weight: 700; font-size: 11px; }

.nxc-gif-preview {
  position: relative;
  display: inline-block;
  margin: 0 14px 8px;
}
.nxc-gif-preview img { max-height: 110px; border-radius: 8px; display: block; }
.nxc-gif-preview button {
  position: absolute;
  top: -7px; right: -7px;
  width: 20px; height: 20px;
  border: none; border-radius: 50%;
  background: #ff621d; color: #fff;
  font-size: 12px; line-height: 20px;
  cursor: pointer; padding: 0;
}

.nxc-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px 8px;
}
.nxc-tools { display: flex; align-items: center; gap: 4px; }
.nxc-tool-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #b9b9b9;
  font-size: 17px;
  padding: 5px 8px;
  border-radius: 6px;
  line-height: 1;
  font-family: 'Arquitecta', sans-serif;
  font-weight: 700;
  transition: background .15s ease, color .15s ease;
}
.nxc-tool-btn:hover { background: #3a3a3a; color: #ff621d; }
.nxc-tool-btn.gif-btn { font-size: 11px; letter-spacing: 1px; border: 1.5px solid currentColor; border-radius: 6px; padding: 4px 6px; }
.nxc-submit {
  background: #ff621d;
  color: #fff;
  border: none;
  border-radius: 18px;
  font-family: 'Arquitecta', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 7px 20px;
  cursor: pointer;
  transition: background .2s ease, transform .15s ease;
}
.nxc-submit:hover { background: #9200b5; transform: translateY(-1px); }
.nxc-submit:disabled { opacity: .5; cursor: default; transform: none; }

/* ── Paneles emoji / GIF ────────────────────────────────── */
.nxc-popup {
  background: #232323;
  border: 1px solid #3a3a3a;
  border-radius: 10px;
  margin-top: 8px;
  padding: 10px;
}
.nxc-emoji-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(34px, 1fr));
  gap: 2px;
  max-height: 170px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #555 transparent;
}
.nxc-emoji-grid::-webkit-scrollbar, .nxc-gif-grid::-webkit-scrollbar { width: 7px; height: 0; }
.nxc-emoji-grid::-webkit-scrollbar-thumb, .nxc-gif-grid::-webkit-scrollbar-thumb { background: #555; border-radius: 4px; }
.nxc-emoji-grid::-webkit-scrollbar-track, .nxc-gif-grid::-webkit-scrollbar-track { background: transparent; }
.nxc-emoji-grid button {
  background: none; border: none; cursor: pointer;
  font-size: 20px; padding: 4px; border-radius: 6px;
  transition: background .15s ease, transform .15s ease;
}
.nxc-emoji-grid button:hover { background: #3a3a3a; transform: scale(1.2); }
.nxc-gif-search {
  width: 100%;
  box-sizing: border-box;
  background: #2a2a2a;
  border: 1px solid #3a3a3a;
  border-radius: 18px;
  color: #eee;
  font-family: 'Arquitecta', sans-serif;
  font-size: 12px;
  padding: 8px 14px;
  outline: none;
  margin-bottom: 10px;
}
.nxc-gif-search:focus { border-color: #ff621d; }
.nxc-gif-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  max-height: 230px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #555 transparent;
}
.nxc-gif-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  transition: opacity .15s ease, transform .15s ease;
}
.nxc-gif-grid img:hover { opacity: .8; transform: scale(1.03); }
.nxc-gif-loading {
  display: flex; justify-content: center; align-items: center; padding: 20px;
}
.nxc-gif-loading::after {
  content: '';
  width: 30px; height: 30px;
  border: 3px solid rgba(255,255,255,0.2);
  border-top-color: #ff621d;
  border-radius: 50%;
  animation: nxc-spin .8s linear infinite;
}
@keyframes nxc-spin { to { transform: rotate(360deg); } }

/* ── Barra de conteo y orden (como Waline) ──────────────── */
.nxc-bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.nxc-count {
  font-size: 13px;
  color: #b9b9b9;
  font-weight: 700;
}
.nxc-sort { display: flex; gap: 14px; }
.nxc-sort button {
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Arquitecta', sans-serif;
  font-size: 11px;
  color: #888;
  padding: 0;
  transition: color .15s ease;
}
.nxc-sort button:hover { color: #ff621d; }
.nxc-sort button.active { color: #ff621d; font-weight: 700; }

/* En pantallas pequeñas el orden va vertical y más chico (como el original) */
@media (max-width: 600px) {
  .nxc-bar { align-items: flex-start; }
  .nxc-sort {
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
  }
  .nxc-sort button { font-size: 10px; }
}

/* Emojis Twemoji inline (con respiro entre ellos) */
img.nxc-emoji {
  width: 1.25em;
  height: 1.25em;
  vertical-align: -0.25em;
  display: inline-block;
  margin: 0 2px;
}

/* ── Lista de comentarios ───────────────────────────────── */
.nxc-card {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid #2a2a2a;
}
.nxc-card:last-child { border-bottom: none; }
.nxc-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.nxc-emoji-grid button img { display: block; }
.nxc-card-body { flex: 1; min-width: 0; }
.nxc-card-head {
  display: flex; align-items: baseline; gap: 10px;
  margin-bottom: 4px; flex-wrap: wrap;
}
.nxc-nick { font-size: 13px; font-weight: 700; color: #ff621d; }
.nxc-editor-badge { font-size: 8px; font-weight: 500; letter-spacing: 1px; color: #999; text-transform: uppercase; }
.nxc-text a { color: #9200b5; text-decoration: underline; word-break: break-all; }
.nxc-pin-tag { font-size: 10px; font-weight: 700; letter-spacing: 1px; color: #9200b5; text-transform: uppercase; }
.nxc-date { font-size: 11px; color: #777; }
.nxc-text { font-size: 12px; line-height: 1.6; color: #ddd; word-wrap: break-word; }
.nxc-gif img { max-height: 150px; border-radius: 8px; margin-top: 8px; }
.nxc-actions { display: flex; gap: 14px; margin-top: 7px; }
.nxc-actions button {
  background: none; border: none; cursor: pointer;
  font-family: 'Arquitecta', sans-serif;
  font-size: 11px; font-weight: 700;
  color: #888; padding: 0;
  display: inline-flex; align-items: center; gap: 4px;
  transition: color .15s ease;
}
.nxc-actions button:hover { color: #ff621d; }
.nxc-actions button.liked { color: #ff621d; }
/* corazón del me-gusta más grande (≈ altura de la R de "Responder") */
.nxc-like i {
  font-style: normal;
  font-size: 16px;
  line-height: 1;
}
.nxc-replies { margin-top: 12px; padding-left: 14px; border-left: 2px solid #2a2a2a; }
.nxc-replies .nxc-card { padding: 10px 0; border-bottom: none; }
.nxc-replies .nxc-avatar { width: 30px; height: 30px; font-size: 12px; }
.nxc-reply-box { margin-top: 10px; }
.nxc-reply-box .nxc-panel { padding: 10px; margin-bottom: 0; background: #232323; }
.nxc-empty {
  text-align: center;
  font-size: 13px !important;
  padding-top: 1.75em !important;
  padding-bottom: 26px;
  background: linear-gradient( 90deg, #4e4e4e 10%, #8a8a8a 30%, #ff621d 50%, #8a8a8a 75%, #505050 95%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: nxc-shimmer 5s linear infinite;
}
@keyframes nxc-shimmer {
  0% { background-position: 200% center; }
  100% { background-position: -200% center; }
}
.nxc-error { color: #e05c5c; font-size: 12px; padding: 6px 0; }
