/* Global CSS variables */
:root {
  --grid-space: 200px;
}

.container.info {
  font-size: 12px;
  margin-top: 30px;
  max-height: 80vh;
  overflow-y: auto;
  overflow-x: hidden;
  white-space: normal;
  overflow-wrap: anywhere;
  width: 100%;
  max-width: none; /* override Bootstrap container max-width */
  padding-left: 25px; /* avoid horizontal overflow caused by margin */
  box-sizing: border-box;
}

.container.info h3 {
  font-size: 24px;
}

.container.info h4 {
  font-size: 18px;
}

.info {
  /* margin-left removed to prevent horizontal overflow; using padding on container instead */
}

.info h4 {
  margin-top: 25px;
}

/* Base typography */
html, body {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  min-height: 100%;
  height: 100%;
  margin: 0;
}

body {
  position: relative;
  background-color: #fff;
}

/* Global heading spacing */
h3 {
    margin-top: 20px;
    margin-bottom: 20px;
}

/* Links */
a, .btn-link {
  color: #006bb7;
}

/* Primary button */
.btn-primary {
  color: #fff;
  background-color: #1b6ec2;
  border-color: #1861ac;
}

/* Focus styles */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* Remove global top gap so first section sits directly under navbar */
.content {
  padding-top: 0;
}

h1:focus {
  outline: none;
}

/* Validation */
.valid.modified:not([type=checkbox]) {
  outline: 1px solid #26b050;
}

.invalid {
  outline: 1px solid #e50000;
}

.validation-message,
.k-form-error .k-validation-message,
.k-validation-message,
.k-tooltip-validation {
  color: #e50000;
}

.validation-message.smaller-font,
.k-form-error .k-validation-message.smaller-font,
.k-tooltip-validation.smaller-font {
  font-size: 11px;
  line-height: 1.2;
}

/* Forms */
.darker-border-checkbox.form-check-input {
  border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Telerik form shared styles */
.k-window .k-form {
  overflow: auto;
  max-height: 600px;
  padding: 0 25px 10px 10px;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.k-form.form-no-scroll {
  overflow: visible;
  max-height: none;
}

.k-form-horizontal.smaller-font .k-form-field:first-child {
  margin-top: 10px;
}

.k-form-horizontal.smaller-font .k-form-field > .k-label {
  display: flex;
  flex-direction: row;
  align-items: center;
  text-align: start;
  white-space: nowrap;
  width: 40%;
  max-width: calc(60% - 10px);
}

.k-form-horizontal.smaller-font.form-bold-labels .k-form-field > .k-label {
  font-weight: 600;
}

.k-popup.smaller-font,
.k-popup.smaller-font .k-calendar,
.k-form.smaller-font,
.k-form.smaller-font .k-form-legend,
.k-form.smaller-font .k-textbox,
.k-form.smaller-font .k-dropdownlist,
.k-form.smaller-font .k-multiselect,
.k-form.smaller-font .k-input,
.k-form.smaller-font .k-button {
  font-size: 12px;
}

.k-form.smaller-font .k-form-hint {
  display: block;
  max-width: 95%;
  padding-left: 5px;
}

.k-form.smaller-font a {
  font-size: 12px;
}

.k-form-legend {
  font-weight: bold;
}

.k-validation-summary ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.k-form-horizontal.smaller-font .k-form-field > .k-label.required::after,
.k-label.required::after {
  content: " *";
  display: inline;
  white-space: nowrap;
  vertical-align: baseline;
  margin-left: 2px;
}

/* Utilities */
.invisible {
  display: none;
}

#blazor-error-ui {
  color-scheme: light only;
  background: #0f172a;
  color: #f8fafc;
  border-top: 3px solid #ef4444;
  bottom: 0;
  box-shadow: 0 -6px 24px rgba(15, 23, 42, 0.45);
  box-sizing: border-box;
  display: none;
  left: 0;
  padding: 1rem 3rem 1rem 1.5rem;
  position: fixed;
  width: 100%;
  z-index: 2147483647;
  font-size: 0.95rem;
  line-height: 1.35;
}

#blazor-error-ui .error-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-right: 2.25rem;
}

#blazor-error-ui .error-text {
  font-weight: 500;
}

#blazor-error-ui .reload {
  color: #f8fafc;
  border: 1px solid rgba(248, 250, 252, 0.45);
  border-radius: 999px;
  padding: 0.35rem 1rem;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}

#blazor-error-ui .reload:hover,
#blazor-error-ui .reload:focus-visible {
  background: rgba(248, 250, 252, 0.15);
  border-color: rgba(248, 250, 252, 0.9);
}

#blazor-error-ui .dismiss {
  cursor: pointer;
  position: absolute;
  right: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  opacity: 0.8;
}

#blazor-error-ui .dismiss:hover,
#blazor-error-ui .dismiss:focus-visible {
  opacity: 1;
}
