/* Ninja Pinner Checkout - pricing section, cart drawer, checkout + thank-you pages.
   Every selector is prefixed npco- so nothing leaks into the theme. */

.npco-pricing, .npco-drawer, .npco-page, .npco-toast {
  --npco-navy: #2c3e50;
  --npco-ink: #1f2d3a;
  --npco-text: #44525f;
  --npco-muted: #7b8794;
  --npco-line: #e3e8ee;
  --npco-soft: #f4f7fa;
  --npco-blue: #3498db;
  --npco-blue-d: #2471a8;
  --npco-blue-l: #e8f3fb;
  --npco-green: #1e8e4e;
  --npco-green-l: #e7f6ee;
  --npco-red: #c0392b;
  --npco-red-l: #fdecea;
  --npco-radius: 12px;
  --npco-shadow: 0 6px 24px rgba(31, 45, 58, .08);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--npco-text);
  line-height: 1.5;
  box-sizing: border-box;
}
.npco-pricing *, .npco-drawer *, .npco-page *, .npco-toast * { box-sizing: border-box; }
[data-npco-block][hidden], .npco-pricing [hidden], .npco-drawer [hidden], .npco-page [hidden] { display: none !important; }
.npco-ico { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }

/* ---------- buttons ---------- */
.npco-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  background: var(--npco-blue); color: #fff !important; border: 0; border-radius: 8px;
  padding: .8em 1.4em; font: inherit; font-weight: 700; font-size: 1rem; line-height: 1.2;
  text-decoration: none !important; cursor: pointer; transition: background .15s, transform .15s, box-shadow .15s;
  text-transform: none; letter-spacing: 0; margin: 0; min-height: 0;
}
.npco-btn:hover { background: var(--npco-blue-d); }
.npco-btn:focus-visible { outline: 3px solid rgba(52, 152, 219, .45); outline-offset: 2px; }
.npco-btn:disabled { opacity: .6; cursor: wait; }
.npco-btn-block { display: flex; width: 100%; }
.npco-btn-big { font-size: 1.1rem; padding: 1em 1.4em; }
.npco-btn-soft { background: var(--npco-blue-l); color: var(--npco-blue-d) !important; }
.npco-btn-soft:hover { background: #d6eaf8; }
.npco-btn-ghost { background: transparent; color: var(--npco-blue-d) !important; padding: .5em .2em; }
.npco-btn-ghost:hover { background: transparent; text-decoration: underline !important; }
.npco-link { color: var(--npco-blue-d); text-decoration: none; font-size: .92rem; }
.npco-link:hover { text-decoration: underline; }

/* ---------- pricing section (inside the theme page) ---------- */
.npco-pricing { max-width: 1140px; margin: 0 auto; padding: 1.5rem 1rem 2.5rem; }
.npco-h { text-align: center; color: var(--npco-navy); font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 800; margin: 1.2rem 0 1.4rem; line-height: 1.2; }
.npco-products { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; max-width: 900px; margin: 0 auto 2.2rem; }
.npco-product {
  display: flex; flex-direction: column; align-items: center; gap: .2rem;
  background: #fff; border: 2px solid var(--npco-line); border-radius: var(--npco-radius);
  padding: 1.1rem .6rem; cursor: pointer; font: inherit; color: inherit; margin: 0;
  transition: border-color .15s, box-shadow .15s, transform .15s; text-transform: none; letter-spacing: 0; min-height: 0;
}
.npco-product:hover { transform: translateY(-3px); box-shadow: var(--npco-shadow); }
.npco-product.is-active { border-color: var(--npco-blue); background: var(--npco-blue-l); box-shadow: 0 0 0 3px rgba(52, 152, 219, .15); }
.npco-product img { width: 52px; height: 52px; object-fit: contain; margin-bottom: .45rem; }
.npco-product-name { font-weight: 800; color: var(--npco-navy); font-size: 1.08rem; }
.npco-product-for { font-size: .88rem; color: var(--npco-muted); }

.npco-tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; align-items: stretch; }
.npco-tier {
  position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--npco-line);
  border-radius: 16px; padding: 1.8rem 1.6rem 1.6rem; box-shadow: var(--npco-shadow); text-align: center;
}
.npco-tier.is-popular { border: 2px solid var(--npco-blue); box-shadow: 0 12px 36px rgba(52, 152, 219, .2); }
.npco-ribbon {
  position: absolute; top: -.85rem; left: 50%; transform: translateX(-50%); background: var(--npco-blue); color: #fff;
  font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: .3rem .9rem; border-radius: 99px; white-space: nowrap;
}
.npco-tier-title { color: var(--npco-navy); font-size: 1.3rem; font-weight: 800; margin: .2rem 0 0; line-height: 1.25; }
.npco-tier-for { margin: .2rem 0 0; color: var(--npco-muted); font-size: .92rem; }
.npco-tier-for b { color: var(--npco-blue-d); }
.npco-tier-price { font-size: 3.2rem; font-weight: 800; color: var(--npco-ink); margin: .7rem 0 .2rem; line-height: 1; }
.npco-tier-price span { font-size: 1.6rem; vertical-align: .9em; margin-right: .08em; }
.npco-tier-desc { color: var(--npco-muted); margin: .3rem 0 1rem; min-height: 3em; }
.npco-tier-features { list-style: none; margin: 0 0 1.4rem; padding: 0; text-align: left; flex: 1; }
.npco-tier-features li { display: flex; gap: .6rem; align-items: flex-start; padding: .5rem 0; border-bottom: 1px dashed var(--npco-line); color: var(--npco-ink); margin: 0; }
.npco-tier-features li:last-child { border-bottom: 0; }
.npco-tier-features .npco-ico { color: var(--npco-green); margin-top: .15em; }

