/* Nex+ product page. Hub layout. Flat color only. */

.np-home {
  --nav-h: 80px;
  background: var(--bg-primary);
  overflow-x: clip;
}

.np {
  position: relative;
  z-index: 1;
  /* Fixed 80px navbar (styles.css) + hub-style breathing room. */
  padding: calc(var(--nav-h) + 48px) 0 72px;
  min-height: calc(100svh - var(--nav-h));
}

body.np-home.has-site-announcement .np {
  padding-top: calc(var(--nav-h) + var(--site-banner-height, 0px) + 48px);
}

.np-head {
  max-width: 36rem;
  margin-bottom: 28px;
}

.np-title {
  margin: 0 0 12px;
  font-family: Outfit, sans-serif;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--accent-primary);
}

.np-lede {
  margin: 0;
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.55;
}

.np-buy {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 0;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--bg-secondary);
  overflow: hidden;
}

.np-buy-price {
  padding: 22px 22px 24px;
  border-right: 1px solid var(--border-color);
  background: var(--bg-card);
}

.np-badge {
  display: inline-flex;
  margin: 0 0 14px;
  padding: 4px 8px;
  border: 1px solid var(--accent-primary);
  border-radius: 4px;
  color: var(--accent-primary);
  background: var(--bg-primary);
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.np-amount {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}

.np-was {
  font-family: Outfit, sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-muted);
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}

.np-now {
  font-family: Outfit, sans-serif;
  font-size: clamp(2.4rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: #e8c872;
}

.np-per {
  font-size: 0.95rem;
  font-weight: 700;
  color: #c9a24d;
}

.np-note {
  margin: 0 0 18px;
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--text-secondary);
}

.np-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.np-subscribe,
.np-manage,
.np-cancel {
  width: 100%;
  justify-content: center;
}

/* .btn { display: inline-flex } wins over the HTML hidden attribute. */
.np-manage[hidden],
.np-subscribe[hidden],
.np-cancel[hidden] {
  display: none !important;
}

.np-hint {
  margin: 12px 0 0;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.np-error,
.np-success {
  margin: 10px 0 0;
  font-size: 0.85rem;
  font-weight: 600;
}

.np-error { color: var(--danger, #ff4757); }
.np-success { color: var(--success, #2ed573); }

.np-buy-split {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr);
  min-width: 0;
}

.np-col {
  padding: 20px 22px 24px;
  min-width: 0;
}

.np-col-later {
  border-left: 1px solid var(--border-color);
  background: var(--bg-primary);
}

.np-col-title {
  margin: 0 0 12px;
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  color: var(--accent-primary);
}

.np-col-later .np-col-title {
  color: #c9a24d;
}

.np-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.np-list li {
  position: relative;
  padding-left: 14px;
  font-size: 0.9rem;
  line-height: 1.35;
  color: var(--text-primary);
}

.np-list a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.np-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--accent-primary);
}

.np-list-later li {
  color: var(--text-secondary);
}

.np-list-later li::before {
  background: #c9a24d;
}

.np-look {
  margin-top: 18px;
  padding: 18px 20px 16px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--bg-secondary);
}

.np-look-kicker {
  margin: 0 0 4px;
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  color: var(--text-muted);
}

.np-look-sub {
  margin: 0 0 14px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.np-look-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-card);
}

.np-look-avatar {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 0.85rem;
  font-weight: 700;
  color: #e8c872;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
}

.np-look-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.np-look-meta {
  min-width: 0;
  flex: 1;
}

.np-look-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.np-look-handle {
  font-weight: 700;
  color: var(--uname-color, var(--text-primary));
}

/* Shimmer uses transparent fill; keep the listing handle readable here. */
.np-look-handle.nex-username-fx-shimmer {
  color: var(--uname-color, #e8c872) !important;
  -webkit-text-fill-color: var(--uname-color, #e8c872);
}

.np-look-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.np-look-badges:empty,
.np-look-badges[hidden] {
  display: none !important;
}

.np-preview-badge,
.np-preview-nex-plus {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  max-width: 8rem;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1.2;
  height: 18px;
  box-sizing: border-box;
  white-space: nowrap;
  border: 1px solid #c9a24d;
  background: var(--bg-tertiary);
  color: #fbbf24;
  cursor: default;
  appearance: none;
  margin: 0;
  font-family: inherit;
}

.np-fx {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.np-fx-btn {
  padding: 5px 10px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-primary);
  color: var(--text-muted);
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.np-fx-btn:hover {
  border-color: var(--border-light, #3a3a44);
  color: var(--text-secondary);
}

.np-fx-btn.is-on {
  border-color: #c9a24d;
  color: #e8c872;
  background: var(--bg-tertiary);
}

.np-cancel-modal {
  border: none;
  padding: 0;
  margin: auto;
  background: transparent;
  color: var(--text-primary);
  max-width: calc(100vw - 32px);
}

.np-cancel-modal::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

.np-cancel-modal-inner {
  width: min(420px, calc(100vw - 32px));
  padding: 22px 22px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
}

.np-cancel-title {
  margin: 0 0 10px;
  font-family: Outfit, sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.np-cancel-body {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.5;
}

.np-cancel-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.np-cancel-modal-actions .btn {
  flex: 1 1 auto;
  justify-content: center;
}

@media (max-width: 860px) {
  .np-buy,
  .np-buy-split {
    grid-template-columns: 1fr;
  }

  .np-buy-price {
    border-right: 0;
    border-bottom: 1px solid var(--border-color);
  }

  .np-col-later {
    border-left: 0;
    border-top: 1px solid var(--border-color);
  }
}

@media (max-width: 640px) {
  .np {
    padding-top: calc(var(--nav-h) + 24px);
  }

  body.np-home.has-site-announcement .np {
    padding-top: calc(var(--nav-h) + var(--site-banner-height, 0px) + 24px);
  }
}
