/* ═══════════════════════════════════════════════════════════════
   Newsletter Manager Pro — Frontend CSS
   ═══════════════════════════════════════════════════════════════ */
/* ── Box-Grundlayout ── */
/* ── Header ── */
/* ── Tabs ── */
/* ── Tab Content ── */
/* ── Felder ── */
/* ── Buttons ── */
/* ── Spinner ── */
/* ── Hinweistext ── */
/* ── Ergebnis-Nachrichten ── */
/* ── Send-Formular-Sektionen ── */
/* ── Rich-Text-Editor ── */
/* ── Upload-Bereich ── */
/* ── Radio-Buttons ── */
/* ── Toggle ── */
/* ── Checkliste ── */
/* ── Formular-Aktionen (Send) ── */
/* ── Error-Box ── */
/* ── Responsive ── */


:root {
  --nl-primary:   #ffc500;
  --nl-primary-h: #ffb500;
  --nl-success:   #27ae60;
  --nl-error:     #e74c3c;
  --nl-warning:   #f39c12;
  --nl-border:    #e2e8f0;
  --nl-bg:        #f8fafc;
  --nl-text:      #1a1a2e;
  --nl-text-m:    #555;
  --nl-text-l:    #888;
  --nl-radius:    14px;
  --nl-radius-sm: 8px;
  --nl-shadow:    0 4px 24px rgba(0,0,0,.08);
}

/* ── Box-Grundlayout ── */
.nl-box {
  max-width: 560px;
  background: #fff;
  border-radius: var(--nl-radius);
  box-shadow: var(--nl-shadow);
  overflow: hidden;
  border: 1px solid var(--nl-border);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--nl-text);
  margin: 20px auto;
}
.nl-send-box {
  max-width: 99%;
}

/* ── Header ── */
.nl-box-header {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--nl-primary), #000000);
  color: #fff;
  padding: 18px 24px;
  font-weight: 700;
  font-size: 16px;
}
.nl-header-send {
  background: linear-gradient(135deg, var(--nl-primary), #000000);
}
.nl-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.nl-sub-counter {
  margin-left: auto;
  font-size: 12px;
  background: rgba(255,255,255,.2);
  padding: 4px 10px;
  border-radius: 100px;
  font-weight: 500;
}

/* ── Tabs ── */
.nl-tabs {
  display: flex;
  border-bottom: 2px solid var(--nl-border);
  background: var(--nl-bg);
}
.nl-tab {
  flex: 1;
  padding: 12px;
  border: none;
  background: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--nl-text-l);
  cursor: pointer;
  transition: all .2s;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}
.nl-tab:hover  { color: var(--nl-primary); }
.nl-tab-active { color: var(--nl-primary); border-bottom-color: var(--nl-primary); }

/* ── Tab Content ── */
.nl-tab-content {
  padding: 24px;
}

/* ── Felder ── */
.nl-form-field {
  margin-bottom: 16px;
}
.nl-form-field label,
.nl-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--nl-text-m);
  margin-bottom: 6px;
}
.nl-req { color: var(--nl-error); }
.nl-field {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--nl-border);
  border-radius: var(--nl-radius-sm);
  font-size: 14px;
  color: var(--nl-text);
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
  box-sizing: border-box;
  font-family: inherit;
}
.nl-field:focus {
  border-color: var(--nl-primary);
  box-shadow: 0 0 0 3px rgba(91,79,255,.12);
  outline: none;
}

/* ── Buttons ── */
.nl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--nl-radius-sm);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  font-family: inherit;
  width: 100%;
  margin-top: 4px;
}
.nl-btn-primary {
  background: var(--nl-primary);
  color: #fff;
}
.nl-btn-primary:hover { background: var(--nl-primary-h); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(91,79,255,.3); }
.nl-btn-outline {
  background: transparent;
  color: var(--nl-primary);
  border: 2px solid var(--nl-primary);
}
.nl-btn-outline:hover { background: var(--nl-primary); color: #fff; }
.nl-btn-send {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  color: #fff;
  font-size: 16px;
  padding: 15px 32px;
}
.nl-btn-send:hover:not(:disabled) {
  background: linear-gradient(135deg, #2d2d5e, #283460);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
}
.nl-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none !important;
}

/* ── Spinner ── */
.nl-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: nl-spin .7s linear infinite;
}
@keyframes nl-spin { to { transform: rotate(360deg); } }

/* ── Hinweistext ── */
.nl-hint-text {
  font-size: 12px;
  color: var(--nl-text-l);
  margin: 4px 0 10px;
}

