/*
  Shared tokens and resets for every page in this solution.

  Matches the bankgaborone.co.bw site styling (docs/ci/bank-gaborone-website-corporate-identity.md,
  read from the live BG.css on 2026-11-04). The site's look is flat and square: Bank Gaborone red
  #ee2e24 for buttons, accents and hover; navy #192f55 for headings and nav; body copy in the
  "blue text" #27365b; grey #7f7f7f for secondary text and footer links; Calibri everywhere; very
  light grey #f8f8f9 panels; 1px rules instead of cards and shadows.

  These pages sit INSIDE the site's master page, so everything is scoped to .sp-app (the class
  on each page's root element). Nothing here styles html, body or bare elements outside it.

  The site's global CSS that reaches in here (BG.css + Bootstrap 3.3.7), and how it's handled:
    - Bootstrap sets html to 10px              -> px only, never rem
    - BG.css: a { color: inherit !important; text-decoration: none !important }
              a:hover { color: #ee2e24 !important }
                                               -> every link colour we set carries !important,
                                                  on :link, :visited AND :hover
    - BG.css: h1-h4, body, p { color: #27365b; font-weight: normal; font-size: 36/24/18/14px }
                                               -> our headings carry classes with their own sizes
    - BG.css: input[type=text], select, textarea { border: 1px solid #ee2e24; color: #ee2e24 }
              and :focus { border-color: #ee2e24 !important }
                                               -> .sp-input sets border and colour itself; the
                                                  red focus border is the site's, kept
    - BG.css: input, button, select, textarea { line-height: normal !important }
                                               -> controls get their height from min-height
    - BG.css: .show { display: block }, .item img, .center, .content ...
                                               -> every class here is prefixed (sp-, adm-, ao-)
    - Bootstrap: label { font-weight: bold; margin-bottom: 5px }  -> reset below

  Contrast: the CI red #ee2e24 is 4.16:1 on white, just under AA for small text. It's used for
  fills, rules, outlines and large text; small red text and the primary button use
  --app-red-strong (#d42019, 5.2:1), which reads as the same red.
*/
.sp-app {
  --app-red: #ee2e24;           /* Bank Gaborone red: buttons, accents, hover, selected */
  --app-red-strong: #d42019;    /* the same red, darkened for small text and button fills (5.2:1) */
  --app-navy: #192f55;          /* headings, nav, table heads */
  --app-navy-dark: #002b59;     /* the CI's "BG dark blue" */
  --app-text: #27365b;          /* the site's body copy ("blue text") */
  --app-grey: #7f7f7f;          /* the CI grey: large text, footer links and rules only (4.0:1) */
  --app-muted: #666666;         /* small secondary text: the CI grey, darkened to 5.7:1 */
  --app-border: #d6d9de;
  --app-rule: #eeeeee;          /* Bootstrap page-header rule, as on the site */
  --app-surface: #ffffff;
  --app-surface-alt: #f8f8f9;   /* the CI's "very light grey" */
  --app-ok: #2e7d32;
  --app-warn: #a15c00;
  --app-focus: #ee2e24;
  --app-font: Calibri, Candara, Segoe, "Segoe UI", Optima, Arial, sans-serif;
  --app-font-heading: var(--app-font);
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 40px;

  box-sizing: border-box;
  color: var(--app-text);
  font-family: var(--app-font);
  font-size: 16px;
  line-height: 1.43;
}

/* The page's own centred column, like the site's Bootstrap .container (1170px + 15px gutters).
   Widths per kind of page, as on CAM-CMS, BW-CMS and CGP-CMS:
     --app-page-max   1170px by default (public pages); admin pages 1600px (admin.css)
     --app-gutter     15px by default; admin pages grow it to 40px on wide screens
   Page CSS sets only top/bottom padding, never left/right. */
.sp-app {
  --app-page-max: 1170px;
  --app-gutter: 15px;
}

