#sidenav-collapse-main .navbar-nav h3 {
    padding-left: 24px;
}
/* Even gap around the page content
   -------------------------------------------------------------------------
   The white content is pulled up into the blue header by mt--6, so the space
   above it is whatever padding the header carries on top. Its distance from
   the sidebar is 30px: .container-fluid's 15px plus the column's own 15px,
   both fixed by the grid. The top was 48px, which read as a misalignment
   rather than a choice, so it now matches the side. Use in place of pt-5. */
.header.header-even-gap {
  padding-top: 30px !important;
}

:root { --dialog-gap: 20px; }

/* Dialogs
   -------------------------------------------------------------------------
   Every dialog in the app wears the same blue as the page header behind it,
   with its title and close cross in white, so a dialog reads as part of the
   page rather than a plain white box dropped on top of it.

   Every gap around a dialog is the same one, --dialog-gap: the title in from
   the top and the left, the cross in from the top and the right, the sentence
   in from both sides and from the header, and the buttons in from the
   sentence, the bottom and the right.

   They were not - the header was padded differently across than down, the
   body carried padding underneath as well as above, the paragraph added its
   own margin, and the footer added its padding on top of both, so a dialog
   sat low and uneven in its own box. The body holds the gap under the header
   and the footer the one above the buttons, and nothing is added between.

   Written once here rather than on each of the dialogs, so one of them cannot
   drift. Both toolkits are covered: .close is Bootstrap 4's cross (the app)
   and .btn-close is Bootstrap 5's (the patient's own pages). */
/* Bootstrap 5 outlines the box and Bootstrap 4 does not, which made every
   inset a pixel wider on the patient's pages than on the app's. */
.modal-content { border: 0; }

