/* Brand palette 18 and fonts over both templates. Loaded after the vendor CSS and before base.css. */

/* kept: template lacks the project light palette and font tokens. */
:root {
  /* palette 18, light */
  --bma-primary: #9a3412;
  --bma-primary-ink: #ffffff;
  --bma-accent: #1d4ed8;
  --bma-paper: #fbf7f2;
  --bma-surface: #ffffff;
  --bma-surface-2: #f3ece3;
  --bma-border: #e4d9cc;
  --bma-border-strong: #cdbfae;
  --bma-text: #1c1917;
  --bma-text-muted: #57534e;
  --bma-text-faint: #6b645d;
  --bma-primary-soft: #fdebdd;

  /* NexaAI variables.css overrides */
  --brand-amber: var(--bma-primary);          /* overrides --brand-amber */
  --brand-amber-ink: var(--bma-primary-ink);  /* overrides --brand-amber-ink */
  --brand-teal: var(--bma-accent);            /* overrides --brand-teal */
  --brand-navy: #0c0a09;                      /* overrides --brand-navy */
  --bg: var(--bma-paper);                     /* overrides --bg */
  --surface: var(--bma-surface);              /* overrides --surface */
  --surface-2: var(--bma-surface-2);          /* overrides --surface-2 */
  --surface-raised: var(--bma-surface);       /* overrides --surface-raised */
  --border: var(--bma-border);                /* overrides --border */
  --border-strong: var(--bma-border-strong);  /* overrides --border-strong */
  --text: var(--bma-text);                    /* overrides --text */
  --text-muted: var(--bma-text-muted);        /* overrides --text-muted */
  --text-faint: var(--bma-text-faint);        /* overrides --text-faint */
  --link: var(--bma-primary);                 /* overrides --link */
  --primary: var(--bma-primary);              /* overrides --primary */
  --primary-ink: var(--bma-primary-ink);      /* overrides --primary-ink */
  --primary-soft: var(--bma-primary-soft);    /* overrides --primary-soft */
  --primary-soft-ink: var(--bma-primary);     /* overrides --primary-soft-ink */
  --secondary: var(--bma-accent);             /* overrides --secondary */
  --secondary-soft: #e8eefc;                  /* overrides --secondary-soft */
  --info: var(--bma-accent);                  /* overrides --info */
  --info-soft: #e8eefc;                       /* overrides --info-soft */
  --font-display: "Familjen Grotesk", "Segoe UI", sans-serif; /* overrides --font-display */
  --font-body: "Onest", "Segoe UI", sans-serif;               /* overrides --font-body */

  /* Techivo main.css :root overrides */
  --ct-ff-body: "Onest", sans-serif;          /* overrides --ct-ff-body */
  --ct-ff-heading: "Familjen Grotesk", sans-serif; /* overrides --ct-ff-heading */
  --ct-ff-p: "Onest", sans-serif;             /* overrides --ct-ff-p */
  --ct-theme-1: var(--bma-primary);           /* overrides --ct-theme-1 */
  --ct-common-black: var(--bma-text);         /* overrides --ct-common-black */
  --ct-common-black-2: #292524;               /* overrides --ct-common-black-2 */
  --ct-common-black-3: #1c1917;               /* overrides --ct-common-black-3 */
  --ct-common-black-4: #1c1917;               /* overrides --ct-common-black-4 */
  --ct-grey-1: var(--bma-paper);              /* overrides --ct-grey-1 */
  --ct-grey-2: #f5f0e8;                       /* overrides --ct-grey-2 */
  --ct-grey-3: var(--bma-surface-2);          /* overrides --ct-grey-3 */
  --ct-grey-4: var(--bma-border);             /* overrides --ct-grey-4 */
  --ct-grey-5: #f6f0e8;                       /* overrides --ct-grey-5 */
  --ct-grey-6: #f1e9df;                       /* overrides --ct-grey-6 */
  --ct-grey-7: #f8f3ec;                       /* overrides --ct-grey-7 */
  --ct-text-body: #44403c;                    /* overrides --ct-text-body */
  --ct-text-2: var(--bma-text-muted);         /* overrides --ct-text-2 */
  --ct-border-1: var(--bma-border);           /* overrides --ct-border-1 */
  --ct-border-3: var(--bma-border);           /* overrides --ct-border-3 */
  --ct-border-4: var(--bma-border-strong);    /* overrides --ct-border-4 */
  --ct-border-5: var(--bma-border);           /* overrides --ct-border-5 */
}

/* kept: template lacks the project dark palette tokens. */
:root.dark,
[data-theme="dark"] {
  --bma-primary: #fb923c;
  --bma-primary-ink: #0c0a09;
  --bma-accent: #60a5fa;
  --bma-paper: #0c0a09;
  --bma-surface: #1c1917;
  --bma-surface-2: #292524;
  --bma-border: #3a3430;
  --bma-border-strong: #57504a;
  --bma-text: #f5f5f4;
  --bma-text-muted: #a8a29e;
  --bma-text-faint: #a8a29e;
  --bma-primary-soft: #2a1a10;

  --bg: var(--bma-paper);
  --surface: var(--bma-surface);
  --surface-2: var(--bma-surface-2);
  --surface-raised: var(--bma-surface-2);
  --border: var(--bma-border);
  --border-strong: var(--bma-border-strong);
  --text: var(--bma-text);
  --text-muted: var(--bma-text-muted);
  --text-faint: var(--bma-text-faint);
  --link: var(--bma-primary);
  --primary-soft: var(--bma-primary-soft);
  --primary-soft-ink: var(--bma-primary);
  --secondary-soft: #14233f;
  --info-soft: #14233f;

  --ct-common-black: var(--bma-text);
  --ct-grey-1: var(--bma-paper);
  --ct-grey-2: var(--bma-surface);
  --ct-grey-3: var(--bma-surface-2);
  --ct-text-body: #d6d3d1;
  --ct-text-2: var(--bma-text-muted);
}

