/**
 * Noatum – Custom Theme Stylesheet
 * Design framework: Bootstrap 5
 * Primary colour: #AF2626
 */

/* =========================================================
   1. Design Tokens (CSS Custom Properties)
   ========================================================= */
:root {
  --noatum-primary:        #AF2626;
  --noatum-primary-dark:   #8c1e1e;
  --noatum-primary-light:  #d44f4f;
  --noatum-primary-muted:  rgba(175, 38, 38, 0.1);

  --noatum-neutral-50:     #f8f9fa;
  --noatum-neutral-100:    #f1f3f5;
  --noatum-neutral-200:    #e9ecef;
  --noatum-neutral-700:    #495057;
  --noatum-neutral-800:    #343a40;
  --noatum-neutral-900:    #212529;

  --noatum-sidebar-width:  260px;
  --noatum-header-height:  64px;
  --noatum-font-sans:      'Inter', system-ui, -apple-system, sans-serif;
  --noatum-radius:         6px;
  --noatum-shadow-sm:      0 1px 3px rgba(0,0,0,.08);
  --noatum-shadow:         0 2px 8px rgba(0,0,0,.12);
  --noatum-shadow-lg:      0 4px 20px rgba(0,0,0,.15);
  --noatum-transition:     0.18s ease;
}

/* =========================================================
   2. Override Bootstrap 5 Primary Colour
   ========================================================= */
:root {
  --bs-primary:            #AF2626;
  --bs-primary-rgb:        175, 38, 38;
  --bs-link-color:         #AF2626;
  --bs-link-hover-color:   #8c1e1e;
}

/* =========================================================
   3. Typography
   ========================================================= */
body {
  font-family: var(--noatum-font-sans);
  font-size: 0.9375rem;
  color: var(--noatum-neutral-900);
  background-color: var(--noatum-neutral-100);
}

/* Offset sticky header (topbar 36px + main bar ~65px) */
html {
  scroll-padding-top: 101px;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  color: var(--noatum-neutral-900);
}

a {
  color: var(--noatum-primary);
  text-decoration: none;
}
a:hover {
  color: var(--noatum-primary-dark);
  text-decoration: underline;
}

/* =========================================================
   4. Page Layout
   ========================================================= */
.layout-container {
  max-width: 100%;
}

/* Full-width layout for data-heavy pages */
main .container,
main .container-fluid {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* =========================================================
   5. Header
   ========================================================= */

/* Red accent bar at the top */
.site-header__topbar {
  background-color: var(--noatum-primary);
  height: 36px;
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
}

.site-header__topbar nav a {
  color: rgba(255,255,255,0.9);
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.25rem 0.625rem;
  transition: color var(--noatum-transition);
}

.site-header__topbar nav a:hover {
  color: #fff;
  text-decoration: none;
}

/* Settings / cog dropdown */
.site-header__settings-btn {
  color: rgba(255,255,255,0.85);
  background: transparent;
  border: none;
  padding: 0.25rem 0.375rem;
  font-size: 1rem;
  line-height: 1;
  border-radius: var(--noatum-radius);
  transition: color var(--noatum-transition), background-color var(--noatum-transition);
}
.site-header__settings-btn:hover,
.site-header__settings-btn:focus,
.site-header__settings-btn[aria-expanded="true"] {
  color: #fff;
  background-color: rgba(255,255,255,0.15);
  outline: none;
}
.site-header__settings-btn .bi {
  font-size: 1rem;
  display: block;
}

/* Dropdown panel */
.site-header__topbar .dropdown-menu {
  min-width: 160px;
  border: 1px solid var(--noatum-neutral-200);
  border-radius: var(--noatum-radius);
  box-shadow: var(--noatum-shadow);
  margin-top: 0.25rem;
  z-index: 10000;
}
.site-header__topbar .dropdown-item {
  font-size: 0.875rem;
  color: var(--noatum-neutral-800);
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
}
.site-header__topbar .dropdown-item:hover {
  background-color: var(--noatum-primary-muted);
  color: var(--noatum-primary);
}

/* White logo + nav bar */
.site-header__main {
  background-color: #fff;
  border-bottom: 1px solid var(--noatum-neutral-200);
  box-shadow: var(--noatum-shadow-sm);
  display: flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  position: sticky;
  top: 0;
  gap: 2rem;
}

.site-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.site-logo__img {
  height: 40px;
  width: auto;
  max-width: 300px;
  display: block;
}

/* Primary navigation — top-level bar */
.site-header__nav,
.site-header__nav > div,
.site-header__nav > div > nav {
  display: flex;
  align-items: center;
}

.site-header__nav ul.navbar-nav {
  display: flex;
  flex-direction: row;
  gap: 0.125rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
  align-items: center;
}

/* Top-level nav links and toggle buttons */
.site-header__nav .nav-link {
  display: block;
  padding: 0.5rem 0.875rem;
  color: var(--noatum-neutral-800);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--noatum-radius);
  transition: background-color var(--noatum-transition), color var(--noatum-transition);
  white-space: nowrap;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1.5;
}