.sp-app.sp-app {
  width: 100%;
  max-width: var(--app-page-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--app-gutter);
  padding-right: var(--app-gutter);
}

.sp-app *,
.sp-app *::before,
.sp-app *::after {
  box-sizing: border-box;
}

.sp-app :is(h1, h2, h3, h4, p, ul, ol, dl, dd) {
  margin: 0;
  font-family: var(--app-font);
  color: inherit;
}

/* Bootstrap makes labels bold with a bottom margin */
.sp-app label {
  margin-bottom: 0;
  font-weight: inherit;
}

/* BG.css: a { color: inherit !important }, so this only restates it for our own scope */
.sp-app a:is(:link, :visited) {
  color: inherit !important;
}

.sp-app button,
.sp-app input,
.sp-app select,
.sp-app textarea {
  min-width: 0;
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

.sp-app [hidden] {
  display: none !important;
}

.sp-app :focus-visible {
  outline: 2px solid var(--app-focus);
  outline-offset: 2px;
}

.sp-app .sp-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---- Page title: the site's h1 (36px, normal weight, navy) with the page-header rule ---- */
.sp-app .sp-title {
  font-size: 36px;
  font-weight: 400;
  line-height: 1.1;
  color: var(--app-navy);
}

.sp-app .sp-subtitle {
  margin-top: var(--space-2);
  font-size: 18px;
  color: var(--app-grey);
}

/* ---- Buttons: square, like the site's red Explore button (red fill, white border; hover:
   white fill, red border and text) ---- */
.sp-app .sp-btn,
.sp-app a.sp-btn:is(:link, :visited) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 36px;
  margin: 0;
  padding: 0 var(--space-5);
  border: 1px solid var(--app-navy);
  border-radius: 0;
  background: var(--app-surface);
  color: var(--app-navy) !important;
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.sp-app .sp-btn:hover,
.sp-app a.sp-btn:hover {
  border-color: var(--app-red);
  background: var(--app-surface);
  color: var(--app-red-strong) !important;
}

.sp-app .sp-btn--primary,
.sp-app a.sp-btn--primary:is(:link, :visited) {
  border-color: var(--app-red-strong);
  background: var(--app-red-strong);
  color: #fff !important;
}

.sp-app .sp-btn--primary:hover,
.sp-app a.sp-btn--primary:hover {
  border-color: var(--app-red-strong);
  background: var(--app-surface);
  color: var(--app-red-strong) !important;
}

.sp-app .sp-btn--danger:hover {
  border-color: var(--app-red-strong);
  background: var(--app-red-strong);
  color: #fff !important;
}

.sp-app .sp-btn--small {
  min-height: 28px;
  padding: 0 var(--space-3);
  font-size: 13px;
}

.sp-app .sp-btn:disabled,
.sp-app .sp-btn:disabled:hover {
  border-color: var(--app-border);
  background: var(--app-surface);
  color: var(--app-border) !important;
  cursor: default;
}

/* ---- Text inputs (BG.css gives inputs a red border and red text: reset to navy on grey) ---- */
.sp-app .sp-input {
  min-height: 36px;
  margin: 0;
  padding: 0 var(--space-3);
  border: 1px solid var(--app-border);
  border-radius: 0;
  background: var(--app-surface);
  color: var(--app-text);
  font-size: 14px;
}

.sp-app textarea.sp-input {
  padding: var(--space-2) var(--space-3);
  line-height: 1.4 !important;
  resize: vertical;
}

.sp-app .sp-input:focus {
  border-color: var(--app-red);
  outline: none;
}

/* ---- Spinner ---- */
.sp-app .sp-spinner {
  width: 26px;
  height: 26px;
  border: 3px solid var(--app-rule);
  border-top-color: var(--app-red);
  border-radius: 50%;
  animation: sp-spin 0.8s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
  .sp-app .sp-spinner {
    animation: none;
  }
}