.npco-trust-strip, .npco-trust { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 1rem; }
.npco-trust-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--npco-soft); border-radius: var(--npco-radius); padding: 1.2rem 1.4rem; }
.npco-trust-strip li, .npco-trust li { display: flex; gap: .7rem; align-items: flex-start; margin: 0; font-size: .9rem; color: var(--npco-muted); }
.npco-trust-strip b, .npco-trust b { display: block; color: var(--npco-ink); font-size: .95rem; }
.npco-trust-strip .npco-ico, .npco-trust .npco-ico { color: var(--npco-blue); width: 1.5rem; height: 1.5rem; margin-top: .1rem; }

@media (max-width: 900px) {
  .npco-tiers { grid-template-columns: 1fr; max-width: 440px; margin: 0 auto; gap: 1.8rem; }
  .npco-trust-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .npco-products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
  .npco-trust-strip { grid-template-columns: 1fr; }
}

/* ---------- header cart badge ---------- */
.npco-badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 1.45em; height: 1.45em; padding: 0 .4em;
  margin-left: .45em; border-radius: 99px; background: #fff; color: #2471a8; font-size: .8em; font-weight: 800; line-height: 1;
}

/* ---------- cart drawer ---------- */
.npco-overlay { position: fixed; inset: 0; background: rgba(20, 30, 40, .45); opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 99998; }
.npco-overlay.is-open { opacity: 1; pointer-events: auto; }
.npco-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100vw); background: #fff; z-index: 99999;
  display: flex; flex-direction: column; transform: translateX(105%); transition: transform .28s ease; box-shadow: -10px 0 40px rgba(0, 0, 0, .18);
}
.npco-drawer.is-open { transform: none; }
.npco-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.2rem; border-bottom: 1px solid var(--npco-line); }
.npco-drawer-head h2 { margin: 0; font-size: 1.25rem; color: var(--npco-navy); font-weight: 800; }
.npco-x { background: none; border: 0; font-size: 1.8rem; line-height: 1; color: var(--npco-muted); cursor: pointer; padding: .2rem .4rem; margin: 0; min-height: 0; }
.npco-x:hover { color: var(--npco-ink); background: none; }
.npco-drawer-body { flex: 1; overflow-y: auto; padding: 1rem 1.2rem; }
.npco-added { display: flex; gap: .55rem; align-items: center; background: var(--npco-green-l); color: var(--npco-green); border-radius: 8px; padding: .6rem .8rem; font-weight: 600; font-size: .92rem; margin-bottom: 1rem; }
.npco-drawer-foot { border-top: 1px solid var(--npco-line); padding: 1rem 1.2rem 1.2rem; background: #fff; }
.npco-drawer-sum { display: flex; justify-content: space-between; font-size: 1.1rem; font-weight: 800; color: var(--npco-ink); margin-bottom: .2rem; }
.npco-drawer-note { font-size: .84rem; color: var(--npco-muted); margin: 0 0 .9rem; }
.npco-drawer-foot .npco-btn-ghost { display: block; width: 100%; text-align: center; margin-top: .4rem; }

/* ---------- cart lines (drawer + checkout) ---------- */
.npco-lines { display: flex; flex-direction: column; }
.npco-line { display: grid; grid-template-columns: 44px 1fr auto; gap: .8rem; align-items: center; padding: .85rem 0; border-bottom: 1px solid var(--npco-line); }
.npco-line:first-child { padding-top: 0; }
.npco-line img { width: 44px; height: 44px; object-fit: contain; }
.npco-line-name { font-weight: 700; color: var(--npco-ink); line-height: 1.3; }
.npco-line-sub { font-size: .85rem; color: var(--npco-muted); }
.npco-line-right { text-align: right; }
.npco-line-price { font-weight: 800; color: var(--npco-ink); }
.npco-line-tools { display: flex; align-items: center; gap: .6rem; margin-top: .35rem; }
.npco-qty { display: inline-flex; align-items: center; border: 1px solid var(--npco-line); border-radius: 8px; overflow: hidden; }
.npco-qty button { background: var(--npco-soft); border: 0; width: 30px; height: 30px; font-size: 1.1rem; line-height: 1; color: var(--npco-ink); cursor: pointer; padding: 0; margin: 0; min-height: 0; }
.npco-qty button:hover { background: var(--npco-line); }
.npco-qty button:disabled { color: #bbb; cursor: default; }
.npco-qty span { min-width: 30px; text-align: center; font-weight: 700; font-size: .95rem; }
.npco-remove { background: none; border: 0; color: var(--npco-muted); font-size: .84rem; cursor: pointer; text-decoration: underline; padding: 0; margin: 0; min-height: 0; text-transform: none; letter-spacing: 0; }
.npco-remove:hover { color: var(--npco-red); background: none; }
.npco-tier-pick { font: inherit; font-size: .85rem; border: 1px solid var(--npco-line); border-radius: 6px; padding: .1rem .3rem; color: var(--npco-text); background: #fff; max-width: 100%; height: auto; margin: 0; }

.npco-xsell { margin-top: 1.4rem; }
.npco-xsell h3 { font-size: .95rem; color: var(--npco-navy); margin: 0 0 .6rem; font-weight: 800; }
.npco-xsell-item { display: grid; grid-template-columns: 36px 1fr auto; gap: .7rem; align-items: center; padding: .55rem .7rem; border: 1px dashed var(--npco-line); border-radius: 10px; margin-bottom: .5rem; }
.npco-xsell-item img { width: 36px; height: 36px; object-fit: contain; }
.npco-xsell-item b { color: var(--npco-ink); display: block; line-height: 1.2; }
.npco-xsell-item small { color: var(--npco-muted); }
.npco-xsell-item .npco-btn { padding: .45em .8em; font-size: .88rem; }

/* ---------- full pages ---------- */
body.npco-page { margin: 0; background: #f2f5f8; min-height: 100vh; display: flex; flex-direction: column; }
.npco-top { background: #fff; border-bottom: 1px solid var(--npco-line); }
.npco-top-in { max-width: 1080px; margin: 0 auto; padding: .7rem 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.npco-logo img { display: block; height: 44px; width: auto; }
.npco-top-secure { display: inline-flex; gap: .4rem; align-items: center; color: var(--npco-green); font-weight: 700; font-size: .92rem; }
.npco-admin { background: #fff8e1; color: #6d5200; font-size: .85rem; text-align: center; padding: .45rem 1rem; border-bottom: 1px solid #f1e2a6; }
.npco-admin a { color: inherit; }
.npco-main { flex: 1; }
.npco-wrap { max-width: 1080px; margin: 0 auto; padding: 1.6rem 1rem 3rem; }
.npco-narrow { max-width: 760px; }
.npco-foot { text-align: center; font-size: .88rem; color: var(--npco-muted); padding: 1.4rem 1rem 2rem; }
.npco-foot a { color: var(--npco-blue-d); }
.npco-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.npco-card { background: #fff; border-radius: 16px; box-shadow: var(--npco-shadow); padding: 1.5rem; }
.npco-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.npco-page h1 { font-size: 1.45rem; color: var(--npco-navy); margin: 0; font-weight: 800; line-height: 1.25; }
.npco-page h2 { font-size: 1.1rem; color: var(--npco-navy); margin: 1.5rem 0 .7rem; font-weight: 800; display: flex; align-items: center; gap: .55rem; }
.npco-page form > h2:first-of-type { margin-top: 0; }
.npco-step { display: inline-flex; align-items: center; justify-content: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--npco-blue); color: #fff; font-size: .85rem; }
.npco-muted { color: var(--npco-muted); }
.npco-alert { background: var(--npco-red-l); color: var(--npco-red); border-radius: 10px; padding: .8rem 1rem; margin-bottom: 1rem; font-weight: 600; }
.npco-empty { text-align: center; padding: 1.5rem 0 .5rem; }
.npco-preview-note { background: #fff8e1; color: #6d5200; padding: .6rem 1rem; border-radius: 8px; font-size: .9rem; text-align: center; }

.npco-code { margin-top: 1.2rem; }
.npco-code label { font-weight: 700; color: var(--npco-ink); font-size: .92rem; display: block; margin-bottom: .35rem; }
.npco-row { display: flex; gap: .5rem; }
.npco-row input { flex: 1; min-width: 0; text-transform: uppercase; }
.npco-code-msg { font-size: .88rem; margin: .4rem 0 0; min-height: 1.2em; }
.npco-code-msg.is-ok { color: var(--npco-green); }
.npco-code-msg.is-bad { color: var(--npco-red); }

.npco-totals { margin: 1.1rem 0 0; padding: 1rem 0 0; border-top: 1px solid var(--npco-line); }
.npco-totals > div { display: flex; justify-content: space-between; margin: .25rem 0; }
.npco-totals dt, .npco-totals dd { margin: 0; }
.npco-totals #npco-discount { color: var(--npco-green); font-weight: 700; }
.npco-totals .npco-total { font-size: 1.3rem; font-weight: 800; color: var(--npco-ink); margin-top: .5rem; }
.npco-totals .npco-total small { font-size: .7rem; color: var(--npco-muted); font-weight: 600; }

.npco-page input:not([type=radio]):not([type=checkbox]) {
  width: 100%; font: inherit; font-size: 1rem; padding: .7rem .8rem; border: 1px solid #cfd8e1; border-radius: 8px; background: #fff; color: var(--npco-ink); margin: 0; height: auto;
}
.npco-page input:focus { outline: none; border-color: var(--npco-blue); box-shadow: 0 0 0 3px rgba(52, 152, 219, .18); }
.npco-page input.is-invalid { border-color: var(--npco-red); }
.npco-field { display: block; }
.npco-field > span { display: block; font-size: .85rem; color: var(--npco-text); margin-bottom: .25rem; font-weight: 600; }
.npco-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.npco-hint { display: flex; gap: .45rem; align-items: center; font-size: .86rem; color: var(--npco-muted); margin: .45rem 0 0; }
.npco-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.npco-billing { margin-top: 1rem; border: 1px solid var(--npco-line); border-radius: 10px; }
.npco-billing summary { cursor: pointer; padding: .75rem 1rem; font-weight: 700; color: var(--npco-blue-d); font-size: .95rem; list-style-position: inside; }
.npco-billing summary small { color: var(--npco-muted); font-weight: 400; }
.npco-fields { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; padding: .2rem 1rem 1rem; }
.npco-fields .npco-wide { grid-column: 1 / -1; }

.npco-methods { display: grid; gap: .6rem; }
.npco-method { display: flex; gap: .8rem; align-items: flex-start; border: 2px solid var(--npco-line); border-radius: 10px; padding: .85rem 1rem; cursor: pointer; transition: border-color .15s, background .15s; }
.npco-method:hover { border-color: #b9d7ee; }
.npco-method:has(input:checked) { border-color: var(--npco-blue); background: var(--npco-blue-l); }
.npco-method input { margin: .25rem 0 0; accent-color: var(--npco-blue); width: 1.1rem; height: 1.1rem; flex: none; }
.npco-method-body b { display: block; color: var(--npco-ink); }
.npco-method-body small { display: block; color: var(--npco-muted); font-size: .86rem; }
.npco-pills { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .45rem; }
.npco-pills i { font-style: normal; font-size: .72rem; font-weight: 800; color: var(--npco-navy); background: #fff; border: 1px solid var(--npco-line); border-radius: 5px; padding: .12rem .45rem; }
#npco-submit { margin-top: 1.3rem; }
.npco-secure-note { display: flex; gap: .5rem; align-items: flex-start; justify-content: center; font-size: .84rem; color: var(--npco-muted); margin: .7rem 0 0; text-align: center; }
.npco-pay .npco-trust { grid-template-columns: 1fr 1fr; margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid var(--npco-line); }

@media (max-width: 860px) {
  .npco-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .npco-card { padding: 1.1rem; border-radius: 12px; }
  .npco-fields { grid-template-columns: 1fr; }
  .npco-pay .npco-trust { grid-template-columns: 1fr; }
  .npco-top-secure span, .npco-top-secure { font-size: .82rem; }
}

/* ---------- upgrade / reseller pages ---------- */
.npco-direct-intro { margin: -.3rem 0 1.4rem; }
.npco-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.npco-choices-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.npco-choice { flex-direction: column; gap: .35rem; position: relative; }
.npco-choice input { position: absolute; top: .8rem; right: .8rem; margin: 0; }
.npco-choice .npco-method-body { padding-right: 1.4rem; }
.npco-choice-product { align-items: center; text-align: center; }
.npco-choice-product .npco-method-body { padding-right: 0; }
.npco-choice-product img { display: block; width: 36px; height: 36px; object-fit: contain; margin: .1rem auto .35rem; }
.npco-choice-price { display: block; font-size: 1.35rem; font-weight: 800; color: var(--npco-ink); margin-top: .35rem; }
.npco-mono { font-family: Consolas, "SFMono-Regular", Menlo, monospace !important; letter-spacing: .02em; }
.npco-qty-field { max-width: 9rem; margin-top: .9rem; }
.npco-direct .npco-totals { margin-top: 1.3rem; }
@media (max-width: 640px) {
  .npco-choices, .npco-choices-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 400px) {
  .npco-choices:not(.npco-choices-4) { grid-template-columns: 1fr; }
}

/* ---------- thank-you ---------- */
.npco-ty-state { text-align: center; padding: .6rem 0 .2rem; }
.npco-ty-state h1 { font-size: 1.7rem; margin-bottom: .4rem; }
.npco-ty-state p { max-width: 560px; margin: .3rem auto; }
.npco-ty-icon { width: 64px; height: 64px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; margin-bottom: .8rem; }
.npco-ty-icon .npco-ico { width: 34px; height: 34px; }
.npco-ty-icon.is-ok { background: var(--npco-green-l); color: var(--npco-green); }
.npco-ty-icon.is-wait { background: var(--npco-blue-l); color: var(--npco-blue-d); }
.npco-ty-icon.is-warn { background: #fff4e0; color: #b46b00; }
.npco-spinner { width: 46px; height: 46px; border-radius: 50%; border: 4px solid var(--npco-blue-l); border-top-color: var(--npco-blue); animation: npco-spin .9s linear infinite; margin: .4rem auto 1rem; }
@keyframes npco-spin { to { transform: rotate(360deg); } }
.npco-ty-items { margin-top: 1.5rem; display: grid; gap: 1rem; text-align: left; }
.npco-ty-item { border: 1px solid var(--npco-line); border-radius: 12px; padding: 1rem 1.1rem; }
.npco-ty-item-head { display: flex; gap: .8rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.npco-ty-item-head > div { display: flex; gap: .7rem; align-items: center; }
.npco-ty-item-head img { width: 40px; height: 40px; object-fit: contain; }
.npco-ty-item-head b { color: var(--npco-ink); display: block; }
.npco-ty-item-head small { color: var(--npco-muted); }
.npco-key { display: flex; gap: .5rem; align-items: center; margin-top: .7rem; }
.npco-key code { flex: 1; min-width: 0; overflow-wrap: anywhere; font-family: Consolas, "SFMono-Regular", Menlo, monospace; font-size: .95rem; background: var(--npco-soft); border: 1px dashed #c3d3e2; border-radius: 8px; padding: .6rem .75rem; color: var(--npco-ink); user-select: all; }
.npco-key .npco-btn { padding: .55em .9em; font-size: .88rem; flex: none; }
.npco-steps { text-align: left; background: var(--npco-soft); border-radius: 12px; padding: 1rem 1.2rem 1rem 2.6rem; margin: 1.4rem 0 0; }
.npco-steps li { margin: .3rem 0; }
.npco-ty-meta { margin-top: 1.4rem; font-size: .88rem; color: var(--npco-muted); text-align: center; }
.npco-ty-actions { margin-top: 1.2rem; display: flex; gap: .7rem; justify-content: center; flex-wrap: wrap; }

/* ---------- toast ---------- */
.npco-toast { position: fixed; left: 50%; bottom: 1.4rem; transform: translateX(-50%) translateY(150%); background: var(--npco-ink); color: #fff; border-radius: 10px; padding: .7rem 1.1rem; font-size: .92rem; z-index: 100000; transition: transform .25s; }
.npco-toast.is-on { transform: translateX(-50%); }

@media (prefers-reduced-motion: reduce) {
  .npco-drawer, .npco-overlay, .npco-product, .npco-toast { transition: none; }
  .npco-spinner { animation-duration: 3s; }
}