.site-header__nav .nav-link:hover,
.site-header__nav .nav-link.active,
.site-header__nav .nav-item.active > .nav-link {
  background-color: var(--noatum-primary-muted);
  color: var(--noatum-primary);
  text-decoration: none;
}

/* Dropdown panel */
.site-header__nav .dropdown-menu {
  min-width: 11rem;
  padding: 0.375rem 0;
  border: 1px solid var(--noatum-neutral-200);
  border-radius: var(--noatum-radius);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  background: #fff;
}

.site-header__nav .dropdown-item {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  color: var(--noatum-neutral-800);
  white-space: nowrap;
  transition: background-color var(--noatum-transition), color var(--noatum-transition);
}

.site-header__nav .dropdown-item:hover,
.site-header__nav .dropdown-item.active {
  background-color: var(--noatum-primary-muted);
  color: var(--noatum-primary);
  text-decoration: none;
}

/* =========================================================
   6. Breadcrumb
   ========================================================= */
.breadcrumb {
  background: transparent;
  padding: 0.625rem 0;
  margin-bottom: 0;
  font-size: 0.8125rem;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: '›';
  color: var(--noatum-neutral-700);
}

.breadcrumb-item.active {
  color: var(--noatum-neutral-700);
}

/* =========================================================
   7. Content Region
   ========================================================= */
.region-content {
  background-color: #fff;
  border-radius: var(--noatum-radius);
  box-shadow: var(--noatum-shadow-sm);
  padding: 1.75rem;
}

/* Page title */
.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--noatum-neutral-900);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--noatum-neutral-200);
}

/* =========================================================
   8. Buttons (Bootstrap 5 overrides)
   ========================================================= */
.btn-primary {
  --bs-btn-bg:                 var(--noatum-primary);
  --bs-btn-border-color:       var(--noatum-primary);
  --bs-btn-hover-bg:           var(--noatum-primary-dark);
  --bs-btn-hover-border-color: var(--noatum-primary-dark);
  --bs-btn-active-bg:          var(--noatum-primary-dark);
  --bs-btn-focus-shadow-rgb:   175, 38, 38;
  font-weight: 500;
}

.btn-outline-primary {
  --bs-btn-color:              var(--noatum-primary);
  --bs-btn-border-color:       var(--noatum-primary);
  --bs-btn-hover-bg:           var(--noatum-primary);
  --bs-btn-hover-border-color: var(--noatum-primary);
  --bs-btn-active-bg:          var(--noatum-primary);
  font-weight: 500;
}

.btn {
  border-radius: var(--noatum-radius);
  font-size: 0.875rem;
  padding: 0.4375rem 1rem;
}

.btn-sm {
  font-size: 0.8125rem;
  padding: 0.3rem 0.75rem;
}

/* =========================================================
   9. Forms (Bootstrap 5 + Drupal)
   ========================================================= */
.form-control,
.form-select {
  border-color: var(--noatum-neutral-200);
  border-radius: var(--noatum-radius);
  font-size: 0.9rem;
  padding: 0.5625rem 0.875rem;
  min-height: 44px;
  background-color: #fafafa;
  color: var(--noatum-neutral-900);
  transition: border-color var(--noatum-transition), box-shadow var(--noatum-transition),
              background-color var(--noatum-transition);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--noatum-primary);
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(175, 38, 38, 0.12);
  outline: none;
}

.form-control:hover:not(:focus),
.form-select:hover:not(:focus) {
  border-color: #adb5bd;
}

textarea.form-control {
  min-height: auto;
  resize: vertical;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--noatum-neutral-800);
  margin-bottom: 0.35rem;
  letter-spacing: 0.01em;
}

