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

html {
  height: 100%;
}

body {
  background-color: var(--background-body);
  color: var(--color-primary);
  font-family: 'Noto Sans', sans-serif;
  font-size: 1em;
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
}

.content {
  padding: 1.25rem 1.25rem 3rem;
}

.flex-start-space {
  align-items: start;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
}

.flex-start-left {
  align-items: start;
  display: flex;
  flex-direction: row;
  justify-content: left;
}


.flex-center-space {
  align-items: center;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

.flex-center-left {
  align-items: center;
  display: flex;
  flex-direction: row;
  justify-content: left;
}

.limited-width {
  width: 95%;
}

.overflow-x {
  overflow-x: auto;
}

/* ==========================================================================
   Bootstrap Utility Replacements
   ========================================================================== */

/* Container */
.container {
  margin: 0;
  width: 100%;
}

/* Admin-only notices across the top of the content column for a server
   that is not fully set up (base.html: email not delivering, background
   worker down). An in-flow strip in the warning-toast wash, so it reads as
   a standing notice rather than an error. */
.admin-notice {
  align-items: center;
  background: var(--toast-warning-body-bg);
  border-bottom: 1px solid var(--border-medium);
  color: var(--color-primary);
  display: flex;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
}

.admin-notice i {
  color: var(--warning);
  flex-shrink: 0;
}

/* Spacing utilities */
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mt-3 { margin-top: 1rem; }
.ms-2 { margin-left: 0.5rem; }
.p-3 { padding: 0.75rem; }

/* Text utilities */
.text-muted { color: var(--text-muted); }
.text-danger { color: var(--error); }
.text-center { text-align: center; }

/* Display utilities */
.d-flex { display: flex; }
.flex-column { flex-direction: column; }
.gap-custom { gap: 1rem; }

/* Position utilities */
.position-fixed { position: fixed; }
.top-0 { top: 0; }
.end-0 { right: 0; }

/* Responsive flex utilities */
@media (width >= 768px) {
  .flex-md-row { flex-direction: row; }
}

.flex-column-reverse { flex-direction: column-reverse; }

/* ==========================================================================
The firm's logo
========================================================================== */

/* components/firm-logo.html. A one-colour logo (is-one-colour, found at
   upload) is a shape: the ::after paints it in --firm-logo-ink, which
   each page points at its text colour, and the art beneath is hidden.
   The ink is a token, so the logo follows every theme. Any other logo is
   shown as uploaded. Here, not in interface.css, because the sign-in and
   error pages load layout.css but not interface.css. */
.firm-logo-ink {
  display: block;
  position: relative;
  width: fit-content;
}

.firm-logo-ink > img {
  display: block;
}

.firm-logo-ink.is-one-colour > img {
  opacity: 0;
}

.firm-logo-ink.is-one-colour::after {
  background: var(--firm-logo-ink, currentColor);
  content: "";
  inset: 0;
  mask: var(--firm-logo-src) center / contain no-repeat;
  -webkit-mask: var(--firm-logo-src) center / contain no-repeat;
  pointer-events: none;
  position: absolute;
}
