/* ==========================================================================
   Component CSS for custom blocks.
   Uses only theme tokens defined in style.css / theme.json.
   ========================================================================== */

/* ------------------ NAVIGATION ------------------ */
.bnx-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(16,22,36,0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--theme-card-border);
}
.bnx-nav__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: var(--theme-nav-height);
}
.bnx-nav__brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--theme-font-heading); font-weight: 700; letter-spacing: 0.02em;
  color: var(--theme-text-primary); text-decoration: none;
}
.bnx-nav__logo { width: 34px; height: 34px; object-fit: contain; }
.bnx-nav__links { display: flex; align-items: center; gap: 1.25rem; list-style: none; margin:0; padding:0; }
.bnx-nav__links a {
  color: var(--theme-text-secondary); text-decoration: none;
  font-family: var(--theme-font-heading); letter-spacing: 0.04em;
  transition: color var(--theme-transition);
}
.bnx-nav__links a:hover, .bnx-nav__links a[aria-current="page"] { color: var(--wp--preset--color--accent, #3dff8b); }
.bnx-nav__toggle {
  display: none; background: transparent; border: 1px solid var(--theme-card-border);
  border-radius: var(--theme-radius-sm); padding: 0.45rem 0.7rem; color: var(--theme-text-primary);
}

@media (max-width: 820px) {
  .bnx-nav__links { display: none; }
  .bnx-nav__toggle { display: inline-flex; }
  .bnx-nav.is-open .bnx-nav__links {
    display: flex; position: absolute; left: 0; right: 0; top: var(--theme-nav-height);
    flex-direction: column; gap: 1rem; padding: 1.25rem clamp(16px,4vw,32px) 1.5rem;
    background: rgba(16,22,36,0.97); border-bottom: 1px solid var(--theme-card-border);
  }
}

/* ------------------ HERO ------------------ */
.bnx-hero { padding-block: clamp(64px,10vw,128px); text-align: center; }
.bnx-hero__eyebrow { margin-bottom: 1rem; }
.bnx-hero__title { font-size: var(--wp--preset--font-size--display); margin-bottom: 0.75em; }
.bnx-hero__desc { max-width: 640px; margin-inline: auto; color: var(--theme-text-secondary); font-size: 1.0625rem; }
.bnx-hero__actions { display: flex; gap: 0.9rem; justify-content: center; flex-wrap: wrap; margin-top: 1.75rem; }

/* ------------------ STATS ------------------ */
.bnx-stats { display: grid; gap: 1px; background: var(--theme-card-border); border-radius: var(--theme-radius-md); overflow: hidden; }
.bnx-stat {
  background: var(--theme-surface); padding: clamp(16px,3vw,24px) 1rem; text-align: center;
}
.bnx-stat__value {
  display: block; font-family: var(--theme-font-heading); font-weight: 700;
  font-size: clamp(1.5rem,3vw,2rem); color: var(--wp--preset--color--accent-2, #46e0ff);
}
.bnx-stat__label { display: block; margin-top: 0.35rem; color: var(--theme-text-secondary); font-size: 0.8125rem; }

/* ------------------ FEATURES ------------------ */
.bnx-features__grid {
  display: grid; gap: clamp(14px,2vw,20px);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}
.bnx-feature .bnx-feature__icon { font-size: 1.75rem; line-height: 1; margin-bottom: 0.6rem; }
.bnx-feature h3 { font-size: 1.125rem; margin-bottom: 0.4rem; }
.bnx-feature p { color: var(--theme-text-secondary); font-size: 0.9375rem; }

/* ------------------ HOW IT WORKS (steps) ------------------ */
.bnx-steps { display: grid; gap: clamp(16px,2vw,24px); counter-reset: bnx-step; }
.bnx-step { position: relative; padding-left: 3.25rem; }
.bnx-step::before {
  content: ""; position: absolute; left: 0; top: 0.35rem; width: 2.4rem; height: 2.4rem;
  display: grid; place-items: center; border-radius: var(--theme-radius-sm);
  background: rgba(61,255,139,0.12); color: var(--wp--preset--color--accent, #3dff8b);
  font-family: var(--theme-font-heading); font-weight: 700; border: 1px solid rgba(61,255,139,0.4);
}
.bnx-step::before { content: counter(bnx-step, decimal-leading-zero); }
.bnx-steps > * { counter-increment: bnx-step; }
.bnx-step h3 { margin-bottom: 0.35rem; font-size: 1.125rem; }
.bnx-step p { color: var(--theme-text-secondary); }

/* ------------------ MODES (tabs) ------------------ */
.bnx-modes__tabs { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.bnx-modes__tab {
  font-family: var(--theme-font-heading); letter-spacing: 0.03em;
  background: transparent; color: var(--theme-text-secondary);
  border: 1px solid var(--theme-card-border); border-radius: var(--theme-radius-sm);
  padding: 0.5rem 1rem; cursor: pointer; transition: all var(--theme-transition);
}
.bnx-modes__tab[aria-selected="true"] {
  color: #05070d; background: linear-gradient(120deg, var(--wp--preset--color--accent,#3dff8b), var(--wp--preset--color--accent-2,#46e0ff));
}
.bnx-mode-panel[hidden] { display: none; }

/* No-JS fallback: without JS, show first panel; tabs remain focusable links. */
.bnx-modes__panel-card { display: grid; gap: 1rem; grid-template-columns: minmax(0,1fr) minmax(0,1fr); margin-top: 0.5rem; }
@media (max-width: 760px) { .bnx-modes__panel-card { grid-template-columns: 1fr; } }

.bnx-risk-track { height: 8px; border-radius: 999px; background: var(--theme-bg-1); overflow: hidden; margin-top: 0.4rem; }
.bnx-risk-fill { display:block; height: 100%; width: 50%; background: linear-gradient(90deg, var(--wp--preset--color--accent,#3dff8b), var(--wp--preset--color--amber,#ffb454)); border-radius: 999px; }

/* ------------------ CONSOLE / TERMINAL ------------------ */
.bnx-console { font-family: var(--theme-font-mono); font-size: 0.8125rem; color: var(--theme-text-secondary); }
.bnx-console__bar {
  display: flex; align-items: center; gap: 0.6rem; padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--theme-card-border); background: rgba(5,7,13,0.6);
}
.bnx-console__dot { width: 12px; height: 12px; border-radius: 50%; display:inline-block; }
.bnx-console__body { padding: 1rem; max-height: clamp(240px, 35vw, 420px); overflow-y: auto; }
.bnx-log-line { display: flex; gap: 0.75rem; padding: 0.25rem 0; border-bottom: 1px dashed rgba(29,39,57,0.6); }
.bnx-log-time { color: var(--theme-text-secondary); white-space: nowrap; }
.bnx-log-tag { font-weight: 500; padding: 0 0.4rem; border-radius: 4px; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; }

/* ------------------ SETTINGS (key/value) ------------------ */
.bnx-setting-rows { list-style: none; margin: 0; padding: 0; }
.bnx-setting-row { display: grid; gap: 1rem; grid-template-columns: minmax(140px, auto) auto 1fr; align-items: baseline; padding-block: 0.65rem; border-bottom: 1px solid rgba(29,39,57,0.5); }
.bnx-setting-row:last-child { border-bottom: 0; }
.bnx-setting-key { font-family: var(--theme-font-mono); color: var(--wp--preset--color--accent-2,#46e0ff); font-size: 0.8125rem; word-break: break-all; }
.bnx-setting-value { font-family: var(--theme-font-mono); color: var(--theme-text-primary); }
.bnx-setting-desc { color: var(--theme-text-secondary); font-size: 0.875rem; }
@media (max-width: 640px) { .bnx-setting-row { grid-template-columns: 1fr; gap: 0.25rem; } }

/* ------------------ PRICING ------------------ */
.bnx-pricing__grid { display: grid; gap: clamp(14px,2vw,20px); grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.bnx-plan { display: flex; flex-direction: column; position: relative; }
.bnx-plan--featured { border-color: var(--wp--preset--color--accent,#3dff8b); box-shadow: var(--theme-glow-accent); }
.bnx-plan__price { font-family: var(--theme-font-heading); font-weight: 700; font-size: 2rem; margin-block: 0.4rem 0.1rem; }
.bnx-plan__period { color: var(--theme-text-secondary); font-size: 0.8125rem; margin-bottom: 1rem; }
.bnx-plan ul { list-style: none; padding: 0; margin: 0 0 1.25rem; display: grid; gap: 0.5rem; color: var(--theme-text-secondary); font-size: 0.9375rem; }
.bnx-plan .bnx-btn { margin-top: auto; width: 100%; }

/* ------------------ CTA ------------------ */
.bnx-cta { text-align: center; padding-block: clamp(48px,8vw,96px); }
.bnx-cta__actions { display: flex; gap: 0.9rem; justify-content: center; flex-wrap: wrap; margin-top: 1.5rem; }

/* ------------------ FAQ ------------------ */
.bnx-faq details { border-bottom: 1px solid var(--theme-card-border); padding-block: 0.85rem; }
.bnx-faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.bnx-faq summary::after { content: "+"; color: var(--wp--preset--color--accent,#3dff8b); font-family: var(--theme-font-mono); transition: transform var(--theme-transition); }
.bnx-faq details[open] summary::after { content: "–"; }
.bnx-faq p, .bnx-faq div { color: var(--theme-text-secondary); margin-top: 0.5rem; }

/* ------------------ TESTIMONIALS ------------------ */
.bnx-testimonials__grid { display: grid; gap: clamp(14px,2vw,20px); grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.bnx-testimonial blockquote { margin: 0 0 0.75rem; font-size: 1rem; color: var(--theme-text-primary); }
.bnx-testimonial figcaption { display:flex; align-items:center; gap:0.6rem; color: var(--theme-text-secondary); font-size:0.875rem; }

/* ------------------ BADGE / pills ------------------ */
.bnx-badge {
  display:inline-flex; align-items:center; gap:0.4rem; padding:0.35rem 0.7rem;
  border-radius:999px; font-size:0.75rem; letter-spacing:0.06em; text-transform:uppercase;
  background: rgba(61,255,139,0.1); color: var(--wp--preset--color--accent,#3dff8b); border:1px solid rgba(61,255,139,0.4);
}

/* ------------------ DIVIDER ------------------ */
.bnx-divider { height: 1px; background: linear-gradient(90deg, transparent, var(--theme-card-border), transparent); }