/* Drupal form descriptions */
.form-item__description,
.description {
  font-size: 0.8rem;
  color: var(--noatum-neutral-700);
  margin-top: 0.3rem;
  line-height: 1.5;
}

/* Form item wrappers */
.form-item {
  margin-bottom: 1.25rem;
}

/* Fieldsets */
fieldset {
  border: 1px solid var(--noatum-neutral-200);
  border-radius: var(--noatum-radius);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

legend {
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0 0.5rem;
  color: var(--noatum-neutral-800);
  float: none;
  width: auto;
}

/* Required field indicator */
.form-required::after {
  content: ' *';
  color: var(--noatum-primary);
}

/* Inline forms */
.form-actions {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-wrap: wrap;
  padding-top: 1rem;
  border-top: 1px solid var(--noatum-neutral-200);
  margin-top: 1.5rem;
}

/* Validation error state */
.form-control.error,
.form-control:invalid:not(:placeholder-shown) {
  border-color: #dc3545;
  background-color: #fff8f8;
}

.form-item--error-message {
  color: #dc3545;
  font-size: 0.8rem;
  margin-top: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* =========================================================
   10. Tables (wide data tables for logistics)
   ========================================================= */
.table-responsive-wrapper {
  overflow-x: auto;
  /* Explicitly non-"visible" (rather than the default) so the browser
     doesn't pair it with overflow-x and turn this wrapper into a vertical
     scroll container — that would make it the containing block for the
     sticky <thead>, causing it to stick mid-table instead of to the
     viewport/toolbar. */
  overflow-y: clip;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--noatum-radius);
  border: 1px solid var(--noatum-neutral-200);
}

.table {
  font-size: 0.875rem;
  margin-bottom: 0;
}

.table > thead {
  background-color: var(--noatum-neutral-50);
  border-bottom: 2px solid var(--noatum-neutral-200);
}

.table > thead th {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--noatum-neutral-700);
  padding: 0.75rem 1rem;
  white-space: nowrap;
  vertical-align: middle;
}

