/* Section pages (new / show / edit) */
#section-header {
  padding-top: 0;
  margin-bottom: 0;
  display: inline;
  font-size: 24px;
  font-weight: bold;
  color: black;
}

.kr-section-nav-row {
  align-items: flex-end;
  margin-bottom: 16px;
}

.kr-section-switcher .form-label {
  font-size: 12px;
  color: #637480;
  margin-bottom: 2px;
}

.kr-section-details,
.kr-section-form,
.kr-action-plan {
  margin-bottom: 30px;
}

/* Summary row: small gauge left, flip clock + small scoreboard right */
.kr-section-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 24px;
}

.kr-section-summary-right {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.kr-section-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 8px;
}

@media (max-width: 768px) {
  .kr-section-form-row {
    grid-template-columns: 1fr;
  }
}

.kr-autosave-field label,
.kr-input-field-wrapper label {
  color: #637480;
}

.kr-autosave-helper {
  color: #dc3545;
  font-size: 0.75rem;
  margin: 4px 0 0 14px;
  min-height: 1em;
}

.kr-input-field-input-wrapper input[readonly],
.kr-input-field-input-wrapper select:disabled,
.kr-input-field-input-wrapper input:disabled {
  color: #495057;
  background: transparent;
}

/* Rich text fields */
.kr-rich-text-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.kr-rich-text-label {
  font-size: 12px;
  color: #637480;
}

.kr-rich-text-remove {
  border: none;
  background: transparent;
  color: #828282;
  font-size: 16px;
  padding: 2px 6px;
}

.kr-rich-text-remove:hover {
  color: #eb5757;
}

.kr-add-optional-field {
  color: #1d4c7e;
  font-weight: 700;
  text-decoration: none;
  padding-left: 0;
  margin-bottom: 16px;
}

/* Quill shell styled like the legacy MUI outlined field: toolbar only while focused */
.quill-container {
  border: 1px solid rgba(0, 0, 0, 0.23);
  border-radius: 5px;
  background: #fff;
  position: relative;
}

.quill-container.focused {
  border: 2px solid #1976d2;
}

.quill-container:not(.focused) .ql-toolbar {
  display: none;
}

.quill-container .ql-toolbar.ql-snow {
  border: none;
  border-bottom: 1px solid #ced4da;
  background-color: #f8f9fa;
}

.quill-container .ql-container.ql-snow {
  border: none;
}

.quill-container .ql-editor {
  min-height: 120px;
  max-height: 230px;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.5;
  padding: 12px 14px;
}

.quill-container.focused .ql-editor {
  min-height: 230px;
}

.quill-container.quill-readonly .ql-toolbar {
  display: none !important;
}

.quill-container.autosave-saving {
  border-color: #17a2b8;
}

.quill-container.autosave-saved {
  border-color: #28a745;
}

.quill-container.autosave-error {
  border-color: #dc3545;
}

/* Text inset for the outlined autosave fields. hot_lookback's inputs inside .kr-input-field-input-wrapper carry
   .form-control (Bootstrap's padding); hot_trak's do not, so without this the text sat flush against the border.
   13px matches the create/edit forms (6C). Selects also drop Chrome's grey default background. */
.kr-input-field-input-wrapper input,
.kr-input-field-input-wrapper select {
  padding: 0 13px;
}

.kr-input-field-input-wrapper textarea {
  padding: 12px 13px;
}

.kr-input-field-input-wrapper select {
  background: transparent;
}
