/* Form layout and validation styling: Blazor valid/invalid states, expandable details sections, info popups, and sticky form actions. */
/* Blazor validation states mapped onto Bootstrap's default validation colors.
   Note: Bootstrap's own validation visuals (is-valid/is-invalid icons and padding) are intentionally
   unused - no markup applies those classes, so stock Bootstrap stays at its defaults. */
.invalid.modified {
  border-color: var(--bs-form-invalid-border-color);
}

.invalid.modified:focus {
  border-color: var(--bs-form-invalid-border-color);
  box-shadow: 0 0 0 0.25rem rgba(var(--bs-danger-rgb), 0.25);
}

.valid.modified {
  border-color: var(--bs-form-valid-border-color);
}

.valid.modified:focus {
  border-color: var(--bs-form-valid-border-color);
  box-shadow: 0 0 0 0.25rem rgba(var(--bs-success-rgb), 0.25);
}

.form-check-input {
  padding: 0;
  width: 1em;
  height: 1em;
  min-width: 1em;
  min-height: 1em;
}

details > summary {
  list-style: none;
}

details > summary::-webkit-details-marker {
  display: none;
}

details > summary::before {
  font-family: Icons;
  content: "\e07c";
  margin-right: 0.25em;
}

details[open] > summary::before {
  content: "\e039";
}

label > details.info-popup {
  position: relative;
  display: inline-block;
}

label > details[open] {
  z-index: 5;
}

label > details.info-popup > div {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0.25rem;
  width: max-content;
  max-width: min(600px, 90vw);
  white-space: normal;
}

/* Sticky footers: every bar pinned to the bottom (.sticky-footer, .form-actions) shares this
   look and layer. The z-index has to stay above the active/focused page button of the pagination (3), but
   below popups inside forms (5). Contexts only add their own margins. */
:root {
  --omu-z-sticky-footer: 4;
}

.sticky-footer,
.form-actions {
  position: sticky;
  bottom: 0;
  z-index: var(--omu-z-sticky-footer);
  background-color: var(--omu-footer-bg, var(--bs-body-bg));
  padding: 1rem;
  border-top: var(--bs-border-width) solid var(--omu-border);
  box-sizing: border-box;
}

.form-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-start;
}