.modal-header {
  background-color: #5e72e4;
  padding: var(--dialog-gap);
  border-bottom: 0;
  /* The cross is a shade taller than the title. Aligned to the top, that
     difference fell under the title and the two gaps around it stopped
     matching; centred, whichever is taller sets the height and both sit
     evenly in it. */
  align-items: center;
}
.modal-header .modal-title { color: #fff; }
.modal-header .close,
.modal-header .close span {
  color: #fff;
  text-shadow: none;
  opacity: .85;
}
.modal-header .close:hover,
.modal-header .close:hover span { color: #fff; opacity: 1; }
/* Bootstrap 5 draws its cross as a dark background image, which is invisible
   on the blue - this turns that image white rather than recolouring text. */
.modal-header .btn-close {
  filter: brightness(0) invert(1);
  opacity: .85;
}
.modal-header .btn-close:hover { opacity: 1; }

/* The close cross keeps a finger-sized hit area, but its padding is pulled
   back out to the edges, so the cross itself sits the same gap from the top
   and the right as the title does from the top and the left. */
.modal-header .close,
.modal-header .btn-close {
  padding: var(--dialog-gap);
  margin: calc(-1 * var(--dialog-gap)) calc(-1 * var(--dialog-gap))
          calc(-1 * var(--dialog-gap)) auto;
  background-position: center;
}

.modal-body { padding: var(--dialog-gap) var(--dialog-gap) 0; }
/* The sentence's own trailing margin would land on top of the footer's gap. */
.modal-body > :last-child { margin-bottom: 0; }
.modal-footer { padding: var(--dialog-gap); border-top: 0; }
/* Bootstrap spaces footer buttons with a margin on every side, which added
   itself to the footer's own padding and pushed the last button in further
   than everything else. The space between buttons comes from the left only. */
.modal-footer > * { margin: 0 0 0 .5rem; }

/* Radio labels that run to a second line
   -------------------------------------------------------------------------
   argon.css pins every radio's label to one line:

       .custom-radio .custom-control-input ~ .custom-control-label {
         height: 1rem;
       }

   A label longer than its row then wraps but the row does not grow with it,
   so the second line is drawn over the option underneath. Short labels never
   showed it; MADRS, whose options are a sentence each, does.

   The same specificity as argon's rule and later in the cascade, so it wins
   without !important. */
.custom-radio .custom-control-input ~ .custom-control-label { height: auto; }

/* Saying that something worked
   -------------------------------------------------------------------------
   Seven different things used to do this job: two showAlert()s with different
   signatures, two copies of a say() that never cleared, a toast, and divs
   built by hand in two more places. They looked different, they cleared after
   5s, 3s, 2.6s or never, and the ones that never cleared stacked up on the
   profile page until somebody reloaded.

   One design, used wherever a message already appeared: the sentence, in the
   colour of what happened, behind a matching icon. No box, because a box has
   to go somewhere and a sentence can sit at the end of a line that is already
   there.

   Errors keep their own colour and are left on screen - the point of a red
   one is that you have to do something about it. */
.flash {
  display: inline-flex; align-items: flex-start; gap: 6px;
  font-size: 13px; font-weight: 600; line-height: 1.45;
}
.flash > i { margin-top: 2px; }
.flash-success   { color: #2dce89; }
.flash-danger    { color: #f5365c; }
.flash-warning   { color: #fb6340; }
.flash-info      { color: #11cdef; }
.flash-secondary { color: #8898aa; }

/* A flashed sentence standing above a form, where an alert box used to sit.
   Keeps the gap the box left behind so the form does not move when one
   appears. The sentence itself is drawn exactly like every other flash. */
.form-flash { display: block; margin-bottom: 1rem; }

/* An outcome that is the whole point of a page - an invite accepted, an email
   change confirmed or refused. Not a message above a form: it carries an
   explanation under its headline, so it keeps both lines and gives up only
   the filled box. The headline is drawn exactly like any other flash, and the
   explanation lines up under its first letter rather than under its icon. */
.outcome { margin-bottom: 1.25rem; }
.outcome-detail {
  margin: 7px 0 0 20px; color: #525f7f; font-size: 14px; line-height: 1.55;
}

/* The one place the plain sentence will not do. Flashed messages from the
   server render on the purple band at the top of the page, where green text
   on violet is barely readable, so there they keep a surface to sit on. The
   message itself is drawn exactly the same. */
.flash-surface {
  background: #fff; border-radius: 9px; padding: 11px 15px;
  box-shadow: 0 4px 14px -6px rgba(0, 0, 0, .25);
}

/* What the Status column on the patient list says. Two of the three are
   statements rather than controls, so they are pills rather than buttons -
   only "Start Treatment" asks to be pressed, and only it looks like it.

   The colours are the treatment board's, so a course that is under way is the
   same orange wherever somebody meets it, and a finished one the same green.
   Argon's own warning orange is close enough to red to read as a warning;
   this one means "running". */
.tx-state {
  display: inline-block; padding: 4px 11px; border-radius: 7px;
  font-size: 12.5px; font-weight: 600; line-height: 1.5; white-space: nowrap;
}
.tx-state-running {
  background: #fdf2e6; border: 1px solid #f8e5cf; color: #c2691a;
}
a.tx-state-running:hover {
  background: #fbe9d6; border-color: #f3dabc; color: #ad5c16;
}
.tx-state-done {
  background: #e9f8f1; border: 1px solid #cfeee1; color: #1a7f52;
}

/* The tick inside a ticked checkbox. argon.css draws one twice: once
   correctly, and then again further down the file with the SVG pasted in raw
   -

       url("data:image/svg+xml,<svg ...><path fill='#fff' .../></svg>")

   - where the unescaped # starts a fragment identifier and cuts the URL off
   mid-path. The browser is handed half an SVG, draws nothing, and the box
   fills with colour but stays empty. The later rule wins, so every checkbox
   in the app is affected, not only new ones.

   Same mark, percent-encoded so a browser can actually read it. */
.custom-checkbox .custom-control-input:checked ~ .custom-control-label::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26l2.974 2.99L8 2.193z'/%3E%3C/svg%3E");
}
