/* WP NIQ Event Scheduler — front-end styles */
body{ font-size: 14px; line-height: 1.5; }
.wnes { --wnes-primary:#2563eb; --wnes-primary-dark:#1d4ed8; --wnes-bg:#f8fafc; --wnes-border:#e2e8f0; --wnes-text:#1e293b; --wnes-muted:#64748b; --wnes-ok:#16a34a; --wnes-warn:#d97706; --wnes-danger:#dc2626; color:var(--wnes-text); max-width:1080px; margin:0 auto; padding:24px 16px; box-sizing:border-box; }
.wnes *, .wnes *::before, .wnes *::after { box-sizing:border-box; }
.wnes h1, .wnes h2, .wnes h3 { color:var(--wnes-text); margin:0 0 .5em; }

/* Buttons */
.wnes-btn { display:inline-flex; align-items:center; gap:8px; justify-content:center; padding:10px 18px; border-radius:8px; border:1px solid transparent; background:var(--wnes-primary); color:#fff !important; font-weight:600; font-size:15px; cursor:pointer; text-decoration:none; line-height:1.2; transition:background .15s; }
.wnes-btn:hover { background:var(--wnes-primary-dark); }
.wnes-btn.secondary { background:#fff; color:var(--wnes-text) !important; border-color:var(--wnes-border); }
.wnes-btn.secondary:hover { background:var(--wnes-bg); }
.wnes-btn.danger { background:var(--wnes-danger); }
.wnes-btn.ghost { background:transparent; color:var(--wnes-primary) !important; }
.wnes-btn[disabled] { opacity:.5; cursor:not-allowed; }
.wnes-btn-lg { padding:18px 42px; font-size:20px; border-radius:12px; }

/* Login hero */
.wnes-login { min-height:55vh; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; gap:18px; }
.wnes-login h1 { font-size:32px; }
.wnes-login p { color:var(--wnes-muted); font-size:17px; margin:0; }

/* Page header */
.wnes-page-head { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; margin-bottom:20px; }

/* Table */
.wnes-table-wrap { overflow-x:auto; border:1px solid var(--wnes-border); border-radius:12px; background:#fff; }
.wnes-table { width:100%; border-collapse:collapse; font-size:14px; }
.wnes-table th, .wnes-table td { padding:12px 14px; text-align:left; border-bottom:1px solid var(--wnes-border); vertical-align:middle; }
.wnes-table th { background:var(--wnes-bg); font-weight:600; color:var(--wnes-muted); white-space:nowrap; }
.wnes-table tr:last-child td { border-bottom:none; }
.wnes-table .wnes-actions { display:flex; gap:8px; }
.wnes-empty { padding:48px 16px; text-align:center; color:var(--wnes-muted); }

/* Badges */
.wnes-badge { display:inline-block; padding:3px 10px; border-radius:999px; font-size:12px; font-weight:600; text-transform:capitalize; }
.wnes-badge.draft { background:#f1f5f9; color:#475569; }
.wnes-badge.sent { background:#dcfce7; color:#15803d; }
.wnes-badge.sending,.wnes-badge.cancelling { background:#fef3c7; color:#b45309; }
.wnes-badge.cancelled,.wnes-badge.bounced,.wnes-badge.spam { background:#fee2e2; color:#b91c1c; }
.wnes-badge.delivered { background:#e0f2fe; color:#0369a1; }
.wnes-badge.opened { background:#ede9fe; color:#6d28d9; }
.wnes-badge.clicked { background:#dcfce7; color:#15803d; }
.wnes-badge.unsubscribed { background:#f3f4f6; color:#4b5563; }

/* Wizard */
.wnes-steps { display:flex; gap:8px; margin-bottom:24px; flex-wrap:wrap; }
.wnes-step { flex:1; min-width:140px; padding:12px 14px; border:1px solid var(--wnes-border); border-radius:10px; background:#fff; display:flex; gap:10px; align-items:center; opacity:.6; }
.wnes-step.active { opacity:1; border-color:var(--wnes-primary); box-shadow:0 0 0 2px rgba(37,99,235,.15); }
.wnes-step.done { opacity:1; }
.wnes-step-num { width:26px; height:26px; flex:0 0 26px; border-radius:50%; background:var(--wnes-bg); color:var(--wnes-muted); display:flex; align-items:center; justify-content:center; font-weight:700; font-size:13px; }
.wnes-step.active .wnes-step-num { background:var(--wnes-primary); color:#fff; }
.wnes-step.done .wnes-step-num { background:var(--wnes-ok); color:#fff; }
.wnes-step-label { font-size:13px; font-weight:600; }

.wnes-card { background:#fff; border:1px solid var(--wnes-border); border-radius:12px; padding:24px; }
.wnes-panel { display:none; }
.wnes-panel.active { display:block; }

/* Forms */
.wnes-field { margin-bottom:18px; }
.wnes-field label { display:block; font-weight:600; font-size:14px; margin-bottom:6px; }
.wnes-field .req { color:var(--wnes-danger); }
.wnes-input, .wnes-select, .wnes-textarea { width:100%; padding:10px 12px; border:1px solid var(--wnes-border); border-radius:8px; font-size:14px; font-family:inherit; background:#fff; }
.wnes-input:focus, .wnes-select:focus, .wnes-textarea:focus { outline:none; border-color:var(--wnes-primary); box-shadow:0 0 0 3px rgba(37,99,235,.12); }
.wnes-row { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.wnes-check { display:flex; align-items:center; gap:10px; padding:12px; background:var(--wnes-bg); border-radius:8px; }
.wnes-check input { width:18px; height:18px; }
.wnes-check label { margin:0; font-size:14px; font-weight:500; }
.wnes-help { font-size:12px; color:var(--wnes-muted); margin-top:4px; }
.wnes-wizard-nav { display:flex; justify-content:space-between; margin-top:24px; gap:12px; }
.select2-container--default .select2-selection--single .select2-selection__rendered{
  font-size:14px;
}
.select2-results__option {
  font-size:14px;
}
/* Recipient option cards */
.wnes-opt { border:1px solid var(--wnes-border); border-radius:10px; padding:16px; margin-bottom:14px; cursor:pointer; }
.wnes-opt.active { border-color:var(--wnes-primary); box-shadow:0 0 0 2px rgba(37,99,235,.12); }
.wnes-opt-head { display:flex; align-items:center; gap:10px; font-weight:600; }
.wnes-opt-body { margin-top:14px; display:none; }
.wnes-opt.active .wnes-opt-body { display:block; }

/* Stats grid */
.wnes-stats { display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:14px; margin:20px 0; }
.wnes-stat { background:#fff; border:1px solid var(--wnes-border); border-radius:12px; padding:18px; text-align:center; }
.wnes-stat .num { font-size:30px; font-weight:700; }
.wnes-stat .lbl { font-size:13px; color:var(--wnes-muted); margin-top:4px; }
.wnes-stat.ok .num { color:var(--wnes-ok); }
.wnes-stat.warn .num { color:var(--wnes-warn); }
.wnes-stat.danger .num { color:var(--wnes-danger); }

/* Notice / progress */
.wnes-notice { padding:12px 14px; border-radius:8px; margin:14px 0; font-size:14px; }
.wnes-notice.ok { background:#dcfce7; color:#15803d; }
.wnes-notice.err { background:#fee2e2; color:#b91c1c; }
.wnes-notice.info { background:#e0f2fe; color:#075985; }
.wnes-progress { height:14px; background:var(--wnes-border); border-radius:999px; overflow:hidden; margin:12px 0; }
.wnes-progress-bar { height:100%; width:0; background:var(--wnes-primary); transition:width .3s; }

.wnes-preview-box { border:1px solid var(--wnes-border); border-radius:10px; padding:18px; background:var(--wnes-bg); }
.wnes-dl { display:grid; grid-template-columns:160px 1fr; gap:8px 16px; margin:0; }
.wnes-dl dt { font-weight:600; color:var(--wnes-muted); }
.wnes-dl dd { margin:0; }
.wnes-spinner { display:inline-block; width:16px; height:16px; border:2px solid rgba(255,255,255,.5); border-top-color:#fff; border-radius:50%; animation:wnes-spin .7s linear infinite; }

div.dt-container .dt-paging .dt-paging-button.current, div.dt-container .dt-paging .dt-paging-button.current:hover {
  background-color: var(--wnes-primary);
  color: #ffffff !important;
}

div.dt-container .dt-paging .dt-paging-button.disabled, div.dt-container .dt-paging .dt-paging-button.disabled:hover, div.dt-container .dt-paging .dt-paging-button.disabled:active
 {
  border-color: var(--wnes-border);
  }

@keyframes wnes-spin { to { transform:rotate(360deg); } }

@media (max-width:640px) {
  .wnes-row { grid-template-columns:1fr; }
  .wnes-step-label { display:none; }
  .wnes-step { min-width:0; }
}
