/* Neptucom Plan Calculator — [wave_plan_calculator] widget styles.
   Scoped under #npc-calc; brand tokens mirror the wave-v2 funnel. */

#npc-calc {
  --npc-brand: #3abaeb;
  --npc-brand-dark: #2da3d1;
  --npc-brand-light: #e8f7fc;
  --npc-ink: #1e293b;
  --npc-muted: #64748b;
  --npc-line: #e2e8f0;
  --npc-bg: #f8fafc;
  --npc-white: #ffffff;
  --npc-green: #22c55e;
  --npc-green-dark: #16a34a;
  --npc-save: #ea8c1f;
  --npc-radius: 1rem;
  --npc-radius-lg: 1.35rem;
  --npc-font: 'Assistant', 'Rubik', 'Heebo', -apple-system, 'Segoe UI', sans-serif;

  font-family: var(--npc-font);
  color: var(--npc-ink);
  background: var(--npc-white);
  border-radius: var(--npc-radius-lg);
  display: flex;
  flex-direction: column;
  width: 100%;
  /* Fixed height => the popup never jumps between stages. */
  height: clamp(440px, 76dvh, 640px);
  overflow: hidden;
  text-align: right;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
#npc-calc *, #npc-calc *::before, #npc-calc *::after { box-sizing: border-box; margin: 0; padding: 0; }
#npc-calc button { font-family: inherit; background: none; border: none; cursor: pointer; color: inherit; text-align: inherit; }
#npc-calc a { color: inherit; }
#npc-calc button:focus-visible, #npc-calc a:focus-visible, #npc-calc input:focus-visible {
  outline: 3px solid var(--npc-brand) !important; outline-offset: 2px; border-radius: 6px;
}
/* Mouse/tap clicks must not leave a frame — the host page (theme /
   accessibility plugin) draws a black outline on :focus; kill it here and
   keep the brand outline for keyboard focus only. */
#npc-calc button:focus:not(:focus-visible),
#npc-calc a:focus:not(:focus-visible) {
  outline: none !important;
  box-shadow: none;
}
#npc-calc .npc-opt:focus:not(:focus-visible) { box-shadow: 0 2px 10px rgba(58,186,235,.18); }

/* ---- header ---- */
#npc-calc .npc-head {
  display: flex; align-items: flex-start; gap: .75rem;
  padding: 1rem 1.25rem .6rem;
  /* Extra room on the left so Elementor's popup close (X) never overlaps
     the progress percentage. */
  padding-left: 3rem;
  flex: 0 0 auto;
}
#npc-calc .npc-back {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--npc-muted); background: var(--npc-bg);
  transition: background .15s, color .15s;
}
#npc-calc .npc-back:hover { background: var(--npc-brand-light); color: var(--npc-brand-dark); }
#npc-calc .npc-back[hidden] { display: none; }
#npc-calc .npc-progress { flex: 1 1 auto; }
#npc-calc .npc-progress__label { font-size: .85rem; color: var(--npc-muted); }
#npc-calc .npc-progress__pct { float: left; font-size: .85rem; font-weight: 700; color: var(--npc-brand-dark); }
#npc-calc .npc-progress__track {
  clear: both; margin-top: .35rem; height: 6px; border-radius: 999px; background: var(--npc-line); overflow: hidden;
}
#npc-calc .npc-progress__fill {
  height: 100%; width: 0%; border-radius: 999px;
  background: linear-gradient(270deg, var(--npc-brand), var(--npc-brand-dark));
  transition: width .35s ease;
}
#npc-calc .npc-progress--hidden .npc-progress__label,
#npc-calc .npc-progress--hidden .npc-progress__pct,
#npc-calc .npc-progress--hidden .npc-progress__track { visibility: hidden; }

/* ---- body ---- */
#npc-calc .npc-body {
  flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain;
  padding: .25rem 1.25rem 1rem;
  scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent;
  display: flex; flex-direction: column;
}
#npc-calc .npc-body > * { flex: 0 0 auto; }
/* Brand logo filling the leftover white space on the first stage. */
#npc-calc .npc-logo { margin-top: auto; margin-bottom: auto; text-align: center; padding: 1.25rem 0 .5rem; }
#npc-calc .npc-logo img { width: 180px; max-width: 55%; height: auto; display: inline-block; }

/* stage intro (emoji + title + hint) */
#npc-calc .npc-intro { text-align: center; padding: .4rem 0 1.1rem; }
#npc-calc .npc-intro__emoji { font-size: 2rem; display: block; margin-bottom: .35rem; }
#npc-calc .npc-intro__title { font-size: 1.35rem; font-weight: 800; color: var(--npc-ink); }
#npc-calc .npc-intro__hint { font-size: .9rem; color: var(--npc-muted); margin-top: .25rem; }