/* Sortable column headers */
.table > thead th a {
  color: inherit;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.table > thead th a:hover {
  color: var(--noatum-primary);
}

.table > tbody td {
  padding: 0.6875rem 1rem;
  vertical-align: middle;
  border-color: var(--noatum-neutral-200);
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
  background-color: rgba(248, 249, 250, 0.6);
}

.table-hover > tbody > tr:hover > * {
  background-color: var(--noatum-primary-muted);
  cursor: pointer;
}

/* Status badges in tables */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.status-badge--active    { background: #d1fae5; color: #065f46; }
.status-badge--pending   { background: #fef3c7; color: #92400e; }
.status-badge--transit   { background: #dbeafe; color: #1e40af; }
.status-badge--delivered { background: #d1fae5; color: #065f46; }
.status-badge--cancelled { background: #fee2e2; color: #991b1b; }
.status-badge--draft     { background: #f3f4f6; color: #374151; }

/* =========================================================
   11. Cards
   ========================================================= */
.card {
  border: 1px solid var(--noatum-neutral-200);
  border-radius: var(--noatum-radius);
  box-shadow: var(--noatum-shadow-sm);
}

.card-header {
  background-color: var(--noatum-neutral-50);
  border-bottom: 1px solid var(--noatum-neutral-200);
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 0.875rem 1.25rem;
}

/* KPI/summary cards */
.kpi-card {
  background: #fff;
  border-radius: var(--noatum-radius);
  border: 1px solid var(--noatum-neutral-200);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--noatum-shadow-sm);
}

.kpi-card__value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--noatum-primary);
  line-height: 1;
}

.kpi-card__label {
  font-size: 0.8125rem;
  color: var(--noatum-neutral-700);
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* =========================================================
   12. Alerts & Messages (Drupal status messages)
   ========================================================= */

/* Drupal 10 renders messages via role attributes, not .messages--* classes */
[data-drupal-messages] [role="contentinfo"] {
  margin-bottom: 1rem;
}

[data-drupal-messages] [role="alert"],
[data-drupal-messages] [role="status"] {
  border-radius: var(--noatum-radius);
  border-left: 4px solid transparent;
  padding: 0.75rem 1rem 0.75rem 1.125rem;
  font-size: 0.875rem;
  line-height: 1.5;
}

/* Error */
[data-drupal-messages] [aria-label="Error message"] [role="alert"] {
  background: #fff8f8;
  border-left-color: var(--noatum-primary);
  color: #7f1d1d;
}

/* Status / success */
[data-drupal-messages] [aria-label="Status message"] [role="status"] {
  background: #f0fdf4;
  border-left-color: #198754;
  color: #14532d;
}

/* Warning */
[data-drupal-messages] [aria-label="Warning message"] [role="status"] {
  background: #fffbeb;
  border-left-color: #d97706;
  color: #78350f;
}

/* Remove default bullet list */
[data-drupal-messages] ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

[data-drupal-messages] li + li {
  margin-top: 0.25rem;
}

/* Also keep .messages--* for any contrib modules that still use them */
.messages--error  { background: #fff8f8; border-left: 4px solid var(--noatum-primary); color: #7f1d1d; border-radius: var(--noatum-radius); padding: 0.75rem 1rem 0.75rem 1.125rem; }
.messages--status { background: #f0fdf4; border-left: 4px solid #198754; color: #14532d; border-radius: var(--noatum-radius); padding: 0.75rem 1rem 0.75rem 1.125rem; }
.messages--warning{ background: #fffbeb; border-left: 4px solid #d97706; color: #78350f; border-radius: var(--noatum-radius); padding: 0.75rem 1rem 0.75rem 1.125rem; }

/* =========================================================
   Toast notifications
   ========================================================= */
#noatum-toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: min(420px, calc(100vw - 2rem));
  pointer-events: none;
}

.noatum-toast {
  pointer-events: auto;
  background: #fff;
  border-radius: var(--noatum-radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.18), 0 2px 6px rgba(0,0,0,0.10);
  overflow: hidden;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  min-width: 280px;
}

.noatum-toast.noatum-toast--visible {
  opacity: 1;
  transform: translateY(0);
}

.noatum-toast.noatum-toast--hiding {
  opacity: 0;
  transform: translateY(12px);
}

.noatum-toast-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.875rem;
  color: #fff;
}

.noatum-toast-header.bg-warning.text-dark,
.noatum-toast-header.text-dark {
  color: #1a1a1a;
}

.noatum-toast-icon {
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
}

.noatum-toast-title {
  flex: 1;
  font-size: 0.875rem;
  font-weight: 600;
}

.noatum-toast-close {
  background: none;
  border: none;
  color: inherit;
  opacity: 0.75;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.125rem;
  flex-shrink: 0;
}

.noatum-toast-close:hover {
  opacity: 1;
}

.noatum-toast-body {
  padding: 0.75rem 0.875rem;
  font-size: 0.875rem;
  color: #1a1a1a;
  line-height: 1.5;
}

/* =========================================================
   13. Sidebar
   ========================================================= */
.layout-sidebar-first .region-sidebar-first,
.layout-sidebar-second .region-sidebar-second {
  background: #fff;
  border-radius: var(--noatum-radius);
  border: 1px solid var(--noatum-neutral-200);
  padding: 1.25rem;
  box-shadow: var(--noatum-shadow-sm);
}

/* =========================================================
   14. Pagination
   ========================================================= */
.pager .page-link {
  color: var(--noatum-primary);
  border-color: var(--noatum-neutral-200);
  font-size: 0.875rem;
}

.pager .page-link:hover {
  background-color: var(--noatum-primary-muted);
  border-color: var(--noatum-primary);
}

.pager .page-item.active .page-link {
  background-color: var(--noatum-primary);
  border-color: var(--noatum-primary);
}

/* =========================================================
   15. Tabs (Drupal local tasks)
   ========================================================= */
.tabs--primary {
  border-bottom: 2px solid var(--noatum-neutral-200);
  margin-bottom: 1.5rem;
  display: flex;
  gap: 0.125rem;
  flex-wrap: wrap;
}

.tabs--primary .tabs__tab {
  list-style: none;
}

.tabs--primary .tabs__link {
  display: block;
  padding: 0.6rem 1.125rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--noatum-neutral-700);
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: var(--noatum-radius) var(--noatum-radius) 0 0;
  margin-bottom: -2px;
  transition: color var(--noatum-transition), background var(--noatum-transition);
}

.tabs--primary .tabs__link:hover {
  color: var(--noatum-primary);
  background-color: var(--noatum-neutral-50);
  text-decoration: none;
}

.tabs--primary .tabs__link--active-trail,
.tabs--primary .is-active .tabs__link {
  color: var(--noatum-primary);
  background-color: #fff;
  border-color: var(--noatum-neutral-200);
  border-bottom-color: #fff;
}

/* =========================================================
   16. Footer
   ========================================================= */
.site-footer {
  background-color: var(--noatum-neutral-900);
  color: rgba(255,255,255,0.65);
  font-size: 0.8125rem;
  padding: 2rem 1.5rem;
  margin-top: 3rem;
}

.site-footer a {
  color: rgba(255,255,255,0.8);
}

.site-footer a:hover {
  color: #fff;
}

/* =========================================================
   17. Utilities
   ========================================================= */
.text-primary { color: var(--noatum-primary) !important; }
.bg-primary   { background-color: var(--noatum-primary) !important; }
.border-primary { border-color: var(--noatum-primary) !important; }

/* Sticky table headers: sticky <thead> renders incorrectly inside Drupal's
  responsive table wrapper. Keep the thead in document flow and pin each
  header cell to the page viewport instead. */
.table-responsive-wrapper:has(> table.sticky-header) {
  overflow: visible;
}

table.sticky-header thead {
  position: static !important;
  top: auto !important;
}

table.sticky-header thead th,
.table-sticky-header thead th {
  position: sticky;
  /* The site's header has scrolled away when a table header reaches its
     sticky threshold. Drupal supplies the only remaining fixed offset:
     0px for standard users and the live toolbar/tray height for admins. */
  top: var(--drupal-displace-offset-top, 0px);
  /* Keep sticky headers above table rows, but below the side panel/overlay. */
  z-index: 200;
  background-color: var(--noatum-neutral-50);
}

/* =========================================================
   18. CKEditor body styles
   ========================================================= */
/* (loaded via ckeditor_stylesheets) */

/* =========================================================
   19. Anonymous front-page hero
   ========================================================= */
.anon-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--noatum-header-height) - 36px - 80px);
  padding: 2rem 1rem;
}

.anon-hero__card {
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--noatum-shadow-lg);
  padding: 3rem 2.5rem;
  max-width: 480px;
  width: 100%;
  text-align: center;
}

.anon-hero__logo {
  width: 200px;
  height: auto;
  margin-bottom: 2rem;
}

.anon-hero__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--noatum-neutral-900);
  margin-bottom: 0.75rem;
}

