/*!
 * NCT Combiner Pro 1.0.0 — Brand OS styling.
 * Mobile-first. No external dependencies. Scoped to .nct-pro.
 */

.nct-pro {
  --nct-violet: #7C3AED;
  --nct-violet-d: #5B21B6;
  --nct-coral: #FB7185;
  --nct-mint: #34D399;
  --nct-ink: #111827;
  --nct-slate: #4B5563;
  --nct-mist: #E5E7EB;
  --nct-cloud: #F9FAFB;
  --nct-err: #DC2626;
  --nct-grad: linear-gradient(135deg, #7C3AED, #FB7185);
  --nct-card-shadow: 0 4px 16px rgba(17, 24, 39, .08);
  --nct-btn-shadow: 0 4px 12px rgba(124, 58, 237, .30);

  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--nct-ink);
  max-width: 640px;
  margin: 0 auto;
  box-sizing: border-box;
}
.nct-pro *, .nct-pro *::before, .nct-pro *::after { box-sizing: border-box; }

/* The `hidden` attribute must always win — author display values (e.g. the
   flex loading row) otherwise override the UA stylesheet and leak the
   "Blending…" state onto the page before the user presses Generate. */
.nct-pro [hidden] { display: none !important; }

/* ---------- Card ---------- */
.nct-pro__card {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--nct-mist);
  border-radius: 20px;
  box-shadow: 0 8px 28px rgba(17, 24, 39, .10);
  padding: 22px 18px;
}
.nct-pro__card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--nct-grad);
}
.nct-pro__eyebrow {
  margin: 4px 0 16px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--nct-slate);
}

/* ---------- Inputs ---------- */
.nct-pro__fields { display: grid; gap: 12px; margin-bottom: 12px; }
.nct-pro__field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--nct-slate);
  margin-bottom: 6px;
}
.nct-pro__field input {
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  font-size: 16px; /* 16px prevents iOS auto-zoom */
  font-family: inherit;
  color: var(--nct-ink);
  background: var(--nct-cloud);
  border: 1.5px solid var(--nct-mist);
  border-radius: 12px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.nct-pro__field input:focus {
  background: #fff;
  border-color: var(--nct-violet);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, .15);
}
.nct-pro__add {
  justify-self: start;
  min-height: 44px;
  padding: 0 4px;
  background: none;
  border: none;
  color: var(--nct-violet);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

/* ---------- Pills & toggles ---------- */
.nct-pro__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 12px;
}
.nct-pro__pill {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1.5px solid var(--nct-mist);
  background: #fff;
  color: var(--nct-slate);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all .15s ease;
}
.nct-pro__pill.is-on {
  background: var(--nct-violet);
  border-color: var(--nct-violet);
  color: #fff;
}
.nct-pro__toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 14px;
  font-weight: 500;
  color: var(--nct-slate);
  cursor: pointer;
  margin-bottom: 12px;
}
.nct-pro__toggle input {
  width: 22px;
  height: 22px;
  accent-color: var(--nct-violet);
  cursor: pointer;
}

/* ---------- Buttons ---------- */
.nct-pro__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: transform .1s ease, box-shadow .15s ease;
}
.nct-pro__btn:active { transform: scale(.98); }
.nct-pro__btn--primary {
  width: 100%;
  background: var(--nct-grad);
  color: #fff;
  box-shadow: var(--nct-btn-shadow);
}
.nct-pro__btn--ghost {
  background: #fff;
  color: var(--nct-violet);
}
.nct-pro__btn--wa {
  background: var(--nct-mint);
  color: #fff;
  flex: 1;
}
.nct-pro__btn--wa svg { flex: none; }

/* ---------- States ---------- */
.nct-pro__error {
  margin: 12px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: var(--nct-err);
  font-size: 14px;
  font-weight: 500;
}
.nct-pro__loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 28px 0 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--nct-violet);
}
.nct-pro__dots {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 3px solid var(--nct-mist);
  border-top-color: var(--nct-violet);
  animation: nct-spin .7s linear infinite;
}
@keyframes nct-spin { to { transform: rotate(360deg); } }
.nct-pro__empty {
  margin: 20px 4px 4px;
  padding: 20px 16px;
  text-align: center;
  font-size: 15px;
  color: var(--nct-slate);
  background: var(--nct-cloud);
  border: 1.5px dashed var(--nct-mist);
  border-radius: 12px;
}