/* kept: template lacks the project body font and palette. */
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
}
/* kept: template lacks the project heading font. */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
}

/* kept: dark surfaces cover template cards and legacy light utility backgrounds. */
.dark .card-nexa, .dark .ct-choose__item, .dark .ct-service__item { background: var(--bma-surface); color: var(--bma-text); }
/* kept: legacy utility backgrounds otherwise override the dark palette. */
.dark .bg-white { background: var(--bma-surface) !important; color: var(--bma-text); }
/* kept: dark section and tab backgrounds use the template palette. */
.dark .grey-bg, .dark .bg-slate-100 { background: var(--bma-surface-2); color: var(--bma-text); }
/* kept: dark form controls include disabled and readonly token fields. */
.dark .form-control-nexa, .dark .form-select-nexa, .dark .setup-input-input, .dark .setup-input-textarea, .dark .ct-contact__input input, .dark .ct-contact__input textarea { background: var(--bma-surface-2); color: var(--bma-text); border-color: var(--bma-border-strong); }
/* kept: dark form hints remain readable against the control surface. */
.dark .form-control-nexa::placeholder, .dark .setup-input-input::placeholder, .dark .setup-input-textarea::placeholder { color: var(--bma-text-muted); opacity: 1; }
/* kept: dark usage labels use the muted palette. */
.dark #tab_account .usage-heading, .dark .usage-meter-labels, .dark .text-muted { color: var(--bma-text-muted) !important; }
/* kept: the profile control follows the dark top bar foreground. */
.dark .nexa-topbar button[data-dropdown-toggle="#profileDropdown"] { color: var(--text); }

/* kept: pricing switch and step headings follow both theme palettes. */
.ct-price__btn-bg{background:var(--bma-surface-2);}
.pricing-switch .nav-link,.ct-choose__dsc h3{color:var(--bma-text);}

#tab_payment .payment-summary-card{padding:1rem;min-height:0}
#tab_payment .payment-summary-card .card-nexa-body{padding:0 !important}
#tab_payment .payment-summary-card .usage-meter{margin:0}
#tab_payment .pricing-addons .card-nexa{padding:1rem;min-height:0}
#tab_payment .pricing-addons .card-nexa-body{padding:0 !important}

/* kept: payment plan table labels stay on one line and the table scrolls sideways. */
.plan-table{width:max-content}
.plan-table th:first-child,.plan-table td:first-child{min-width:9rem;white-space:nowrap}
.plan-table th:nth-child(2),.plan-table td:nth-child(2){min-width:5rem;white-space:nowrap}
#tab_payment .table-nexa-scroll{max-width:100%;overflow-x:auto}
#tab_payment .plan-table th:first-child,#tab_payment .plan-table td:first-child{min-width:9rem;white-space:nowrap}
#tab_payment .plan-table th:not(:first-child),#tab_payment .plan-table td:not(:first-child){min-width:6rem;white-space:nowrap}
#tab_payment .pricing-switch{flex-wrap:nowrap;white-space:nowrap}
#tab_payment .pricing-switch .nav-link{padding:.5rem}
.dark #tab_payment .plan-table,.dark #tab_payment .plan-table th,.dark #tab_payment .plan-table td{background:var(--bma-surface);color:var(--bma-text)}
.dark #tab_payment .plan-table .plan-current{background:var(--bma-surface-2);color:var(--bma-text)}

.dark .api-tabs-row{background:var(--bma-surface-2);border-color:var(--bma-border);color:var(--bma-text)}
.dark .nexa-app-shell #api_tabs .tab-item{color:var(--bma-text-muted)}
.dark .nexa-app-shell #api_tabs .tab-item[aria-selected="true"]{color:var(--bma-primary)}

.plan-cards-stacked{display:none}
@media (max-width:519px){#tab_payment .plan-table-desktop{display:none}#tab_payment .plan-cards-stacked{display:block}#tab_payment .plan-card{padding:1rem;margin-bottom:1rem;border:1px solid var(--bma-border);border-radius:.5rem}#tab_payment .plan-card dl{display:grid;grid-template-columns:1fr auto;gap:.5rem}#tab_payment .plan-card dd{margin:0;text-align:right}}

@media (max-width:519px){#tab_payment .pricing-switch{white-space:nowrap;overflow-wrap:normal}#tab_payment .pricing-switch .nav-link,#tab_payment .pricing-switch input{flex-shrink:0}#tab_payment .plan-card p{white-space:nowrap;overflow-wrap:normal}#tab_payment .billing-actions{flex-direction:column}#tab_payment .billing-actions button{width:100%}}