.anon-hero__text {
  color: var(--noatum-neutral-700);
  font-size: 0.9375rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.anon-hero__btn {
  background-color: var(--noatum-primary);
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.65rem 2rem;
  border-radius: var(--noatum-radius);
  border: none;
  transition: background-color var(--noatum-transition);
  display: inline-block;
  margin-bottom: 1.5rem;
}

.anon-hero__btn:hover {
  background-color: var(--noatum-primary-dark);
  color: #fff;
  text-decoration: none;
}

.anon-hero__login-hint {
  font-size: 0.875rem;
  color: var(--noatum-neutral-700);
  margin-bottom: 0;
}

.anon-hero__login-hint a {
  color: var(--noatum-primary);
  font-weight: 500;
}

/* =========================================================
   20. Registration & public forms
   ========================================================= */

/* ── Progress bar ── */
.reg-progress {
  background: #fff;
  border-radius: 10px;
  padding: 1.5rem 2rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--noatum-shadow);
}

.reg-progress__steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.reg-progress__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 auto;
  min-width: 90px;
}

/* Connecting line between steps */
.reg-progress__connector {
  flex: 1;
  height: 2px;
  background: var(--noatum-neutral-200);
  margin-top: 1.25rem; /* vertically centred with the 2.5rem dot */
  border-radius: 2px;
  transition: background-color 0.4s ease;
}

.reg-progress__connector.is-done {
  background: var(--noatum-primary);
}

/* Step dot */
.reg-progress__dot {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  background: var(--noatum-neutral-100);
  color: var(--noatum-neutral-700);
  border: 2px solid var(--noatum-neutral-200);
  position: relative;
  z-index: 1;
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.reg-progress__step.is-active .reg-progress__dot {
  background: var(--noatum-primary);
  border-color: var(--noatum-primary);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(175, 38, 38, 0.15);
}

.reg-progress__step.is-done .reg-progress__dot {
  background: #1a7a4a;
  border-color: #1a7a4a;
  color: #fff;
}

/* Step label */
.reg-progress__label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--noatum-neutral-700);
  margin-top: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
  white-space: nowrap;
}