/* ---------- Results ---------- */
.nct-pro__results { margin-top: 20px; animation: nct-fade .25s ease; }
@keyframes nct-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.nct-pro__results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.nct-pro__results-title {
  font-family: 'Sora', 'Inter', system-ui, sans-serif;
  font-size: 20px;
  font-weight: 600;
}
.nct-pro__count {
  min-width: 32px; height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--nct-cloud);
  border: 1px solid var(--nct-mist);
  font-size: 14px;
  font-weight: 700;
  color: var(--nct-violet);
}
.nct-pro__list { list-style: none; margin: 0 0 4px; padding: 0; display: grid; gap: 8px; }
.nct-pro__row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 10px 18px;
  background: var(--nct-cloud);
  border: 1px solid var(--nct-mist);
  border-radius: 14px;
  transition: border-color .15s ease, background .15s ease;
}
.nct-pro__name {
  flex: 1;
  min-width: 0;
  font-family: 'Sora', 'Inter', system-ui, sans-serif;
  font-size: 18px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.nct-pro__tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--nct-violet-d);
  background: rgba(124, 58, 237, .1);
  padding: 4px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.nct-pro__rowbtns { display: flex; gap: 4px; flex: none; }
.nct-pro__iconbtn {
  width: 44px; height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: none;
  background: var(--nct-mist);
  color: var(--nct-ink);
  cursor: pointer;
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.nct-pro__iconbtn:hover { background: #D7DBE0; }
.nct-pro__iconbtn.is-fav { background: var(--nct-coral); color: #fff; }
.nct-pro__iconbtn.is-copied { background: var(--nct-mint); color: #fff; }
.nct-pro__iconbtn--sm { width: 36px; height: 36px; }

/* ---------- Extras (couple nicknames / hashtags) ---------- */
.nct-pro__extras { display: grid; gap: 12px; margin: 16px 0 4px; }
.nct-pro__extra-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--nct-slate);
  margin-bottom: 8px;
}
.nct-pro__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.nct-pro__chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--nct-cloud);
  border: 1px solid var(--nct-mist);
  font-size: 14px;
  color: var(--nct-ink);
}
.nct-pro__chip strong { color: var(--nct-violet-d); }

/* ---------- Gauge ---------- */
.nct-pro__gauge { text-align: center; margin-bottom: 8px; }
.nct-pro__gauge-wrap { display: inline-block; }
.nct-pro__gauge-num {
  font-family: 'Sora', 'Inter', system-ui, sans-serif;
  font-size: 20px;
  font-weight: 700;
  fill: var(--nct-ink);
}
.nct-pro__gauge-label {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--nct-slate);
}

/* ---------- Actions / stats / favorites ---------- */
.nct-pro__actions { display: flex; gap: 8px; margin-top: 14px; }
.nct-pro__actions .nct-pro__btn--ghost { flex: 0 0 auto; }
.nct-pro__stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.nct-pro__favs { margin-top: 16px; }
.nct-pro__favs-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--nct-slate);
  margin-bottom: 8px;
}
.nct-pro__favs-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.nct-pro__favs-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 6px 6px 14px;
  background: #FFF7ED;
  border: 1px solid #FED7AA;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
}

/* ---------- Desktop refinements ---------- */
@media (min-width: 768px) {
  .nct-pro__card { padding: 32px; }
  .nct-pro__fields { grid-template-columns: 1fr 1fr; }
  .nct-pro__field--third { grid-column: 1 / -1; }
  /* Center the CTA instead of leaving it left-aligned. */
  .nct-pro__btn--primary { display: flex; width: auto; min-width: 280px; margin: 6px auto 0; }
}

/* ---------- Hover polish (pointer devices only) ---------- */
@media (hover: hover) {
  .nct-pro__btn--primary:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(124, 58, 237, .38); }
  .nct-pro__pill:hover { border-color: var(--nct-violet); color: var(--nct-violet-d); }
  .nct-pro__pill.is-on:hover { color: #fff; }
  .nct-pro__row:hover { border-color: #C9CDD4; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .nct-pro__dots { animation: none; }
  .nct-pro__results { animation: none; }
  .nct-pro__btn:active { transform: none; }
}
