/* BASE.HTML CUSTOM CLASSES */

body {
  min-height: 100vh;
  min-height: -webkit-fill-available;
}

html {
  height: -webkit-fill-available;
}

/* Fixed app shell (sidebar + content). Was the <main> element; now .app-layout so
   <main> can wrap only primary content and <footer> can follow it in DOM order.
   Height is viewport minus navbar (top: 60px); using 100vh here leaves the bottom
   ~60px off-screen so the footer on long pages (e.g. /myhome) cannot fully scroll into view. */
.app-layout {
  position: fixed;
  top: 60px;
  display: flex;
  flex-wrap: nowrap;
  height: calc(100vh - 60px);
  height: calc(100dvh - 60px);
  max-height: calc(100vh - 60px);
  max-height: calc(100dvh - 60px);
  overflow-x: auto;
  overflow-y: auto;
  flex-direction: row;
  flex: 2 0px;
  width: 100%;
  /* stretch so .maincontent fills the shell height on short pages */
  align-items: stretch;
  /* white shell: any padding/margin gaps stay white (sidebar is fixed separately with its own bg) */
  background-color: #fff;
}

.maincontent {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  min-height: 100%;
  box-sizing: border-box;
  background-color: #fff;
  /* column flex keeps main + footer stacked without margin-collapse gaps through the shell */
  display: flex;
  flex-direction: column;
}

/* Primary landmark is a normal block in the content column (not the fixed flex shell). */
main#maincontent {
  display: block;
  width: 100%;
  flex: 0 0 auto;
}

/* Contain float-based footer layout from content_footer.html */
.app-layout > .maincontent > footer {
  clear: both;
  overflow: auto;
  width: 100%;
  box-sizing: border-box;
  background-color: #fff;
  flex: 0 0 auto;
  /* spacing above footer without relative offset (offset left a dark/empty band) */
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 1rem;
}

/*
  Header utility links (a11y #5): Bootstrap navbar-dark uses rgba(255,255,255,.55)
  for default links vs #fff for .active (~2.79:1 between states). Use full white for
  all header links so there is no low-contrast color-only selection cue; add
  underline on hover/focus as a non-color state indicator.
*/
.navbar-dark .navbar-nav .nav-link {
  color: #ffffff;
}
.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus,
.navbar-dark .navbar-nav .nav-link:focus-visible {
  color: #ffffff;
  text-decoration: underline;
}
.navbar-dark .navbar-nav .nav-link.active,
.navbar-dark .navbar-nav .show > .nav-link {
  color: #ffffff;
}

.table {
  -moz-border-radius:0.5rem;
  -webkit-border-radius:0.5rem;
  border-radius:0.5rem;
}

.table tr:first-child th:first-child {
  border-top-left-radius: 0.5rem;
}

.table tr:first-child th:last-child {
  border-top-right-radius: 0.5rem;
}

.table-shadow {
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, .1);
}

.table-shadow tr:last-child td {
  border-style: none;
}

.w-14rem {
  width: 14rem;
}

.inset-box-shadow {
  box-shadow: inset -5px 0 15px -5px rgba(0, 0, 0, 0.3);
}

.right-box-shadow {
  box-shadow: 5px 0 5px -3px rgba(0, 0, 0, 0.3);
}

.form_component_admin_details_link {
  color: black;
  text-decoration: underline;
  text-align: right;
  cursor: pointer;
  font-size: 10px;
}

.form_component_admin_details {
  padding: 5px;
  background-Color: #D0D0D0;
}

/* MESSAGES & ERRORS */

ul.messages {
  padding: 0;
  margin: 0;
}

ul.messages li {
  display: block;
  font-weight: 400;
  font-size: 13px;
  padding: 5px 5px 5px 25px;
  margin: 0 0 5px 0;
  background-size: 16px auto;
  color: #333;
}

ul.messages li.success {
  background: #dfd url(../img/icon-yes.svg) 5px no-repeat;
}

