/* ===========================================================================
   Innovando brand identity → Bootstrap 5 bridge.
   Source of truth: BrandIdentity/IstruzioniIA.md + BrandIdentity/brandColors.css
   (do not invent colors here — only tokens/hex already defined there).
   Loaded after bootstrap.min.css so it overrides Bootstrap's default blue theme;
   loaded before css/styles.css so the app's own --accent/--brand tokens
   (still used by not-yet-migrated custom CSS) resolve to the same brand orange.
   =========================================================================== */

:root {
  /* Bootstrap reads these two everywhere .bg-primary/.text-primary/.border-primary/
     focus rings etc. are used. */
  --bs-primary: var(--brand-orange-500);
  --bs-primary-rgb: 255, 90, 30;
  --bs-primary-text-emphasis: var(--brand-orange-700);
  --bs-primary-bg-subtle: var(--brand-orange-100);
  --bs-primary-border-subtle: var(--brand-orange-200);

  --bs-link-color: var(--brand-orange-600);
  --bs-link-color-rgb: 228, 74, 23;
  --bs-link-hover-color: var(--brand-orange-700);
  --bs-link-hover-color-rgb: 198, 62, 16;

  --bs-body-bg: var(--brand-main-bg);
  --bs-focus-ring-color: rgba(255, 90, 30, 0.25);
}

body { background-color: var(--brand-main-bg); }

/* .btn-primary/.btn-outline-primary ship in bootstrap.min.css with the literal blue
   hardcoded on the --bs-btn-* custom properties (they don't read --bs-primary), so
   they need an explicit override to pick up the brand orange. */
.btn-primary {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--brand-orange-500);
  --bs-btn-border-color: var(--brand-orange-500);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--brand-orange-600);
  --bs-btn-hover-border-color: var(--brand-orange-600);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--brand-orange-700);
  --bs-btn-active-border-color: var(--brand-orange-700);
  --bs-btn-disabled-bg: var(--brand-orange-500);
  --bs-btn-disabled-border-color: var(--brand-orange-500);
  --bs-btn-focus-shadow-rgb: 255, 90, 30;
}

.btn-outline-primary {
  --bs-btn-color: var(--brand-orange-500);
  --bs-btn-border-color: var(--brand-orange-500);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--brand-orange-500);
  --bs-btn-hover-border-color: var(--brand-orange-500);
  --bs-btn-active-bg: var(--brand-orange-600);
  --bs-btn-active-border-color: var(--brand-orange-600);
  --bs-btn-disabled-color: var(--brand-orange-500);
  --bs-btn-disabled-border-color: var(--brand-orange-500);
  --bs-btn-focus-shadow-rgb: 255, 90, 30;
}

.nav-link.active, .nav-pills .nav-link.active { background-color: var(--brand-orange-500); }
.form-control:focus, .form-select:focus { border-color: var(--brand-orange-400); }
.page-link { color: var(--brand-orange-600); }
.page-item.active .page-link { background-color: var(--brand-orange-500); border-color: var(--brand-orange-500); }
