/* MODULE: admin-newsletter – Newsletter-Admin UI
══════════════════════════════════════════════════════════════ */

.nl-meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.nl-meta strong { color: var(--text); }

.nl-group {
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-card);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.nl-group:hover {
  border-color: rgba(0,0,0,0.12);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.nl-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.nl-group-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 17px;
  letter-spacing: 0.03em;
  color: var(--text);
}
.nl-group-count {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: 6px;
  font-weight: 500;
}
.nl-group-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.nl-group-actions .btn {
  font-size: 12px;
  padding: 5px 10px;
}

.nl-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.nl-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
}
.nl-list-item:first-child { border-top: none; }
.nl-list-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent, #FF6B00);
  flex-shrink: 0;
  cursor: pointer;
}
.nl-thumb {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  background: var(--bg-3);
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.nl-item-body { flex: 1; min-width: 0; }
.nl-item-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nl-item-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}
.nl-empty {
  padding: 14px;
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
}

.nl-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.nl-btn-row .btn { font-size: 13px; }

.nl-history {
  margin-top: 16px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.nl-history-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: var(--text);
  margin-bottom: 8px;
}
.nl-history-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.nl-history-item {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  padding: 8px 0;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px dashed var(--border);
}
.nl-history-item:first-child { border-top: none; }
.nl-history-subject {
  font-weight: 600;
  color: var(--text);
  flex: 1 1 200px;
  min-width: 0;
}

.nl-hint {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  margin: 6px 0 10px;
}

/* ── Preview Modal ────────────────────────────────────────── */
.nl-preview-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 600;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.nl-preview-modal.is-open { display: flex; }
.nl-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
}
.nl-preview-panel {
  position: relative;
  background: var(--bg-card, #fff);
  border-radius: 12px;
  width: 100%;
  max-width: 720px;
  max-height: 88vh;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.nl-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.nl-preview-title {
  font-family: var(--font-display, 'Bebas Neue', sans-serif);
  font-size: 20px;
  letter-spacing: 0.04em;
  color: var(--text);
}
.nl-preview-close {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--bg-2);
  border-radius: 50%;
  font-size: 18px;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nl-preview-close:hover { background: var(--bg-3); }
.nl-preview-body {
  flex: 1;
  overflow: hidden;
  background: #eee;
}
.nl-preview-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #fff;
}
.nl-preview-footer {
  padding: 10px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .nl-preview-modal { padding: 0; }
  .nl-preview-panel { max-width: 100%; max-height: 100vh; border-radius: 0; }
}