.reg-progress__step.is-active .reg-progress__label {
  color: var(--noatum-primary);
}

.reg-progress__step.is-done .reg-progress__label {
  color: var(--noatum-neutral-900);
}

/* Constrain + centre on the /register page */
.route--noatum-customers-register .region-content {
  max-width: 700px;
  margin: 0 auto;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

/* Hide breadcrumb on public registration page */
.route--noatum-customers-register .block-system-breadcrumb-block {
  display: none;
}

/* ── Section cards ── */
.noatum-registration-form .registration-section {
  border: none;
  border-radius: 10px;
  padding: 0;
  margin-bottom: 1.75rem;
  box-shadow: var(--noatum-shadow);
  background: #fff;
  overflow: hidden;
}

/* Colored header bar with step counter */
.noatum-registration-form {
  counter-reset: reg-section;
}

.noatum-registration-form .registration-section > legend {
  counter-increment: reg-section;
  background: linear-gradient(135deg, var(--noatum-primary) 0%, var(--noatum-primary-dark) 100%);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.9rem 1.5rem;
  width: 100%;
  float: none;
  margin: 0;
  border-radius: 0;
  display: block;
}

.noatum-registration-form .registration-section > legend .fieldset-legend::before {
  content: counter(reg-section);
  display: inline-block;
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
  border-radius: 50%;
  width: 1.5rem;
  height: 1.5rem;
  line-height: 1.5rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 800;
  margin-right: 0.6rem;
  vertical-align: middle;
}

/* Content area inside each section */
.noatum-registration-form .registration-section > .fieldset-wrapper {
  padding: 1.5rem 1.5rem 0.25rem;
}

/* ── Two-column grid for name fields ── */
.noatum-registration-form .contact-section > .fieldset-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1.25rem;
}

/* Items 3+ span full width (email, phone, job title) */
.noatum-registration-form .contact-section > .fieldset-wrapper > .form-item:nth-child(n+3) {
  grid-column: 1 / -1;
}

/* ── Submit area ── */
.noatum-registration-form .form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  background: transparent;
  border: none;
  border-top: 1px solid var(--noatum-neutral-200);
  padding: 1.25rem 0 0;
  margin-top: 0.5rem;
  gap: 0.75rem;
}

/* Back button: visually first but last in DOM for correct tab order */
.noatum-registration-form .form-actions .reg-back-btn {
  order: -1;
}

.noatum-registration-form .form-actions .btn-primary,
.noatum-registration-form .form-actions input[type="submit"].btn-primary {
  padding: 0.6rem 1.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: var(--noatum-radius);
  box-shadow: 0 2px 6px rgba(175, 38, 38, 0.35);
  transition: background-color var(--noatum-transition),
              box-shadow var(--noatum-transition),
              transform var(--noatum-transition);
}

.noatum-registration-form .form-actions .btn-primary:hover,
.noatum-registration-form .form-actions input[type="submit"].btn-primary:hover {
  box-shadow: 0 4px 12px rgba(175, 38, 38, 0.45);
  transform: translateY(-1px);
}

.noatum-registration-form .form-actions .btn-outline-secondary {
  --bs-btn-hover-bg:           var(--noatum-neutral-200);
  --bs-btn-hover-border-color: var(--noatum-neutral-700);
  --bs-btn-hover-color:        var(--noatum-neutral-900);
  font-size: 0.875rem;
  color: var(--noatum-neutral-700);
  border-color: var(--noatum-neutral-200);
  padding: 0.6rem 1.25rem;
  border-radius: var(--noatum-radius);
}

/* ── Inputs inside the registration form ── */
.noatum-registration-form .form-control,
.noatum-registration-form .form-select {
  background-color: #fff;
  border-color: #dde1e7;
}

.noatum-registration-form .form-control:focus {
  border-color: var(--noatum-primary);
  box-shadow: 0 0 0 3px rgba(175, 38, 38, 0.1);
}

/* Page title for register page */
.route--noatum-customers-register h1.page-title {
  font-size: 1.625rem;
  font-weight: 700;
  color: var(--noatum-neutral-900);
  margin-bottom: 1.5rem;
  border: none;
  padding: 0;
}

