/* =========================
   FRONTEND STYLES
========================= */
.wpt-ns {
  --wpt-ns-strip: #24245A;   /* navy strip */
  --wpt-ns-accent: #BA9A55;  /* gold */
  --wpt-ns-stripe: #F4F5F5;  /* alternating row */

  --wpt-ns-header-h: 44px;
  --wpt-ns-footer-h: 56px;

  width: 100%;
  max-width: 100%;
  border: 1px solid #d8dce3;
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
}

.wpt-ns .wpt-ns__header {
  background: var(--wpt-ns-strip);
  color: #fff;
  padding: 12px 14px;
  font-weight: 600;
  font-size: 14px;
  height: var(--wpt-ns-header-h);
  display: flex;
  align-items: center;
}

.wpt-ns .wpt-ns__body {
  height: calc(var(--wpt-ns-height, 360px) - var(--wpt-ns-header-h) - var(--wpt-ns-footer-h));
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.wpt-ns .wpt-ns__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.wpt-ns .wpt-ns__item {
  padding: 14px;
  font-size: 14px;
  border-bottom: 1px solid #eef1f5;
  color: #1d2327;
  background: #fff;

  /* NEW badge on right */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.wpt-ns .wpt-ns__item:nth-child(even) {
  background: var(--wpt-ns-stripe);
}

.wpt-ns .wpt-ns__itemText {
  flex: 1;
  min-width: 0;
}

.wpt-ns .wpt-ns__empty {
  padding: 16px;
  color: #6b7280;
}

/* Blinking multi-colour NEW badge */
.wpt-ns .wpt-ns__badge-new {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.6px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #111;
  border: 1px solid rgba(0,0,0,0.15);
  animation: wpt-ns-new-blink 1.1s infinite;
  white-space: nowrap;
}

@keyframes wpt-ns-new-blink {
  0%   { background: #ff3b30; color: #fff; opacity: 1; }
  25%  { background: #ffcc00; color: #111; opacity: 1; }
  50%  { background: #34c759; color: #fff; opacity: 1; }
  75%  { background: #0a84ff; color: #fff; opacity: 1; }
  100% { background: #ff3b30; color: #fff; opacity: 1; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .wpt-ns .wpt-ns__badge-new {
    animation: none !important;
  }
}

.wpt-ns .wpt-ns__footer {
  height: var(--wpt-ns-footer-h);
  background: var(--wpt-ns-strip);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Reset button so Elementor/theme can't override */
.wpt-ns .wpt-ns__down {
  all: unset;
  box-sizing: border-box;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 2px solid var(--wpt-ns-accent);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wpt-ns .wpt-ns__down:hover {
  background: rgba(186, 154, 85, 0.12);
}

.wpt-ns .wpt-ns__down:focus-visible {
  outline: 2px solid rgba(186, 154, 85, 0.7);
  outline-offset: 2px;
}

.wpt-ns .wpt-ns__downSvg {
  width: 22px !important;
  height: 22px !important;
  display: block !important;
}

/* =========================
   ADMIN (BACKEND) STYLES
========================= */
body.wp-admin .wpt-ns-admin-wrap {
  max-width: 980px;
}

body.wp-admin .wpt-ns-admin-status {
  margin: 8px 0 10px;
  min-height: 18px;
  color: #1d2327;
}

body.wp-admin .wpt-ns-admin-sortable {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid #dcdcde;
  background: #fff;
}

body.wp-admin .wpt-ns-admin-item {
  display: grid;
  grid-template-columns: 34px 1fr 90px 90px;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid #f0f0f1;
}

body.wp-admin .wpt-ns-admin-item:last-child {
  border-bottom: 0;
}

body.wp-admin .wpt-ns-admin-handle {
  cursor: move;
  color: #50575e;
  font-size: 18px;
  line-height: 1;
}

body.wp-admin .wpt-ns-admin-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.wp-admin .wpt-ns-admin-new {
  display: flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}

body.wp-admin .wpt-ns-admin-delete {
  margin: 0;
  justify-self: end;
}

body.wp-admin .wpt-ns-admin-item.ui-sortable-helper {
  background: #f6f7f7;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}