/* option rows */
#npc-calc .npc-opts { display: flex; flex-direction: column; gap: .65rem; }
#npc-calc .npc-opt {
  display: flex; align-items: center; gap: .8rem;
  width: 100%; padding: .85rem 1rem;
  border: 2px solid var(--npc-line); border-radius: var(--npc-radius);
  background: var(--npc-white);
  font-size: 1.02rem; font-weight: 600; color: var(--npc-ink);
  transition: border-color .15s, background .15s, transform .1s;
}
#npc-calc .npc-opt:hover { border-color: var(--npc-brand); background: var(--npc-brand-light); }
#npc-calc .npc-opt:active { transform: scale(.985); }
#npc-calc .npc-opt.is-on { border-color: var(--npc-brand); background: var(--npc-brand-light); box-shadow: 0 2px 10px rgba(58,186,235,.18); }
#npc-calc .npc-opt__emoji { font-size: 1.35rem; flex: 0 0 auto; }
#npc-calc .npc-opt__check {
  margin-inline-start: auto; width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--npc-line); flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  color: transparent; font-size: .8rem; font-weight: 800;
  transition: all .15s;
}
#npc-calc .npc-opt.is-on .npc-opt__check { background: var(--npc-brand); border-color: var(--npc-brand); color: #fff; }

/* flights matrix */
#npc-calc .npc-matrix { border: 1px solid var(--npc-line); border-radius: var(--npc-radius); overflow: hidden; }
#npc-calc .npc-matrix__row {
  display: grid; grid-template-columns: minmax(84px, 1.4fr) repeat(4, 1fr);
  align-items: center; border-bottom: 1px solid var(--npc-line);
}
#npc-calc .npc-matrix__row:last-child { border-bottom: none; }
#npc-calc .npc-matrix__row--head { background: var(--npc-bg); font-size: .78rem; color: var(--npc-muted); font-weight: 700; }
#npc-calc .npc-matrix__row--head > div { padding: .55rem .4rem; text-align: center; }
#npc-calc .npc-matrix__row--head > div:first-child { text-align: right; padding-right: .8rem; }
#npc-calc .npc-matrix__line { display: flex; align-items: center; gap: .35rem; padding: .55rem .4rem .55rem 0; padding-right: .8rem; font-weight: 700; font-size: .92rem; min-width: 0; }
#npc-calc .npc-matrix__line-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#npc-calc .npc-matrix__cell { display: flex; justify-content: center; padding: .45rem .2rem; }
#npc-calc .npc-radio {
  width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid var(--npc-line); background: var(--npc-white);
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .15s;
}
#npc-calc .npc-radio:hover { border-color: var(--npc-brand); }
#npc-calc .npc-radio.is-on { border-color: var(--npc-brand); background: var(--npc-brand); box-shadow: 0 0 0 4px rgba(58,186,235,.2); }
#npc-calc .npc-radio.is-on::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #fff; }

/* ---- footer ---- */
#npc-calc .npc-foot { flex: 0 0 auto; padding: .75rem 1.25rem 1.1rem; box-shadow: 0 -6px 16px -12px rgba(15,23,42,.25); }
#npc-calc .npc-foot:empty { padding: 0; box-shadow: none; }
#npc-calc .npc-cta {
  display: block; width: 100%; text-align: center;
  padding: .85rem 1rem; border-radius: var(--npc-radius);
  font-size: 1.05rem; font-weight: 800; text-decoration: none;
  background: linear-gradient(270deg, var(--npc-brand), var(--npc-brand-dark));
  color: #fff; box-shadow: 0 6px 18px -6px rgba(58,186,235,.55);
  transition: filter .15s, transform .1s;
}
#npc-calc .npc-cta:hover { filter: brightness(1.06); }
#npc-calc .npc-cta:active { transform: scale(.985); }
#npc-calc .npc-cta[disabled] { background: var(--npc-line); color: var(--npc-muted); box-shadow: none; cursor: not-allowed; }

/* ---- result stage ---- */
#npc-calc .npc-save-box {
  text-align: center; background: var(--npc-bg); border-radius: var(--npc-radius);
  padding: .9rem 1rem; margin-bottom: 1rem;
}
#npc-calc .npc-save-box__row { font-size: .88rem; color: var(--npc-muted); }
#npc-calc .npc-save-box__row strong { color: var(--npc-ink); font-weight: 700; }
#npc-calc .npc-save-box__hero { margin-top: .4rem; font-size: 1.15rem; font-weight: 800; color: var(--npc-save); }
#npc-calc .npc-save-box__hero .npc-save-num { font-size: 1.5rem; }