ul.messages li.debug {
  background-Color : #C0C0C0;
}

ul.messages li.info {
  background: #9191fd url(../img/icon-info.svg) 5px no-repeat;
}

ul.messages li.warning {
  background: #ffe48f url(../img/icon-alert.svg) 5px no-repeat;
}

ul.messages li.error {
  background: #FFA0A0 url(../img/icon-error.svg) 5px no-repeat;
}


/* STYLE TAGS ORIGINALLY IN BASE.HTML */

.bd-placeholder-img {
  font-size: 1.125rem;
  text-anchor: middle;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

@media (min-width: 768px) {
  .bd-placeholder-img-lg {
    font-size: 3.5rem;
  }
}

/* Skip link: visually hidden until keyboard focus (a11y — Focus Visible / Bypass Blocks) */
.bypass {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  white-space: nowrap;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  border: 0;
  padding: 0;
  margin: 0;
}

.bypass:focus,
.bypass:focus-visible {
  position: fixed;
  left: 0.5rem;
  top: 0.5rem;
  z-index: 1100; /* above navbar (z-index: 1000) */
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  clip-path: none;
  white-space: normal;
  padding: 0.5rem 1rem;
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  color: #000;
  background-color: #fff;
  border: 2px solid #000;
  border-radius: 0.25rem;
  text-decoration: underline;
  outline: 3px solid #ffbf47;
  outline-offset: 2px;
}

.button_blue {
  border-color: #004362;
  background-color: #004362;
  color: #ffffff;
}

.button_blue:hover {
  border-color: #006483;
  background-color: #006483;
}

.button_green {
  border-color: #008000;
  background-color: #008000;
  color: #ffffff;
}

.button_green:hover {
  border-color: #018b01;
  background-color: #018b01;
}

.button_red {
  border-color: #7a0101;
  background-color: #7a0101;
  color: #ffffff;
}

.button_red:hover {
  border-color: #8b0101;
  background-color: #8b0101;
}

/*
  a11y #51 — Bootstrap button focus rings use semi-transparent brand colors
  (e.g. .btn-success: rgba(60,153,110,.5) ≈ #97C6B0 on white, ~1.9:1).
  WCAG needs ≥3:1 for the focus indicator vs adjacent colors.
  Use a solid dark outline outside the control (against the page background)
  and drop the low-contrast box-shadow ring.
*/
.btn:focus,
.btn:focus-visible,
.btn-success:focus,
.btn-success:focus-visible,
.btn-success:active:focus,
.btn-danger:focus,
.btn-danger:focus-visible,
.btn-danger:active:focus,
.btn-primary:focus,
.btn-primary:focus-visible,
.btn-primary:active:focus,
.btn-warning:focus,
.btn-warning:focus-visible,
.btn-warning:active:focus,
.btn-info:focus,
.btn-info:focus-visible,
.btn-info:active:focus,
.btn-secondary:focus,
.btn-secondary:focus-visible,
.btn-secondary:active:focus {
  box-shadow: none;
  outline: 3px solid #1a1a1a;
  outline-offset: 2px;
}

.button_blue:focus,
.button_blue:focus-visible,
.button_green:focus,
.button_green:focus-visible,
.button_red:focus,
.button_red:focus-visible {
  outline: 3px solid #1a1a1a;
  outline-offset: 2px;
}

/*
  a11y #55 — Bootstrap placeholder #6c757d on .bg-light / #f8f9fa is ~4.44:1.
  Need ≥4.5:1 for normal text. Darken placeholders sitewide; opacity:1 for Firefox.
*/
.form-control::placeholder,
.form-control::-webkit-input-placeholder,
.form-control::-moz-placeholder,
.form-control:-ms-input-placeholder {
  color: #5c636a;
  opacity: 1;
}
input::placeholder,
textarea::placeholder {
  color: #5c636a;
  opacity: 1;
}


