/* ═══════════════════════════════════════════════════════════
   notify.css — Barra de notificaciones admin para usuarios
   BlogPost365 — incluir en user.php / app.php
═══════════════════════════════════════════════════════════ */

#admin-notify-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 99999;
  transform: translateY(-100%);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
#admin-notify-bar.show { transform: translateY(0); }

.anb-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 20px;
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

/* Colores por tipo */
#admin-notify-bar[data-type="info"]    .anb-inner { background: rgba(6,182,212,0.97);   color: #fff; }
#admin-notify-bar[data-type="warning"] .anb-inner { background: rgba(245,158,11,0.97);  color: #fff; }
#admin-notify-bar[data-type="success"] .anb-inner { background: rgba(16,185,129,0.97);  color: #fff; }
#admin-notify-bar[data-type="update"]  .anb-inner { background: rgba(139,92,246,0.97);  color: #fff; }
/* Default sin tipo */
.anb-inner { background: rgba(99,102,241,0.97); color: #fff; }

.anb-icon    { font-size: 20px; flex-shrink: 0; }
.anb-content { flex: 1; min-width: 0; }
.anb-content strong { font-weight: 700; }

.anb-close {
  background: rgba(255,255,255,0.2);
  border: none;
  color: #fff;
  width: 28px; height: 28px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}
.anb-close:hover { background: rgba(255,255,255,0.35); }

/* ═══════════════════════════════════════════════════════════
   Historial de Notificaciones — sección user.php
   Usa el mismo lenguaje visual que el historial de blogs
═══════════════════════════════════════════════════════════ */

/* Badge en el nav */
.nh-nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  margin-left: auto;
  line-height: 1;
}