/* ── Registration page: error summary card ── */
/* Aligns the messages wrapper with the form's max-width */
.route--noatum-customers-register [data-drupal-messages] {
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* Replace the generic pink block with a clean white card */
.route--noatum-customers-register [data-drupal-messages] [aria-label="Error message"] [role="alert"] {
  background: #fff;
  border-left: 4px solid var(--noatum-primary);
  border-radius: 0 var(--noatum-radius) var(--noatum-radius) 0;
  padding: 0.875rem 1.25rem;
  box-shadow: var(--noatum-shadow);
  color: var(--noatum-neutral-800);
  font-size: 0.875rem;
  line-height: 1.65;
}

/* Style the jump-links to match brand colour */
.route--noatum-customers-register [data-drupal-messages] [aria-label="Error message"] [role="alert"] a {
  color: var(--noatum-primary);
  font-weight: 600;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.route--noatum-customers-register [data-drupal-messages] [aria-label="Error message"] [role="alert"] a:hover {
  color: var(--noatum-primary-dark);
}

/* =========================================================
   Views: Exposed filter row
   ========================================================= */

/**
 * Lay out all exposed filters in a wrapping flex row so they sit
 * side-by-side rather than stacking full-width.  Each .form-item
 * grows to fill available space; the actions (submit/reset) shrink
 * to fit their content and align to the bottom of the row.
 */
.noatum-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  margin-bottom: 1em;
}

.noatum-filter-row .form-item {
  flex: 1 1 180px;
  min-width: 0;
  margin: 0;
}

.noatum-filter-row .form-actions {
  flex: 0 0 auto;
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
  margin: 0;
  padding: 0;
  border: none;
}

.noatum-filter-row .form-actions .btn {
  align-self: flex-end;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Side panel — admin forms slide in from the right
   ═══════════════════════════════════════════════════════════════════════════ */

/*
 * CSS custom properties.
 * --nsp-top  : set by JS to the bottom edge of the Drupal toolbar.
 * --nsp-width: panel width (42 % of viewport).
 */
:root {
  --nsp-top: 0px;
  --nsp-width: 42vw;
}

/* ── Dim overlay ── */
#nsp-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.22);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  z-index: 498;
}

#nsp-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* ── Panel shell ── */
#nsp {
  position: fixed;
  top: var(--nsp-top);
  right: 0;
  width: var(--nsp-width);
  min-width: 400px;
  height: calc(100vh - var(--nsp-top));
  background: #fff;
  box-shadow: -6px 0 32px rgba(0, 0, 0, 0.14);
  z-index: 499; /* below Drupal toolbar (~500+) so toolbar stays on top */
  display: flex;
  flex-direction: column;
  transform: translateX(105%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}

#nsp.is-open {
  transform: translateX(0);
}

/* ── Panel header ── */
.nsp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid #e9ecef;
  background: #f8f9fa;
  flex-shrink: 0;
}

.nsp-title {
  margin: 0 !important;
  padding: 0 !important;
  font-size: 1.05rem !important;
  font-weight: 600 !important;
  color: #212529 !important;
  line-height: 1.3 !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nsp-close {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border: none;
  background: none;
  color: #6c757d;
  font-size: 1rem;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.nsp-close:hover {
  background: #e9ecef;
  color: #212529;
}

/* ── Panel body ── */
.nsp-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1.5rem;
  /* Claro can render its own padding inside; keep the panel tidy. */
}

/* Remove the max-width we apply to standalone admin forms — inside the
   panel the available width is already constrained by the panel itself. */
#nsp .noatum-admin-form,
.nsp-body form {
  max-width: none !important;
}

/* Tighten standard Drupal form spacing inside the panel. */
.nsp-body .form-item {
  margin-top: 0.625rem !important;
}

/* ── Loading spinner ── */
.nsp-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4rem 0;
}

.nsp-spinner {
  display: block;
  width: 2.25rem;
  height: 2.25rem;
  border: 3px solid #dee2e6;
  border-top-color: #af2626;
  border-radius: 50%;
  animation: nsp-spin 0.75s linear infinite;
}

@keyframes nsp-spin {
  to { transform: rotate(360deg); }
}




a[href*="/masquerade?"],
a[href*="/unmasquerade?"] {
  background: var(--noatum-primary);
  color: #fff;
  font-weight: bold;
  padding: 5px 10px;
  display: inline-block;
}

li:has(a[href*="/masquerade?"])::marker,
li:has(a[href*="/unmasquerade?"])::marker {
  content: none;
}