/*
 * NBRND brand layer for the user frontend (Brand book 2027 v3.1).
 * Every frontend layout loads this last, after the generated *.nbrnd.css copies and color.php.
 *
 *  - Nimbus Sans Regular and Bold; natural case; no letter-spacing (pp. 15-16).
 *  - Carbon for chrome (site header, footer, dashboard sidebar); White and Paper work areas (pp. 13, 25).
 *  - Red deep for the primary action and the current module only; status in semantic colours (p. 14).
 *
 * Template note: in the public site CSS, data-theme="dark" is the light look and
 * data-theme="light" the dark look. The user dashboard was dark-only; body.nb-dashboard turns
 * its work area light.
 */

@font-face {
  font-family: 'Nimbus Sans';
  src: url('../../../global/fonts/nbrnd/NimbusSans-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Nimbus Sans';
  src: url('../../../global/fonts/nbrnd/NimbusSans-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Palette (HSL triplets, as the template expects) ---------- */

:root,
[data-theme="dark"],
[data-theme="light"] {
  --nb-font: 'Nimbus Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --heading-font: var(--nb-font);
  --body-font: var(--nb-font);

  /* Red deep #D0121B: identity and the primary action. */
  --base-h: 357;
  --base-s: 84%;
  --base-l: 44%;
  /* Success #1E7A46: buy / up / completed. */
  --base-two-h: 146;
  --base-two-s: 61%;
  --base-two-l: 30%;
  /* Bootstrap modifiers. */
  --primary-h: 357;
  --primary-s: 84%;
  --primary-l: 44%;
  --dark-h: 0;
  --dark-s: 0%;
  --dark-l: 6%;
  --success-h: 146;
  --success-s: 61%;
  --success-l: 30%;
  --danger-h: 4;
  --danger-s: 76%;
  --danger-l: 40%;
  --warning-h: 34;
  --warning-s: 100%;
  --warning-l: 32%;
  --info-h: 216;
  --info-s: 72%;
  --info-l: 44%;
  --static-black: 0 0% 6%;
  --static-white: 0 0% 100%;
  --footer-bg: 0 0% 6%;
  --green: 146 61% 30%;
  --red: 4 76% 40%;

  --nb-red-deep: #d0121b;
  --nb-carbon: #101010;
  --nb-carbon-raised: #1f1f1f;
  --nb-paper: #f4f3f0;
  --nb-line: #dad8d4;
  --nb-grey: #5d5d5d;
  --nb-on-carbon: #b9b7b2;
  --nb-radius: 8px;
  --nb-radius-card: 12px;
  --nb-card-line: #e7e5e1;
  --nb-success: #1e7a46;
  --nb-error: #b42318;
  --nb-warning: #a15c00;
  --nb-info: #1f5fbf;
}

/* Public site, light look (the default). */
:root,
[data-theme="dark"] {
  --white: 0 0% 100%;
  --black: 0 0% 6%;
  --light-h: 0;
  --light-s: 0%;
  --light-l: 36%;
  --border-color: 40 9% 84%;
  --section-bg: 45 15% 95%;
  --section-bg-two: 0 0% 6%;
  --body-background: 0 0% 100%;
}

/* Public site, dark look: White on Carbon. */
[data-theme="light"] {
  --white: 0 0% 6%;
  --black: 0 0% 100%;
  --light-h: 43;
  --light-s: 5%;
  --light-l: 71%;
  --border-color: 0 0% 18%;
  --section-bg: 0 0% 12%;
  --section-bg-two: 0 0% 12%;
  --body-background: 0 0% 6%;
}

/* ---------- Type ---------- */

body,
button,
input,
select,
textarea,
.btn,
h1, h2, h3, h4, h5, h6 {
  font-family: var(--nb-font) !important;
}

body * {
  letter-spacing: 0 !important;
}

.text-uppercase,
.btn,
.badge,
label,
th {
  text-transform: none !important;
}

h1, h2, h3, h4, h5, h6,
b, strong, .fw-bold, .fw-semibold, .fw-medium {
  font-weight: 700;
}

/* ---------- Lockup ---------- */

.nbrnd-lockup {
  display: block;
  height: auto;
  max-width: none;
}

.header .navbar-brand.logo,
.footer-item__logo a,
.sidebar-logo__link {
  display: inline-block;
  line-height: 0;
}

.header .navbar-brand.logo img.nbrnd-lockup,
.footer-item__logo img.nbrnd-lockup {
  width: 132px;
  max-height: none;
}

/* ---------- Buttons ---------- */

.btn {
  border-radius: var(--nb-radius) !important;
  font-weight: 700;
  box-shadow: none !important;
}

.btn--base,
.btn--base.btn {
  background-color: var(--nb-red-deep) !important;
  border-color: var(--nb-red-deep) !important;
  color: #fff !important;
}

.btn--base:hover,
.btn--base:focus,
.btn--base:focus-visible {
  background-color: var(--nb-red-deep) !important;
  background-image: linear-gradient(rgba(0, 0, 0, 0.14), rgba(0, 0, 0, 0.14)) !important;
  color: #fff !important;
}

/* Outline buttons are secondary actions: Carbon, not red. */
.btn--base.outline,
.btn-outline--base {
  background-color: transparent !important;
  border: 1px solid currentColor !important;
  color: hsl(var(--heading-color, var(--black))) !important;
}

.btn--base.outline:hover,
.btn-outline--base:hover {
  background-color: var(--nb-carbon) !important;
  background-image: none !important;
  border-color: var(--nb-carbon) !important;
  color: #fff !important;
}

/* ---------- Forms and surfaces ---------- */

.form--control,
.form-control,
.form-select {
  border-radius: var(--nb-radius) !important;
  box-shadow: none !important;
}

.form--control:focus,
.form-control:focus {
  border-color: hsl(var(--black)) !important;
}

.card,
.custom--card,
.modal-content {
  border-radius: var(--nb-radius-card) !important;
  box-shadow: none !important;
}

.badge {
  border-radius: 999px;
  font-weight: 700;
}

/* ---------- Public site chrome ---------- */

.header,
.header.fixed-header {
  background-color: var(--nb-carbon);
}

.footer-area {
  background-color: var(--nb-carbon);
}

/* ---------- User dashboard: Carbon sidebar, light work area (p. 25) ---------- */

body.nb-dashboard {
  --white: 0 0% 6%;
  --black: 0 0% 100%;
  --body-bg: 45 15% 95%;
  --body-color: 0 0% 36%;
  --light: 0 0% 36%;
  --heading-color: 0 0% 6%;
  --border-color: #dad8d4;
  --card-bg: #ffffff;
  background-color: var(--nb-paper);
}

body.nb-dashboard .dashboard-fluid,
body.nb-dashboard .dashboard-body {
  background-color: var(--nb-paper);
}

/* The sidebar keeps the template's dark values: White on Carbon. */
body.nb-dashboard .sidebar-menu {
  --white: 0 0% 100%;
  --black: 0 0% 6%;
  --body-color: 43 5% 71%;
  background-color: var(--nb-carbon) !important;
}

body.nb-dashboard .sidebar-menu .menu-title {
  color: var(--nb-on-carbon);
}

body.nb-dashboard .sidebar-menu-list__link,
body.nb-dashboard .sidebar-submenu-list__link {
  color: var(--nb-on-carbon) !important;
  border-radius: 0 !important;
}

body.nb-dashboard .sidebar-menu-list__link:hover,
body.nb-dashboard .sidebar-submenu-list__link:hover {
  background-color: var(--nb-carbon-raised) !important;
  color: #fff !important;
}

/* Red deep marks the current module. */
body.nb-dashboard .sidebar-menu-list__link.active,
body.nb-dashboard .sidebar-menu-list__item.active > a,
body.nb-dashboard .sidebar-submenu-list__item.active > a {
  background-color: var(--nb-red-deep) !important;
  color: #fff !important;
}

body.nb-dashboard .sidebar-menu-list__link.active .icon,
body.nb-dashboard .sidebar-menu-list__link.active .icon * {
  color: #fff !important;
}

body.nb-dashboard .sidebar-logo {
  padding-bottom: 8px;
}

/* Work-area panels: white, flat, ruled. */
body.nb-dashboard .dashboard-header {
  background-color: #fff;
  border-bottom: 1px solid var(--nb-line);
}

body.nb-dashboard .custom--card,
body.nb-dashboard .card,
body.nb-dashboard .dashboard-card,
body.nb-dashboard .table-wrapper {
  background-color: #fff !important;
  border: 0 !important;
}

body.nb-dashboard .form--control,
body.nb-dashboard .form-control,
body.nb-dashboard .copy-link input {
  background-color: #fff !important;
  border: 1px solid var(--nb-line) !important;
  color: var(--nb-carbon) !important;
}

body.nb-dashboard .table thead tr th {
  background-color: #fff !important;
  color: var(--nb-grey) !important;
  font-weight: 400;
  border-bottom: 1px solid var(--nb-line) !important;
}

body.nb-dashboard .table tbody tr td {
  color: var(--nb-carbon);
  border-color: var(--nb-line) !important;
  background-color: #fff;
}

/* ---------- Sign-in and sign-up brand panel (brand book p. 24) ---------- */

.account-left {
  background-color: var(--nb-carbon) !important;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.account-left__logo {
  line-height: 0;
}

/* The brand panel carries the lockup and one headline; no stock imagery. */
.account-left__thumb {
  display: none !important;
}

.account-left__subtitle {
  color: var(--nb-on-carbon) !important;
  font-size: 1rem;
  font-weight: 400;
}

.account-left__title {
  color: #fff !important;
  font-size: 44px;
  line-height: 1.05;
  font-weight: 400;
}

.account-left__title::before {
  display: none;
}

.account-link,
.forgot-password,
.account-form a:not(.btn) {
  color: var(--nb-red-deep);
}

/* File pickers are a secondary control: Carbon, not red. */
input[type="file"]::file-selector-button {
  background-color: var(--nb-carbon) !important;
  color: #fff !important;
  border: 0;
  border-radius: var(--nb-radius);
}

/* =====================================================================
 * Dashboard components (user overview and every page in the user area)
 * White cards on Paper, a 1px rule, no shadows; big tabular figures;
 * status in semantic colours only. Red deep stays for the primary action.
 * ===================================================================== */

body.nb-dashboard .dashboard-body {
  padding: 28px 32px 40px;
}

body.nb-dashboard .custom--card,
body.nb-dashboard .card,
body.nb-dashboard .dashboard-card,
body.nb-dashboard .table-wrapper {
  border: 1px solid var(--nb-card-line) !important;
  border-radius: var(--nb-radius-card) !important;
}

body.nb-dashboard .custom--card .card-header,
body.nb-dashboard .card .card-header {
  background: transparent !important;
  border-bottom: 1px solid var(--nb-card-line) !important;
  padding: 18px 20px;
}

body.nb-dashboard .table-wrapper {
  overflow: hidden;
}

body.nb-dashboard .table tbody tr:hover td {
  background-color: #faf9f7 !important;
}

body.nb-dashboard .table td,
body.nb-dashboard .table th {
  font-variant-numeric: tabular-nums;
  padding-top: 14px !important;
  padding-bottom: 14px !important;
}

body.nb-dashboard .badge,
body.nb-dashboard .badge--success,
body.nb-dashboard .badge--danger,
body.nb-dashboard .badge--warning {
  border-radius: 999px !important;
  padding: 4px 10px;
  font-size: 12px;
}

body.nb-dashboard .dashboard-header {
  padding-left: 32px;
  padding-right: 32px;
}

/* The overview has no right-hand sidebar any more. */
body.nb-dashboard .dashboard-body__bar.style {
  display: none !important;
}

body.nb-dashboard .scroll-top {
  background: var(--nb-carbon) !important;
  color: #fff !important;
  border-radius: 50% !important;
}

body.nb-dashboard .dashboard-body > h4 {
  font-size: 28px;
  line-height: 1.15;
  color: var(--nb-carbon);
}