/* ── Stats (misma estructura que .bh-stats) ─────────────── */
.nh-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.nh-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  backdrop-filter: var(--blur);
  transition: border-color var(--tr), transform var(--tr);
}
.nh-stat:hover { border-color: var(--border-hi); transform: translateY(-2px); }
.nh-stat-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.nh-stat-total   .nh-stat-icon { background: rgba(99,102,241,0.15);  color: #818cf8; }
.nh-stat-unread  .nh-stat-icon { background: rgba(239,68,68,0.15);   color: #f87171; }
.nh-stat-info    .nh-stat-icon { background: rgba(6,182,212,0.15);   color: #22d3ee; }
.nh-stat-warning .nh-stat-icon { background: rgba(245,158,11,0.15);  color: #fbbf24; }

/* ── Toolbar (mismo estilo que .bh-toolbar) ─────────────── */
.nh-toolbar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 14px 16px;
  margin-bottom: 16px;
}
.nh-toolbar-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.nh-total {
  font-size: 12px;
  color: var(--text-dim);
  white-space: nowrap;
}

/* ── Lista ──────────────────────────────────────────────── */
.nh-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 80px;
}

/* ── Item (mismo estilo que .bh-item) ───────────────────── */
.nh-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 15px 18px 15px 21px;  /* padding-left = 18 + 3 del borde de color */
  display: flex;
  align-items: flex-start;
  gap: 14px;
  cursor: pointer;
  transition: border-color var(--tr), background var(--tr), box-shadow var(--tr);
  backdrop-filter: var(--blur);
  box-shadow: var(--sh-sm);
  position: relative;
  overflow: hidden;              /* necesario para que ::before respete border-radius */
}
.nh-item::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: transparent;
  transition: background var(--tr);
}
.nh-item:hover {
  border-color: var(--border-hi);
  background: rgba(99,102,241,0.04);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

/* Acento lateral por tipo */
.nh-item.nh-type-info::before    { background: #06b6d4; }
.nh-item.nh-type-warning::before { background: #f59e0b; }
.nh-item.nh-type-success::before { background: #10b981; }
.nh-item.nh-type-update::before  { background: #8b5cf6; }
.nh-item.nh-type-default::before { background: #6366f1; }

/* Sin leer: fondo + borde púrpura */
.nh-item.nh-unread {
  background: rgba(99,102,241,0.06);
  border-color: rgba(99,102,241,0.25);
}
.nh-item.nh-unread:hover { background: rgba(99,102,241,0.1); }

/* ── Icono del item ─────────────────────────────────────── */
.nh-item-icon {
  width: 42px; height: 42px;
  min-width: 42px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.nh-item-icon.nh-type-info    { background: rgba(6,182,212,0.15);   color: #06b6d4; }
.nh-item-icon.nh-type-warning { background: rgba(245,158,11,0.15);  color: #f59e0b; }
.nh-item-icon.nh-type-success { background: rgba(16,185,129,0.15);  color: #10b981; }
.nh-item-icon.nh-type-update  { background: rgba(139,92,246,0.15);  color: #8b5cf6; }
.nh-item-icon.nh-type-default { background: rgba(99,102,241,0.15);  color: #818cf8; }

/* ── Cuerpo del item ────────────────────────────────────── */
.nh-item-main { flex: 1; min-width: 0; }

.nh-item-top {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 6px;
}
.nh-item-title {
  flex: 1;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1.4;
  word-break: break-word;
}
.nh-dot {
  width: 8px; height: 8px;
  min-width: 8px;
  border-radius: 50%;
  background: #6366f1;
  flex-shrink: 0;
  margin-top: 5px;  /* alinear con primera línea de texto */
}
.nh-item-msg {
  font-size: 13px;
  color: var(--text-sec);
  line-height: 1.5;
  margin-bottom: 6px;
  word-break: break-word;
}
.nh-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.nh-item-date {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-dim);
}

/* ── Badge tipo (chips como .bh-badge) ──────────────────── */
.nh-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}
.nh-type-badge.nh-type-info    { background: rgba(6,182,212,0.15);   color: #06b6d4;  border: 1px solid rgba(6,182,212,0.3); }
.nh-type-badge.nh-type-warning { background: rgba(245,158,11,0.15);  color: #f59e0b;  border: 1px solid rgba(245,158,11,0.3); }
.nh-type-badge.nh-type-success { background: rgba(16,185,129,0.15);  color: #10b981;  border: 1px solid rgba(16,185,129,0.3); }
.nh-type-badge.nh-type-update  { background: rgba(139,92,246,0.15);  color: #8b5cf6;  border: 1px solid rgba(139,92,246,0.3); }
.nh-type-badge.nh-type-default { background: rgba(99,102,241,0.15);  color: #818cf8;  border: 1px solid rgba(99,102,241,0.3); }

/* Badge "No leída" */
.nh-badge-unread {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  background: rgba(239,68,68,0.15);
  color: #f87171;
  border: 1px solid rgba(239,68,68,0.3);
  white-space: nowrap;
}

/* ── Columna derecha (badge) ────────────────────────────── */
.nh-item-aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

/* ── Estado vacío ───────────────────────────────────────── */
.nh-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 60px 24px;
  color: var(--text-sec);
  text-align: center;
  font-size: 14px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--r);
}
.nh-empty svg { opacity: 0.2; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 700px) {
  .nh-stats { grid-template-columns: repeat(2, 1fr); }
  .nh-type-badge { display: none; }
}
@media (max-width: 480px) {
  .nh-stats { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .nh-stat { padding: 12px 14px; gap: 10px; }
  .nh-stat-icon { width: 36px; height: 36px; }
  .nh-item { padding: 12px 16px 12px 18px; gap: 10px; }
  .nh-item-icon { width: 36px; height: 36px; min-width: 36px; border-radius: 8px; }
  .nh-item-title { font-size: 13px; }
  .nh-item-msg { font-size: 12px; }
  .nh-item-aside { display: none; }
}

/* ── Spinner ────────────────────────────────────────────── */
@keyframes nh-rotate { to { transform: rotate(360deg); } }
.nh-spin { animation: nh-rotate 0.9s linear infinite; }

/* ── Modal: Usuario bloqueado ───────────────────────────── */
#blocked-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2147483640;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
}
#blocked-modal.show { display: flex; }
.bm-card {
  background: #0f0f1a;
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 20px;
  padding: 44px 40px 36px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: 0 0 0 1px rgba(239,68,68,.12), 0 32px 80px rgba(0,0,0,.7);
  animation: bmSlideIn .35s cubic-bezier(.34,1.56,.64,1);
}
@keyframes bmSlideIn {
  from { opacity: 0; transform: translateY(28px) scale(.94); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.bm-icon-wrap {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: rgba(239,68,68,.12);
  border: 2px solid rgba(239,68,68,.3);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 22px;
}
.bm-icon-wrap svg { color: #f87171; }
.bm-title {
  font-size: 20px; font-weight: 700;
  color: #f1f5f9; margin-bottom: 10px; line-height: 1.3;
}
.bm-msg {
  font-size: 14px; color: #94a3b8; line-height: 1.6;
  margin-bottom: 28px;
}
.bm-badge {
  display: inline-block;
  background: rgba(239,68,68,.15);
  color: #f87171;
  border: 1px solid rgba(239,68,68,.3);
  border-radius: 8px;
  font-size: 12px; font-weight: 600;
  padding: 4px 12px; margin-bottom: 24px;
  letter-spacing: .5px; text-transform: uppercase;
}
.bm-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff; border: none; border-radius: 10px;
  padding: 12px 28px; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: opacity .2s;
}
.bm-btn:hover { opacity: .85; }
.bm-footer {
  margin-top: 18px;
  font-size: 12px; color: #475569;
}