/* ── Ergebnis-Nachrichten ── */
.nl-result {
  border-radius: var(--nl-radius-sm);
  font-size: 14px;
  font-weight: 500;
  padding: 0;
  overflow: hidden;
  max-height: 0;
  transition: max-height .3s, padding .3s;
}
.nl-result.nl-result-show {
  max-height: 200px;
  padding: 12px 16px;
  margin-bottom: 16px;
}
.nl-result-success { background: #e8f5e9; color: #2e7d32; border-left: 4px solid #2e7d32; }
.nl-result-error   { background: #ffebee; color: #c62828; border-left: 4px solid #c62828; }
.nl-result-warning { background: #fff8e1; color: #e65100; border-left: 4px solid #f39c12; }

/* ── Send-Formular-Sektionen ── */
.nl-form-section {
  padding: 20px 24px;
  border-bottom: 1px solid var(--nl-border);
}
.nl-form-section:last-child { border-bottom: none; }

/* ── Rich-Text-Editor ── */
.nl-editor-toolbar {
  display: flex;
  gap: 2px;
  padding: 8px 10px;
  background: var(--nl-bg);
  border: 1.5px solid var(--nl-border);
  border-bottom: none;
  border-radius: var(--nl-radius-sm) var(--nl-radius-sm) 0 0;
  flex-wrap: wrap;
}
.nl-toolbar-btn {
  padding: 5px 10px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: none;
  cursor: pointer;
  font-size: 13px;
  color: var(--nl-text-m);
  transition: all .15s;
  min-width: 32px;
}
.nl-toolbar-btn:hover { background: #fff; border-color: var(--nl-border); color: var(--nl-primary); }
.nl-toolbar-sep {
  width: 1px;
  background: var(--nl-border);
  margin: 4px 4px;
  display: inline-block;
}
.nl-editor {
  min-height: 220px;
  padding: 14px;
  border: 1.5px solid var(--nl-border);
  border-radius: 0 0 var(--nl-radius-sm) var(--nl-radius-sm);
  font-size: 14px;
  line-height: 1.7;
  color: var(--nl-text);
  outline: none;
  overflow-y: auto;
  transition: border-color .2s;
}
.nl-editor:focus { border-color: var(--nl-primary); }
.nl-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--nl-text-l);
  pointer-events: none;
}

/* ── Upload-Bereich ── */
.nl-upload-area {
  border: 2px dashed var(--nl-border);
  border-radius: var(--nl-radius-sm);
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  color: var(--nl-text-l);
  transition: all .2s;
}
.nl-upload-area:hover, .nl-upload-area.nl-drag-over {
  border-color: var(--nl-primary);
  background: #f0f4ff;
  color: var(--nl-primary);
}
.nl-upload-area svg { margin: 0 auto 10px; display: block; }
.nl-upload-area p { margin: 0; font-size: 13px; }
.nl-upload-link {
  color: var(--nl-primary);
  text-decoration: underline;
  cursor: pointer;
}
.nl-file-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.nl-file-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--nl-bg);
  border-radius: var(--nl-radius-sm);
  border: 1px solid var(--nl-border);
  font-size: 13px;
}
.nl-file-item-name { flex: 1; color: var(--nl-text); }
.nl-file-item-size { color: var(--nl-text-l); font-size: 11px; }
.nl-file-remove {
  background: none;
  border: none;
  color: var(--nl-error);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0 2px;
}

/* ── Radio-Buttons ── */
.nl-radio-group {
  display: flex;
  gap: 20px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.nl-radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--nl-text);
}
.nl-radio-label input[type="radio"] { display: none; }
.nl-radio-custom {
  width: 18px;
  height: 18px;
  border: 2px solid var(--nl-border);
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  position: relative;
  transition: border-color .2s;
}
.nl-radio-label input:checked + .nl-radio-custom {
  border-color: var(--nl-primary);
}
.nl-radio-label input:checked + .nl-radio-custom::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  width: 8px;
  height: 8px;
  background: var(--nl-primary);
  border-radius: 50%;
}
.nl-reply-email-wrap {
  margin-top: 10px;
}

/* ── Toggle ── */
.nl-section-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--nl-primary);
  user-select: none;
}
.nl-section-toggle:hover { opacity: .8; }
.nl-toggle-icon { margin-left: auto; font-size: 12px; transition: transform .2s; }
.nl-toggle-icon.open { transform: rotate(180deg); }
.nl-manual-recipients {
  margin-top: 16px;
  padding: 16px;
  background: var(--nl-bg);
  border-radius: var(--nl-radius-sm);
  border: 1px solid var(--nl-border);
}

/* ── Checkliste ── */
.nl-checklist-section {
  background: linear-gradient(135deg, #fafbff, #f0f4ff);
}
.nl-checklist-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--nl-text);
}
.nl-check-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  padding: 10px 0;
  border-bottom: 1px solid rgba(226,232,240,.7);
  font-size: 14px;
  color: var(--nl-text);
}
.nl-check-label:last-child { border-bottom: none; }
.nl-check-label input[type="checkbox"] { display: none; }
.nl-checkbox-custom {
  width: 20px;
  height: 20px;
  border: 2px solid var(--nl-border);
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
  transition: all .2s;
}
.nl-check-label input:checked + .nl-checkbox-custom {
  background: var(--nl-primary);
  border-color: var(--nl-primary);
}
.nl-check-label input:checked + .nl-checkbox-custom::after {
  content: '✓';
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

/* ── Formular-Aktionen (Send) ── */
.nl-form-actions {
  padding: 24px;
}

/* ── Error-Box ── */
.nl-error-box .nl-box-header {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
}
.nl-error-box .nl-tab-content,
.nl-error-box p {
  padding: 24px;
  color: var(--nl-error);
  font-weight: 500;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .nl-send-box { margin: 10px; }
  .nl-form-section { padding: 16px; }
  .nl-radio-group { flex-direction: column; gap: 10px; }
}
