/* ─── Rating Popup ──────────────────────────────────────────────────────────── */
#nc-rating-popup {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  width: 300px;
  background: var(--card, #fff);
  border: 1px solid var(--card-bd, #e2e8f0);
  border-radius: 18px;
  box-shadow: 0 8px 40px rgba(0,0,0,.14), 0 2px 8px rgba(0,0,0,.08);
  padding: 22px 20px 18px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  transform: translateY(calc(100% + 32px));
  opacity: 0;
  transition: transform .45s cubic-bezier(.34,1.56,.64,1), opacity .35s ease;
  pointer-events: none;
}

#nc-rating-popup.nc-rp-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}

#nc-rating-popup.nc-rp-hidden {
  transform: translateY(calc(100% + 32px));
  opacity: 0;
  pointer-events: none;
}

.nc-rp-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 24px;
  height: 24px;
  border: none;
  background: var(--bg-2, #f8fafc);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3, #94a3b8);
  font-size: 14px;
  line-height: 1;
  transition: background .15s, color .15s;
  padding: 0;
}
.nc-rp-close:hover { background: var(--bg-3, #f1f5f9); color: var(--text, #0f172a); }

.nc-rp-emoji {
  font-size: 28px;
  margin-bottom: 6px;
  line-height: 1;
}

.nc-rp-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text, #0f172a);
  margin-bottom: 3px;
}

.nc-rp-sub {
  font-size: 12px;
  color: var(--text-3, #94a3b8);
  margin-bottom: 16px;
}

/* Stars */
.nc-rp-stars {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  justify-content: center;
}

.nc-rp-star {
  font-size: 32px;
  cursor: pointer;
  transition: transform .15s, filter .15s;
  line-height: 1;
  color: #e2e8f0;
  user-select: none;
  -webkit-user-select: none;
  filter: grayscale(1);
}

.nc-rp-star:hover,
.nc-rp-star.nc-s-hover,
.nc-rp-star.nc-s-active {
  transform: scale(1.2);
  filter: grayscale(0);
  color: #f59e0b;
}

.nc-rp-star.nc-s-active { transform: scale(1.15); }

/* Submit button */
.nc-rp-btn {
  width: 100%;
  padding: 10px;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, opacity .15s;
  opacity: .45;
  pointer-events: none;
}
.nc-rp-btn.nc-rp-ready {
  opacity: 1;
  pointer-events: all;
}
.nc-rp-btn.nc-rp-ready:hover { background: #1d4ed8; }

/* Later link */
.nc-rp-later {
  display: block;
  text-align: center;
  margin-top: 10px;
  font-size: 11px;
  color: var(--text-3, #94a3b8);
  cursor: pointer;
  transition: color .15s;
  background: none;
  border: none;
  width: 100%;
  padding: 2px;
}
.nc-rp-later:hover { color: var(--text-2, #475569); }

/* Success state */
.nc-rp-success {
  text-align: center;
  padding: 8px 0 6px;
}
.nc-rp-success-stars {
  font-size: 22px;
  margin-bottom: 8px;
  letter-spacing: 2px;
}
.nc-rp-success-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text, #0f172a);
  margin-bottom: 4px;
}
.nc-rp-success-sub {
  font-size: 12px;
  color: var(--text-3, #94a3b8);
}

/* Dark mode */
[data-theme=dark] #nc-rating-popup {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 8px 40px rgba(0,0,0,.4), 0 2px 8px rgba(0,0,0,.3);
}
[data-theme=dark] .nc-rp-close { background: #0f172a; }
[data-theme=dark] .nc-rp-star { color: #334155; }

/* Mobile */
@media (max-width: 480px) {
  #nc-rating-popup {
    bottom: 12px;
    right: 12px;
    left: 12px;
    width: auto;
  }
}
