.rs-history-note-panel {
  margin: 0 0 14px;
  border: 1px solid rgba(34, 63, 54, .15);
  border-radius: 14px;
  background: #f8fbfa;
  color: #17332a;
}

.rs-history-note-panel > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 11px 13px;
  cursor: pointer;
  list-style: none;
  touch-action: manipulation;
}

.rs-history-note-panel > summary::-webkit-details-marker { display: none; }

.rs-history-note-panel > summary::after {
  content: "+";
  flex: 0 0 auto;
  margin-left: 12px;
  font-size: 22px;
  line-height: 1;
  color: #45685c;
}

.rs-history-note-panel[open] > summary::after { content: "−"; }

.rs-history-note-panel > summary span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.rs-history-note-panel > summary strong {
  font-size: 14px;
  line-height: 1.3;
}

.rs-history-note-panel > summary small {
  font-size: 12px;
  line-height: 1.35;
  color: #60776f;
}

.rs-history-note-panel-body {
  display: grid;
  gap: 12px;
  padding: 0 13px 13px;
}

.rs-history-note-text-label,
.rs-history-note-scope-label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #405f55;
}

.rs-history-note-text-label textarea,
.rs-history-note-scope-label select {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(34, 63, 54, .22);
  border-radius: 10px;
  background: #fff;
  color: #17332a;
  font: inherit;
  font-size: 16px;
}

.rs-history-note-text-label textarea {
  min-height: 104px;
  padding: 10px 11px;
  line-height: 1.45;
  resize: vertical;
}

.rs-history-note-scope-label select {
  min-height: 44px;
  padding: 8px 10px;
}

.rs-history-note-report-scope {
  min-width: 0;
  margin: 0;
  padding: 10px;
  border: 1px solid rgba(34, 63, 54, .14);
  border-radius: 11px;
  background: #fff;
}

.rs-history-note-report-scope[hidden] { display: none !important; }

.rs-history-note-report-scope legend {
  padding: 0 4px;
  font-size: 12px;
  font-weight: 800;
  color: #405f55;
}

.rs-history-note-report-scope > div {
  display: grid;
  gap: 7px;
}

.rs-history-note-report-choice {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 7px 8px;
  border-radius: 9px;
  background: #f7faf9;
  cursor: pointer;
}

.rs-history-note-report-choice input {
  width: 19px;
  height: 19px;
  margin: 0;
}

.rs-history-note-report-choice span {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.rs-history-note-report-choice strong,
.rs-history-note-report-choice small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rs-history-note-report-choice strong { font-size: 13px; }
.rs-history-note-report-choice small { color: #657b73; }

.rs-history-note-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rs-history-note-actions button,
.rs-history-delete-report {
  min-height: 42px;
  touch-action: manipulation;
}

.rs-history-note-delete,
.rs-history-delete-report {
  color: #8a312f !important;
  border-color: rgba(169, 68, 66, .28) !important;
  background: #fff7f6 !important;
}

.rs-history-delete-report:disabled {
  color: #7d8985 !important;
  border-color: rgba(34, 63, 54, .12) !important;
  background: #f5f7f6 !important;
}

.rs-history-note-status {
  min-height: 17px;
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: #61776f;
}

.rs-history-note-status.is-error { color: #9a3532; }

.rs-history-note-panel.is-busy { opacity: .72; }

#rsReportSeriesStage1.is-stage4-busy {
  pointer-events: none;
  opacity: .72;
}

.rs-history-notes-notice {
  margin: 10px 0;
  padding: 10px 12px;
  border: 1px solid rgba(34, 63, 54, .15);
  border-radius: 11px;
  background: #f7faf9;
  color: #536d64;
  font-size: 13px;
  line-height: 1.45;
}

.rs-history-notes-notice.is-error {
  border-color: rgba(169, 68, 66, .22);
  background: #fff7f6;
  color: #8a312f;
}

@media (max-width: 640px) {
  .rs-history-note-panel {
    margin-bottom: 11px;
    border-radius: 12px;
  }

  .rs-history-note-panel > summary { padding: 10px 11px; }
  .rs-history-note-panel-body { padding: 0 11px 11px; }
  .rs-history-note-actions { display: grid; grid-template-columns: 1fr; }
  .rs-history-note-actions button { width: 100%; }
  .rs-history-delete-report { width: 100%; }
}