#npc-calc .npc-plan { border-radius: var(--npc-radius); overflow: hidden; border: 1px solid var(--npc-line); margin-bottom: .9rem; background: var(--npc-white); }
#npc-calc .npc-plan__head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .75rem 1rem; color: #fff; }
#npc-calc .npc-plan__head--breeze { background: linear-gradient(120deg, #38bdf8, #0ea5e9); }
#npc-calc .npc-plan__head--swell  { background: linear-gradient(120deg, #34d399, #10b981); }
#npc-calc .npc-plan__head--high   { background: linear-gradient(120deg, #a78bfa, #8b5cf6); }
#npc-calc .npc-plan__head--reef   { background: linear-gradient(120deg, #22d3ee, #0891b2); }
#npc-calc .npc-plan__head--peak   { background: linear-gradient(120deg, #64748b, #334155); }
#npc-calc .npc-plan__id { display: flex; align-items: center; gap: .55rem; min-width: 0; }
#npc-calc .npc-plan__emoji { font-size: 1.5rem; flex: 0 0 auto; }
#npc-calc .npc-plan__linelbl { font-size: .78rem; opacity: .9; }
#npc-calc .npc-plan__name { font-size: 1.15rem; font-weight: 800; }
#npc-calc .npc-plan__tag { font-size: .78rem; opacity: .92; }
#npc-calc .npc-plan__price { text-align: center; flex: 0 0 auto; }
#npc-calc .npc-plan__price small { display: block; font-size: .7rem; opacity: .9; }
#npc-calc .npc-plan__price b { font-size: 1.35rem; font-weight: 800; }
#npc-calc .npc-plan__feats { list-style: none; padding: .7rem 1rem; display: flex; flex-direction: column; gap: .35rem; }
#npc-calc .npc-plan__feats li { display: flex; gap: .5rem; align-items: baseline; font-size: .92rem; }
#npc-calc .npc-plan__feats li::before { content: '✓'; color: var(--npc-brand-dark); font-weight: 800; flex: 0 0 auto; }
#npc-calc .npc-plan__meta { display: flex; justify-content: space-between; gap: .5rem; padding: 0 1rem .7rem; font-size: .78rem; color: var(--npc-muted); }
#npc-calc .npc-plan__chip { background: var(--npc-brand-light); color: var(--npc-brand-dark); font-weight: 700; border-radius: 999px; padding: .1rem .6rem; }

#npc-calc .npc-why { background: var(--npc-bg); border-radius: var(--npc-radius); padding: .8rem 1rem; margin-bottom: 1rem; }
#npc-calc .npc-why h4 { font-size: .95rem; font-weight: 800; margin-bottom: .45rem; }
#npc-calc .npc-why ul { list-style: none; display: flex; flex-direction: column; gap: .3rem; }
#npc-calc .npc-why li { display: flex; gap: .5rem; align-items: baseline; font-size: .9rem; color: var(--npc-ink); }
#npc-calc .npc-why li::before { content: '✓'; color: var(--npc-green-dark); font-weight: 800; flex: 0 0 auto; }

#npc-calc .npc-alt-title { font-size: .95rem; font-weight: 800; margin: 0 0 .6rem; }
#npc-calc .npc-fee-note { text-align: center; font-size: .8rem; color: var(--npc-muted); margin: -.2rem 0 .9rem; }

#npc-calc .npc-ctas { display: flex; flex-direction: column; gap: .6rem; margin: 1.1rem 0 .4rem; }
#npc-calc .npc-cta--wa {
  background: #25d366; color: #fff;
  border: none; box-shadow: 0 6px 18px -6px rgba(37,211,102,.55);
}
#npc-calc .npc-cta--wa:hover { background: #1ebe5b; filter: none; }
#npc-calc .npc-cta--ghost {
  background: var(--npc-white); color: var(--npc-brand-dark);
  border: 2px solid var(--npc-brand); box-shadow: none;
  font-weight: 700; font-size: 1rem;
}
#npc-calc .npc-cta--ghost:hover { background: var(--npc-brand-light); filter: none; }
#npc-calc .npc-restart { display: block; margin: .2rem auto .9rem; font-size: .85rem; color: var(--npc-muted); text-decoration: underline; }
#npc-calc .npc-restart:hover { color: var(--npc-brand-dark); }

#npc-calc .npc-fineprint { border-top: 1px solid var(--npc-line); padding-top: .8rem; display: flex; flex-direction: column; gap: .55rem; }
#npc-calc .npc-fineprint p { font-size: .74rem; color: var(--npc-muted); }
#npc-calc .npc-fineprint .npc-calcnote {
  background: #fdf3e0; border: 1px solid #f0dcb4;
  border-radius: .6rem; padding: .6rem .75rem;
  color: #6b5a3e; text-align: center;
}
#npc-calc .npc-fineprint .npc-calcnote b { display: block; color: #4f4128; font-size: .8rem; margin-bottom: .2rem; }
#npc-calc .npc-fineprint .npc-calcnote span { display: block; }

/* mobile */
@media (max-width: 520px) {
  #npc-calc { height: clamp(430px, 82dvh, 640px); }
  #npc-calc .npc-head { padding: .85rem 1rem .5rem; padding-left: 2.75rem; }
  #npc-calc .npc-body { padding: .2rem 1rem .9rem; }
  #npc-calc .npc-foot { padding: .65rem 1rem 1rem; }
  #npc-calc .npc-intro__title { font-size: 1.18rem; }
  #npc-calc .npc-opt { font-size: .95rem; padding: .75rem .85rem; }
  #npc-calc .npc-matrix__row { grid-template-columns: minmax(64px, 1.3fr) repeat(4, 1fr); }
  #npc-calc .npc-matrix__row--head { font-size: .68rem; }
  #npc-calc .npc-plan__name { font-size: 1.02rem; }
}

@media (prefers-reduced-motion: reduce) {
  #npc-calc * { transition: none !important; }
}
