/* ReviewPanel follows DESIGN.md's Carbon surface, type, and focus tokens. */
.rp-panel {
  box-sizing: border-box;
  width: 480px;
  max-width: 100%;
  min-width: 0;
  margin-right: auto;
  margin-left: auto;
  overflow: hidden;
  border: 1px solid #e0e0e0;
  background: #ffffff;
  color: #161616;
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.16px;
  line-height: 1.5;
}
.rp-panel *,
.rp-panel *::before,
.rp-panel *::after {
  box-sizing: border-box;
}
.rp-panel [hidden] {
  display: none !important;
}
.rp-header {
  padding: 16px;
  border-bottom: 1px solid #e0e0e0;
  background: #ffffff;
}
.rp-heading-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.rp-heading-line h2,
.rp-heading-line .rp-source {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rp-heading-line h2 {
  flex: 0 1 auto;
  color: #161616;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.16px;
  line-height: 1.29;
}
.rp-source {
  flex: 1 1 auto;
  color: #525252;
  font-size: 12px;
  letter-spacing: 0.32px;
  line-height: 1.33;
}
.rp-panel-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  margin: -8px -8px -8px auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #525252;
  font-size: 16px;
  line-height: 1;
}
.rp-panel-close:hover {
  background: #e0e0e0;
  color: #161616;
}
.rp-notice {
  min-width: 0;
  margin: 12px 16px 0;
  padding: 8px 16px 12px;
  border-left: 1px solid #8d8d8d;
  background: #f4f4f4;
}
.rp-notice-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}
.rp-notice-title {
  min-width: 0;
  color: #161616;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.16px;
  line-height: 1.29;
}
.rp-notice-message {
  min-width: 0;
  margin: 8px 0 0;
  color: #525252;
  overflow-wrap: anywhere;
  white-space: normal;
}
.rp-notice-action {
  flex: 0 0 auto;
  height: 32px;
  padding: 6px 12px;
  border: 1px solid #0f62fe;
  background: #ffffff;
  color: #0f62fe;
  white-space: nowrap;
}
.rp-summary-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  justify-content: space-between;
  column-gap: 12px;
  row-gap: 0;
  min-width: 0;
  margin: 12px 16px 0;
  background: #f4f4f4;
}
.rp-summary-title {
  grid-row: 1;
  grid-column: 1;
  min-width: 0;
  padding: 7px 16px;
  color: #161616;
  overflow-wrap: anywhere;
  white-space: normal;
}
.rp-target-slot {
  display: flex;
  align-items: center;
  grid-row: 2;
  grid-column: 1 / -1;
  gap: 8px;
  min-width: 0;
  margin-left: 0;
  padding: 8px 16px 12px;
  border-top: 1px solid #e0e0e0;
}
.rp-target-label,
.rp-target-empty {
  flex: 0 0 auto;
  color: #525252;
  font-size: 12px;
  letter-spacing: 0.32px;
  line-height: 1.33;
  white-space: nowrap;
}
.rp-target-value {
  min-width: 0;
  color: #161616;
  font-size: 14px;
  overflow-wrap: anywhere;
  white-space: normal;
}
.rp-target-select {
  min-width: 136px;
  max-width: 220px;
  height: 40px;
  padding: 8px 12px;
  border: 0;
  border-bottom: 1px solid #8d8d8d;
  border-radius: 0;
  background: #f4f4f4;
  color: #161616;
  font: inherit;
  text-overflow: ellipsis;
}
.rp-target-select:focus {
  border-bottom: 2px solid #0f62fe;
  outline: 0;
}
.rp-target-create {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: #0f62fe;
  white-space: nowrap;
}
.rp-target-slot-empty {
  margin-left: 0;
}
.rp-button {
  appearance: none;
  border-radius: 0;
  cursor: pointer;
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.16px;
  line-height: 1.29;
  text-align: center;
}
.rp-button:focus-visible,
.rp-decision select:focus-visible,
.rp-target-select:focus-visible,
.rp-note-input:focus-visible,
.rp-field-input:focus-visible {
  outline: 2px solid #0f62fe;
  outline-offset: -2px;
}
.rp-summary-button {
  grid-row: 1;
  grid-column: 2;
  height: 32px;
  padding: 6px 12px;
  border: 1px solid #0f62fe;
  background: #0f62fe;
  color: #ffffff;
}
.rp-summary-button:hover,
.rp-button-primary:hover {
  background: #0050e6;
}
.rp-items {
  min-width: 0;
  padding: 0 16px;
}
.rp-item {
  min-width: 0;
  padding: 16px 0;
  border-bottom: 1px solid #e0e0e0;
}
.rp-item-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}
.rp-item-title-row h3,
.rp-item-title-row strong {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #161616;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rp-item-title-row h3 {
  flex: 1 1 auto;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.16px;
  line-height: 1.29;
}
.rp-item-title-row strong {
  flex: 0 0 auto;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  font-weight: 400;
  line-height: 1.29;
}
.rp-field-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  min-width: 0;
  margin: 12px 0 0;
}
.rp-field {
  min-width: 0;
  overflow: hidden;
}
.rp-field dt,
.rp-field dd {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rp-field dt {
  color: #525252;
  font-size: 12px;
  letter-spacing: 0.32px;
  line-height: 1.33;
}
.rp-pending-selection {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 6px;
  border: 1px solid #f1c21b;
  background: #fff1c2;
  color: #161616;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.32px;
  line-height: 1.33;
}
.rp-field dd {
  color: #161616;
  font-size: 14px;
  line-height: 1.5;
}
.rp-template-field dd {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  overflow: visible;
  white-space: normal;
}
.rp-field-editable {
  display: flex;
  align-items: center;
  flex: 1 1 120px;
  gap: 4px;
  min-width: 0;
}
.rp-field-input-label {
  flex: 0 0 auto;
  color: #525252;
  font-size: 12px;
  letter-spacing: 0.32px;
  line-height: 1.33;
}
.rp-field-input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  height: 32px;
  padding: 4px 8px;
  border: 0;
  border-bottom: 1px solid #8d8d8d;
  border-radius: 0;
  background: #f4f4f4;
  color: #161616;
  font: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rp-field-input-multiline {
  height: auto;
  min-height: 64px;
  resize: vertical;
  overflow: auto;
  text-overflow: clip;
  white-space: pre-wrap;
}
.rp-field-input:focus {
  border-bottom: 2px solid #0f62fe;
  outline: 0;
}
.rp-field-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rp-field-diff {
  color: #525252;
  font-size: 12px;
  letter-spacing: 0.32px;
}
.rp-decisions {
  display: grid;
  gap: 8px;
  min-width: 0;
  margin-top: 12px;
}
.rp-decision {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.rp-decision-label {
  flex: 0 1 auto;
  min-width: 0;
  color: #525252;
  font-size: 12px;
  letter-spacing: 0.32px;
  line-height: 1.33;
}
.rp-decision select {
  flex: 1 1 160px;
  min-width: 72px;
  max-width: 240px;
  height: 40px;
  padding: 8px 12px;
  border: 0;
  border-bottom: 1px solid #8d8d8d;
  border-radius: 0;
  background: #f4f4f4;
  color: #161616;
  font: inherit;
  text-overflow: ellipsis;
}
.rp-decision select:focus {
  border-bottom: 2px solid #0f62fe;
  outline: 0;
}
.rp-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  margin-top: 8px;
}
.rp-tag {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 24px;
  padding: 4px 8px;
  overflow: hidden;
  border-radius: 9999px;
  color: #161616;
  font-size: 12px;
  letter-spacing: 0.32px;
  line-height: 1.33;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rp-flag-warn {
  background: #fddc69;
}
.rp-flag-neutral {
  background: #e0e0e0;
}
.rp-action-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  margin-top: 12px;
}
.rp-action {
  min-height: 40px;
  padding: 10px 12px;
}
.rp-action-accept {
  border: 1px solid #0f62fe;
  background: #ffffff;
  color: #0f62fe;
}
.rp-action-reject {
  padding-right: 4px;
  padding-left: 4px;
  border: 1px solid transparent;
  background: #ffffff;
  color: #da1e28;
}
.rp-action-note {
  padding-right: 4px;
  padding-left: 4px;
  border: 1px solid transparent;
  background: #ffffff;
  color: #0f62fe;
}
.rp-action:disabled {
  border-color: #e0e0e0;
  background: #f4f4f4;
  color: #8c8c8c;
  cursor: not-allowed;
}
.rp-note-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin-top: 8px;
}
.rp-note-label {
  flex: 0 0 auto;
  color: #525252;
  font-size: 12px;
  letter-spacing: 0.32px;
  line-height: 1.33;
}
.rp-note-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 40px;
  padding: 8px 12px;
  border: 0;
  border-bottom: 1px solid #161616;
  border-radius: 0;
  background: #f4f4f4;
  color: #161616;
  font: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rp-note-input:focus {
  border-bottom: 2px solid #0f62fe;
  outline: 0;
}
.rp-note-regenerate {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 8px 0;
  border: 0;
  border-radius: 0;
  background: #ffffff;
  color: #0f62fe;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  letter-spacing: 0.16px;
  white-space: nowrap;
}
.rp-status {
  margin: 0;
  padding: 12px 16px;
  border-top: 1px solid #e0e0e0;
  color: #525252;
  font-size: 14px;
  letter-spacing: 0.16px;
  line-height: 1.5;
}
.rp-empty {
  margin: 0;
  padding: 16px 0;
  color: #525252;
  font-size: 14px;
}
.rp-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  padding: 12px 16px;
  border-top: 1px solid #e0e0e0;
  background: #ffffff;
}
.rp-footer-button {
  min-height: 40px;
  padding: 10px 16px;
}
.rp-button-tertiary {
  border: 1px solid #0f62fe;
  background: #ffffff;
  color: #0f62fe;
}
.rp-button-secondary {
  border: 1px solid #161616;
  background: #161616;
  color: #ffffff;
}
.rp-button-ghost {
  border: 1px solid transparent;
  background: #ffffff;
  color: #da1e28;
}
.rp-decision-dialog-backdrop {
  position: fixed;
  z-index: 10020;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(22, 22, 22, 0.56);
}
.rp-decision-dialog {
  width: min(520px, 100%);
  max-height: min(720px, calc(100vh - 48px));
  overflow: auto;
  border: 1px solid #8d8d8d;
  background: #ffffff;
  color: #161616;
}
.rp-decision-dialog-header {
  padding: 16px;
  border-bottom: 1px solid #e0e0e0;
}
.rp-decision-dialog-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.375;
}
.rp-decision-dialog-fields {
  padding: 0 16px;
}
.rp-decision-dialog-field {
  min-width: 0;
  margin: 0;
  padding: 16px 0;
  border: 0;
  border-bottom: 1px solid #e0e0e0;
}
.rp-decision-dialog-field legend {
  width: 100%;
  margin-bottom: 8px;
  color: #161616;
  font-size: 14px;
  font-weight: 600;
}
.rp-decision-dialog-option {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  min-width: 0;
  padding: 8px 0;
  cursor: pointer;
}
.rp-decision-dialog-option input {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: #0f62fe;
}
.rp-decision-dialog-option span {
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}
.rp-decision-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px;
  border-top: 1px solid #e0e0e0;
}
.rp-decision-dialog-actions .rp-button {
  min-height: 40px;
  padding: 10px 16px;
}
.rp-button-primary {
  border: 1px solid #0f62fe;
  background: #0f62fe;
  color: #ffffff;
}

@media (max-width: 420px) {
  .rp-header,
  .rp-items,
  .rp-status,
  .rp-footer {
    padding-right: 12px;
    padding-left: 12px;
  }
  .rp-summary-band {
    margin-right: 12px;
    margin-left: 12px;
  }
  .rp-notice {
    margin-right: 12px;
    margin-left: 12px;
    padding-right: 12px;
    padding-left: 12px;
  }
  .rp-summary-title {
    padding-right: 12px;
    padding-left: 12px;
  }
  .rp-target-slot,
  .rp-target-slot-empty {
    margin-left: 0;
  }
  .rp-target-slot {
    flex: 1 1 100%;
  }
  .rp-target-select {
    flex: 1 1 auto;
    max-width: none;
  }
  .rp-item {
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .rp-field-list {
    gap: 8px;
  }
  .rp-decision {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
  .rp-decision select {
    width: 100%;
    max-width: none;
  }
  .rp-note-line {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .rp-note-input {
    flex-basis: calc(100% - 36px);
  }
}
