/**
 * CONTEXT: Shared theme overrides for the LMS, loaded after Bootstrap 5 on every
 *          page (index.html, listings.html, listing.html). Centralizes the brand
 *          color so it can be changed in one place instead of per-page.
 * UPSTREAM: Linked from each public/*.html <head>, directly after the Bootstrap CDN <link>.
 * DOWNSTREAM: Recolors primary buttons, the top navbar/toolbar, links and focus rings.
 * FAILURE: Purely cosmetic — if this file fails to load, pages fall back to default
 *          Bootstrap blue with no loss of functionality.
 */

/* ======== BRAND COLOR ======== */
/* Single source of truth for the primary brand color (#1c7430, a forest green). */
:root {
  --brand-primary: #1c7430;        /* base */
  --brand-primary-hover: #186329;  /* ~15% darker, used for hover */
  --brand-primary-active: #145323; /* darker still, used for active/pressed */

  /* Feed the brand color into Bootstrap's own variables so links, form controls,
     focus rings, etc. pick it up automatically. */
  --bs-primary: var(--brand-primary);
  --bs-primary-rgb: 28, 116, 48;
}

/* ======== PRIMARY BUTTONS ======== */
/* Bootstrap's compiled .btn-primary uses hard-coded blues, so we override the
   per-button variables it reads at runtime. */
.btn-primary {
  --bs-btn-bg: var(--brand-primary);
  --bs-btn-border-color: var(--brand-primary);
  --bs-btn-hover-bg: var(--brand-primary-hover);
  --bs-btn-hover-border-color: var(--brand-primary-hover);
  --bs-btn-active-bg: var(--brand-primary-active);
  --bs-btn-active-border-color: var(--brand-primary-active);
  --bs-btn-disabled-bg: var(--brand-primary);
  --bs-btn-disabled-border-color: var(--brand-primary);
}

/* ======== TOP TOOLBAR / NAVBAR ======== */
/* Pages use <nav class="navbar navbar-dark bg-dark">. Scope the override to the
   navbar so the green only recolors the toolbar; navbar-dark keeps text white. */
.navbar.bg-dark {
  background-color: var(--brand-primary) !important;
}

/* ======== LOGIN BRANDING ======== */
/* Used only on index.html (the login card). Adds a small logo mark + brand name
   above the form so the page reads as "Caribbean House Hunt" rather than a bare
   "Login". Kept here so the brand color stays the single source of truth. */
.brand-logo {
  width: 64px;
  height: 64px;
  border-radius: 12px;   /* soften the square app-icon corners */
}
.brand-name {
  color: var(--brand-primary);
  font-weight: 700;
}
