/* Nexpol Glomo Pay — scoped to .nxg so the theme is untouched.
   Override the accent from the theme with: .nxg { --nxg-accent: #yourcolour; } */
.nxg {
  --nxg-accent: #134e8e;
  --nxg-accent-ink: #ffffff;
  --nxg-ink: #1c2430;
  --nxg-muted: #5b6573;
  --nxg-line: #d6dbe2;
  --nxg-panel: #f4f6f9;
  --nxg-bad: #b42318;
  --nxg-good: #11713d;
  color: var(--nxg-ink);
  font: inherit;
  line-height: 1.5;
  max-width: 1080px;
  margin: 2rem auto 3rem;
  padding: 0 1rem;
  box-sizing: border-box;
  container-type: inline-size; /* layout follows the space the theme gives us, not the screen */
  width: 100%;
}
.nxg *, .nxg *::before, .nxg *::after { box-sizing: border-box; }
.nxg [hidden] { display: none !important; } /* layout classes must never override hidden */

.nxg-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 2.5rem; align-items: start; }
.nxg-summary { order: 2; position: sticky; top: 1.5rem; background: var(--nxg-panel); border-left: 4px solid var(--nxg-accent); padding: 1.5rem; }
.nxg-main { order: 1; }

.nxg-summary__kicker { margin: 0 0 .25rem; color: var(--nxg-muted); font-size: .9rem; }
.nxg-summary__title { margin: 0 0 .5rem; font-size: 1.35rem; line-height: 1.25; }
.nxg-summary__desc { margin: 0 0 1rem; color: var(--nxg-muted); font-size: .95rem; }
.nxg-summary__rows, .nxg-pay__rows { margin: 0 0 1rem; }
.nxg-summary__rows > div, .nxg-pay__rows > div { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-top: 1px solid var(--nxg-line); }
.nxg-summary__rows dt, .nxg-pay__rows dt { color: var(--nxg-muted); margin: 0; }
.nxg-summary__rows dd, .nxg-pay__rows dd { white-space: nowrap; margin: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.nxg-summary__rows small { font-weight: 400; color: var(--nxg-muted); }
.nxg-summary__rows > .nxg-summary__charge { flex-direction: column; gap: .15rem; }
.nxg-summary__charge dd { text-align: left; color: var(--nxg-accent); font-size: 1.45rem; line-height: 1.2; }
.nxg-summary__rows dt { white-space: nowrap; }
.nxg-summary__note { margin: 0; font-size: .85rem; color: var(--nxg-muted); }

.nxg-fs { border: 0; margin: 0 0 1.75rem; padding: 0; min-width: 0; }
.nxg-fs legend { font-weight: 700; font-size: 1.05rem; margin-bottom: .75rem; padding: 0; }
.nxg-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.nxg-row--3 { grid-template-columns: 1.2fr 1fr .8fr; }
.nxg-field { display: flex; flex-direction: column; gap: .35rem; margin: 0; font-size: .92rem; }
.nxg-field--full { grid-column: 1 / -1; }
.nxg-field > span { font-weight: 600; }
.nxg-field em { font-style: normal; font-weight: 400; color: var(--nxg-muted); }
.nxg input[type="text"], .nxg input:not([type]), .nxg input[type="email"], .nxg input[type="tel"], .nxg select {
  width: 100%; min-height: 46px; padding: .6rem .75rem; margin: 0;
  border: 1px solid var(--nxg-line); border-radius: 6px; background: #fff; color: var(--nxg-ink);
  font: inherit; font-size: 1rem; box-shadow: none;
}
.nxg input:focus, .nxg select:focus { outline: 2px solid var(--nxg-accent); outline-offset: 1px; border-color: var(--nxg-accent); }
.nxg-field.is-invalid input, .nxg-field.is-invalid select { border-color: var(--nxg-bad); }
.nxg-field__msg { color: var(--nxg-bad); font-size: .82rem; }

.nxg-phone { display: flex; align-items: stretch; }
.nxg-phone__cc { display: flex; align-items: center; padding: 0 .7rem; border: 1px solid var(--nxg-line); border-right: 0; border-radius: 6px 0 0 6px; background: var(--nxg-panel); color: var(--nxg-muted); font-variant-numeric: tabular-nums; min-width: 3.4rem; justify-content: center; }
.nxg-phone input { border-radius: 0 6px 6px 0 !important; }

.nxg-seg { display: inline-flex; border: 1px solid var(--nxg-line); border-radius: 6px; overflow: hidden; margin-bottom: 1rem; }
.nxg-seg label { margin: 0; padding: .55rem 1rem; cursor: pointer; font-weight: 600; font-size: .92rem; }
.nxg-seg label + label { border-left: 1px solid var(--nxg-line); }
.nxg-seg input { position: absolute; opacity: 0; pointer-events: none; }
.nxg-seg label:has(input:checked) { background: var(--nxg-accent); color: var(--nxg-accent-ink); }
.nxg-seg label:has(input:focus-visible) { outline: 2px solid var(--nxg-accent); outline-offset: -3px; }

.nxg-india, .nxg-error, .nxg-notice { padding: .85rem 1rem; border-radius: 6px; margin: 0 0 1rem; font-size: .95rem; }
.nxg-india, .nxg-notice { background: #fff7e6; border: 1px solid #f0d49a; }
.nxg-india a { font-weight: 700; }
.nxg-error { white-space: pre-line; background: #fdecea; border: 1px solid #f3b8b2; color: var(--nxg-bad); }

.nxg-btn {
  display: block; width: 100%; min-height: 52px; padding: .8rem 1.25rem; border: 0; border-radius: 6px;
  background: var(--nxg-accent); color: var(--nxg-accent-ink); font: inherit; font-size: 1.05rem; font-weight: 700;
  cursor: pointer; transition: filter .15s;
}
.nxg-btn:hover:not(:disabled) { filter: brightness(1.1); }
.nxg-btn:focus-visible { outline: 3px solid var(--nxg-ink); outline-offset: 2px; }
.nxg-btn:disabled { opacity: .55; cursor: not-allowed; }
.nxg-link { background: none; border: 0; padding: .75rem 0; color: var(--nxg-accent); text-decoration: underline; cursor: pointer; font: inherit; }
.nxg-fine { font-size: .85rem; color: var(--nxg-muted); margin: .75rem 0 0; }

.nxg-pay, .nxg-done { border: 1px solid var(--nxg-line); border-radius: 8px; padding: 1.75rem; }
.nxg-pay__title, .nxg-done__title { margin: 0 0 1rem; font-size: 1.3rem; }
.nxg-done--paid { border-color: var(--nxg-good); }
.nxg-done--paid .nxg-done__title { color: var(--nxg-good); }

.nxg-off { max-width: 640px; border: 1px solid var(--nxg-line); border-left: 4px solid var(--nxg-accent); padding: 1.5rem; background: var(--nxg-panel); }
.nxg-off p { margin: .5rem 0 0; }
.nxg-btn--inline { display: inline-block; width: auto; text-decoration: none; line-height: 1.6; }
.nxg-adminbar { margin-bottom: 1.25rem; }
.nxg-methods { display: grid; gap: .75rem; }
.nxg-method { display: flex; gap: .75rem; align-items: flex-start; margin: 0; padding: 1rem; border: 1px solid var(--nxg-line); border-radius: 8px; cursor: pointer; background: #fff; }
.nxg-method input { margin: .25rem 0 0; accent-color: var(--nxg-accent); width: 1.1rem; height: 1.1rem; flex: none; }
.nxg-method:has(input:checked) { border-color: var(--nxg-accent); box-shadow: 0 0 0 1px var(--nxg-accent); }
.nxg-method:has(input:focus-visible) { outline: 2px solid var(--nxg-accent); outline-offset: 2px; }
.nxg-method__body { display: flex; flex-direction: column; gap: .15rem; }
.nxg-method__name { font-weight: 700; }
.nxg-method__name em { font-weight: 400; font-style: normal; color: var(--nxg-bad); font-size: .85rem; }
.nxg-method__desc { color: var(--nxg-muted); font-size: .9rem; }
.nxg-method__na { color: var(--nxg-bad); font-size: .85rem; }
.nxg-method.is-na { cursor: not-allowed; background: var(--nxg-panel); opacity: .75; }
.nxg-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Narrow content area (theme column) or narrow screen: one column, summary first. */
@container (max-width: 780px) {
  .nxg-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .nxg-summary { order: 0; position: static; }
}
@container (max-width: 480px) {
  .nxg-row, .nxg-row--3 { grid-template-columns: 1fr; }
  .nxg-seg { display: flex; }
  .nxg-seg label { flex: 1; text-align: center; }
}
/* Fallback for browsers without container queries. */
@supports not (container-type: inline-size) {
  @media (max-width: 860px) {
    .nxg-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .nxg-summary { order: 0; position: static; }
  }
  @media (max-width: 560px) {
    .nxg-row, .nxg-row--3 { grid-template-columns: 1fr; }
  }
}
@media (prefers-reduced-motion: reduce) { .nxg-btn { transition: none; } }
