.bayesNetResultsComponent {
  display: flex;
  flex-direction: column;
}

.bayesNetResultsComponent .bayesNetResultsPrompt {
  margin-bottom: 12px;
  padding-bottom: 12px;
}

.bayesNetResultsComponent .peopleList {
  margin-bottom: 12px;
}

.bayesNetResultsComponent .bayesNet {
  margin-top: 0;
}

.bayesNetResultsComponent .peopleListPanel {
  background: #fff;
  border: 1px solid #e3e8ef;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(35, 46, 61, 0.06);
  overflow: hidden;
}

.bayesNetResultsComponent .peopleList .loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 88px;
  padding: 20px 24px;
  font-family: 'Montserrat-light', 'Montserrat', sans-serif;
  font-size: 13px;
  color: #6b7785;
}

.bayesNetResultsComponent .peopleListLoadingSpinner {
  width: 16px;
  height: 16px;
  border: 2px solid #d3dce5;
  border-top-color: var(--activeBackground, #86C232);
  border-radius: 50%;
  animation: bayesNetResultsSpin 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes bayesNetResultsSpin {
  to {
    transform: rotate(360deg);
  }
}

.bayesNetResultsComponent .peopleListHeader {
  padding: 14px 18px 10px;
  border-bottom: 1px solid #eef1f5;
}

.bayesNetResultsComponent .peopleList .peopleListTitle {
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7785;
}

.bayesNetResultsComponent .peopleList .peopleListContent {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 18px 16px;
  max-height: 220px;
  overflow-y: auto;
}

.bayesNetResultsComponent .peopleList .person {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 6px 12px 6px 6px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #f4f7fa;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.bayesNetResultsComponent .peopleList .person:hover {
  background: #eef3f8;
  border-color: #d8e0ea;
}

.bayesNetResultsComponent .peopleList .person.isSelected {
  background: #f3f9eb;
  border-color: var(--activeBorder, #86C232);
  box-shadow: 0 0 0 1px rgba(134, 194, 50, 0.12);
}

.bayesNetResultsComponent .peopleList .person .avatar.small {
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  margin-right: 0;
  padding: 0 !important;
  border-radius: 50%;
  font-size: 11px;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.bayesNetResultsComponent .peopleList .person.isSelected .avatar.small {
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--activeBorder, #86C232);
}

.bayesNetResultsComponent .peopleList .avatarName {
  max-width: 140px;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: 'Montserrat-light', 'Montserrat', sans-serif;
  font-size: 13px;
  line-height: 1.2;
  color: #232e3d;
}

.bayesNetResultsComponent .peopleList .person.isSelected .avatarName {
  font-family: 'Montserrat', sans-serif;
  color: #1f2933;
}

.bayesNetResultsComponent .peopleList .peopleListPaginator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 0;
  padding: 10px 18px 14px;
  border-top: 1px solid #eef1f5;
  background: #fafbfc;
}

.bayesNetResultsComponent .peopleList .peopleListPaginator button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  background: #fff;
  color: #475569;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.bayesNetResultsComponent .peopleList .peopleListPaginator button:hover:not(:disabled) {
  background: #f4f7fa;
  border-color: #b8c4d4;
  color: #232e3d;
}

.bayesNetResultsComponent .peopleList .peopleListPaginator button:disabled {
  opacity: 0.4;
  cursor: default;
}

.bayesNetResultsComponent .peopleList .peopleListPageIndicator {
  min-width: 52px;
  text-align: center;
  font-family: 'Montserrat-light', 'Montserrat', sans-serif;
  font-size: 12px;
  color: #6b7785;
}

.bayesNetResultsComponent .peopleList .peopleListPageDivider {
  margin: 0 2px;
  color: #b8c4d4;
}

.bayesNetResultsComponent .peopleList .peopleListContent::-webkit-scrollbar {
  width: 8px;
}

.bayesNetResultsComponent .peopleList .peopleListContent::-webkit-scrollbar-thumb {
  background: #d3dce5;
  border-radius: 999px;
}

.bayesNetResultsComponent .peopleList .peopleListContent::-webkit-scrollbar-track {
  background: transparent;
}

/* Shared Bayes Net panel tokens */
.bayesNetResultsComponent .bayesNetContent,
.bayesNetViewComponent .bayesNetViewTabs {
  background: #fff;
  border: 1px solid #e3e8ef;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(35, 46, 61, 0.06);
  overflow: hidden;
}

.bayesNetResultsComponent .bayesNetContent {
  padding: 14px 18px 18px;
}

.bayesNetResultsComponent .bayesNetContent .bayesNetViewComponent .bayesNetViewTabs {
  border: none;
  box-shadow: none;
  background: transparent;
  border-radius: 0;
}

.bayesNetResultsComponent .bayesNetContent .bayesNetViewComponent .bayesNetViewTabs .tabs__header {
  padding-left: 0;
  padding-right: 0;
  padding-top: 0;
}

.bayesNetResultsComponent .bayesNetContent .bayesNetViewComponent .bayesNetViewTabs .tabs__content {
  padding-left: 0;
  padding-right: 0;
  padding-bottom: 0;
}

.bayesNetViewComponent {
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: #232e3d;
  font-family: 'Montserrat-light', 'Montserrat', sans-serif;
}

.bayesNetViewComponent .bayesNetViewPrompt {
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: 14px;
  line-height: 1.5;
  color: #232e3d;
}

.bayesNetViewComponent .bayesNetViewLoading {
  width: 100%;
  text-align: center;
  padding: 20px 24px;
  font-family: 'Montserrat-light', 'Montserrat', sans-serif;
  font-size: 13px;
  color: #6b7785;
}

.bayesNetViewComponent .bayesNetViewTabs .tabs__header {
  gap: 6px;
  padding: 14px 18px 10px;
  border-bottom: 1px solid #eef1f5;
}

.bayesNetViewComponent .bayesNetViewTabs .tabs__title {
  margin: 0;
  padding: 6px 14px;
  border: 1px solid #e3e8ef;
  border-radius: 8px;
  background: #fafbfc;
  font-family: 'Montserrat-light', 'Montserrat', sans-serif;
  font-size: 13px;
  color: #475569;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.bayesNetViewComponent .bayesNetViewTabs .tabs__title:hover {
  background: #f4f7fa;
  border-color: #d8e0ea;
  color: #232e3d;
}

.bayesNetViewComponent .bayesNetViewTabs .tabs__title-active {
  background: #fff;
  border-color: var(--activeBorder, #86C232);
  color: #1f2933;
  box-shadow: 0 0 0 1px rgba(134, 194, 50, 0.12);
}

.bayesNetViewComponent .bayesNetViewTabs .tabs__title .tabs__action-buttons img {
  width: 12px;
  margin-left: 6px;
  opacity: 0.7;
}

.bayesNetViewComponent .bayesNetViewTabs .tabs__title.new-tab-btn {
  min-width: 34px;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  color: #6b7785;
}

.bayesNetViewComponent .bayesNetViewTabs .tabs__content {
  margin-top: 0;
  border: none;
  line-height: 1.5;
  padding: 14px 18px 18px;
}

.bayesNetViewComponent .bayesNetViewCanvas {
  background: #fafbfc;
  border: 1px solid #eef1f5;
  border-radius: 10px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.bayesNetViewComponent .bayesNetViewCanvas svg .node,
.bayesNetViewComponent .bayesNetViewCanvas svg .node * {
  touch-action: none;
}

.bayesNetViewComponent .bayesNetViewCanvas .loading {
  margin: 20px 24px;
  font-family: 'Montserrat-light', 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: #6b7785;
}

.bayesNetViewComponent .bayesNetViewCanvas svg .node rect:not(.node-card) {
  /* ORIGINAL (still used outside BayesBot): stroke/fill below.
     BayesBot Stripe theme overrides these from templates/BayesBot.html when
     body.bayesBotStripeTheme is set. Revert BayesBot by removing that class
     and the STRIPE THEME blocks in BayesBot.html / BayesBotNodeScoreModal.html. */
  stroke: #d8e0ea !important;
  fill: #fff !important;
}

.bayesNetViewComponent .bayesNetViewCanvas svg .node text,
.bayesNetResultsComponent .bayesNetContent svg .node text {
  fill: #232e3d !important;
}

.bayesNetViewComponent .bayesNetViewCanvas svg .link,
.bayesNetResultsComponent .bayesNetContent svg .link {
  stroke: #b8c4d4 !important;
}

/* Expanded node modal */
#expandedNodeContainer.expandedBayesNodePanel.is-dragging,
#expandedNodeContainer.expandedBayesNodePanel.is-dragging * {
  user-select: none !important;
  -webkit-user-select: none !important;
  cursor: grabbing !important;
}

#expandedNodeContainer.expandedBayesNodePanel.is-over-text:not(.is-dragging) {
  cursor: auto;
  user-select: text;
  -webkit-user-select: text;
}

#expandedNodeContainer.expandedBayesNodePanel {
  position: fixed;
  top: 72px;
  left: calc((100% - 560px) / 2);
  width: calc(100vw - 80px);
  max-width: 560px;
  max-height: calc(100vh - 100px);
  padding: 0;
  overflow: hidden;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  border: 1px solid #e3e8ef;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(35, 46, 61, 0.08), 0 1px 3px rgba(35, 46, 61, 0.06);
  color: #232e3d;
  font-family: 'Montserrat-light', 'Montserrat', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  background: #ffffff;
}

#expandedNodeContainer.expandedBayesNodePanel .expandedBayesNodeClose {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin: 0;
  padding: 0;
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  background: #fff;
  float: none;
}

#expandedNodeContainer.expandedBayesNodePanel .expandedBayesNodeClose img {
  width: 14px;
  height: 14px;
}

#expandedNodeContainer.expandedBayesNodePanel .expandedBayesNodeClose:hover {
  background: #f4f7fa;
  border-color: #b8c4d4;
}

#expandedNodeContainer.expandedBayesNodePanel .expandedBayesNodeHeader {
  position: relative;
  padding: 18px 48px 16px 20px;
  border-bottom: 1px solid #e3e8ef;
  background: #f4f6f9;
  flex-shrink: 0;
}

#expandedNodeContainer.expandedBayesNodePanel .expandedBayesNodeTitleRow {
  display: flex;
  align-items: center;
  gap: 10px;
}

#expandedNodeContainer.expandedBayesNodePanel .expandedBayesNodeTitleInput {
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  color: #1f2933;
  border-bottom-color: #d8e0ea;
}

#expandedNodeContainer.expandedBayesNodePanel .expandedBayesNodeTitleInput:focus {
  border-bottom-color: var(--activeBorder, #86C232);
}

#expandedNodeContainer.expandedBayesNodePanel .expandedBayesNodeDescription {
  box-sizing: border-box;
  width: 100%;
  min-height: 72px;
  margin: 0 0 16px;
  padding: 10px 12px;
  border: 1px solid #e3e8ef;
  border-radius: 8px;
  background: #fafbfc;
  font-family: 'Montserrat-light', 'Montserrat', sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: #232e3d;
  resize: vertical;
  outline: none;
}

#expandedNodeContainer.expandedBayesNodePanel .expandedBayesNodeDescription:focus {
  border-color: #d8e0ea;
  background: #fff;
}

#expandedNodeContainer.expandedBayesNodePanel .expandedBayesNodeDescriptionReadonly {
  margin: 0 0 16px;
  font-family: 'Montserrat-light', 'Montserrat', sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: #3d4754;
  word-wrap: break-word;
  overflow-wrap: break-word;
  padding: 0;
}

#expandedNodeContainer.expandedBayesNodePanel .expandedBayesNodeReadMore {
  display: inline;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

#expandedNodeContainer.expandedBayesNodePanel .expandedBayesNodeReadMore.isShowLess {
  display: block;
  margin-top: 6px;
}

#expandedNodeContainer.expandedBayesNodePanel .expandedBayesNodeBotRationale {
  margin-top: 12px;
  padding: 12px 14px 14px;
  border: 1px solid #e3e8ef;
  border-radius: 10px;
  background: #fafbfc;
}

#expandedNodeContainer.expandedBayesNodePanel .expandedBayesNodeBotRationaleLabel {
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b7785;
  margin: 0 0 8px;
}

#expandedNodeContainer.expandedBayesNodePanel .expandedBayesNodeBotRationaleText {
  font-family: 'Montserrat-light', 'Montserrat', sans-serif;
  font-size: 13px;
  line-height: 1.55;
  color: #232e3d;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

#expandedNodeContainer.expandedBayesNodePanel .expandedBayesNodeTitleReadonly {
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  line-height: 1.35;
  color: #141F33;
}

#expandedNodeContainer.expandedBayesNodePanel .expandedBayesNodeBody {
  margin-top: 0;
  padding: 16px 20px 20px;
  overflow: visible;
  flex-shrink: 0;
  background: #ffffff;
}

#expandedNodeContainer.expandedBayesNodePanel .expandedBayesNodeTableContainer {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid #e3e8ef;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(35, 46, 61, 0.06);
}

#expandedNodeContainer.expandedBayesNodePanel .expandedBayesNodeTable {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: #fff;
}

#expandedNodeContainer.expandedBayesNodePanel .expandedBayesNodeTable th,
#expandedNodeContainer.expandedBayesNodePanel .expandedBayesNodeTable td {
  background-color: #fff;
  padding: 10px 12px;
  border: 1px solid #eef1f5;
  vertical-align: top;
  font-family: 'Montserrat-light', 'Montserrat', sans-serif;
  color: #232e3d;
}

#expandedNodeContainer.expandedBayesNodePanel .expandedBayesNodeTable thead tr:first-child th {
  background: #fafbfc;
  border-bottom: 1px solid #eef1f5;
  font-family: 'Montserrat-light', 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: #475569;
  vertical-align: middle;
}

#expandedNodeContainer.expandedBayesNodePanel .expandedBayesNodeTable thead tr:nth-child(2) th {
  background: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #475569;
}

#expandedNodeContainer.expandedBayesNodePanel .expandedBayesNodeSecondColumnHeader {
  position: relative;
}

#expandedNodeContainer.expandedBayesNodePanel .expandedBayesNodeSecondColumnHeader.hasTableActions {
  padding-bottom: 28px;
}

#expandedNodeContainer.expandedBayesNodePanel .expandedBayesNodeTableHeading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 100%;
}

#expandedNodeContainer.expandedBayesNodePanel .expandedBayesNodeTableActions {
  position: absolute;
  right: 12px;
  bottom: 8px;
  display: flex;
  justify-content: flex-end;
  margin-top: 0;
}

#expandedNodeContainer.expandedBayesNodePanel .expandedBayesNodeAddState img {
  width: 18px;
  height: 18px;
  opacity: 0.75;
}

#expandedNodeContainer.expandedBayesNodePanel .expandedBayesNodeStateHeader {
  cursor: pointer;
}

#expandedNodeContainer.expandedBayesNodePanel .expandedBayesNodeStateInput {
  width: 100%;
  text-align: center;
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  color: #232e3d;
  border: 1px solid #e3e8ef;
  border-radius: 6px;
  padding: 6px 8px;
  outline: none;
}

#expandedNodeContainer.expandedBayesNodePanel .expandedBayesNodeStateInput:focus {
  border-color: #d8e0ea;
}

#expandedNodeContainer.expandedBayesNodePanel .expandedBayesNodeStateActions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-top: 8px;
}

#expandedNodeContainer.expandedBayesNodePanel .expandedBayesNodeDeleteState {
  font-size: 12px;
  font-family: 'Montserrat-light', 'Montserrat', sans-serif;
  color: #c0392b;
}

#expandedNodeContainer.expandedBayesNodePanel .expandedBayesNodeCellInfo {
  display: flex;
}

#expandedNodeContainer.expandedBayesNodePanel .expandedBayesNodeForecastValue {
  text-align: center;
  font-size: 13px;
  color: #232e3d;
}

#expandedNodeContainer.expandedBayesNodePanel .expandedBayesNodeForecastInput {
  min-width: 170px;
}

#expandedNodeContainer.expandedBayesNodePanel .warning,
#expandedNodeContainer.expandedBayesNodePanel .expandedBayesNodeWarning {
  margin: 10px;
  font-size: 12px;
  color: #c0392b;
}

#expandedNodeContainer.expandedBayesNodePanel .info-icon {
  width: 14px;
  height: 14px;
  line-height: 14px;
  font-size: 10px;
  color: #6b7785;
  border-color: #d8e0ea;
}

#expandedNodeContainer.expandedBayesNodePanel .info-icon:hover {
  color: #475569;
  border-color: #b8c4d4;
}

#expandedNodeContainer.expandedBayesNodePanel .expandedBayesNodeRationale {
  margin-top: 12px;
}

#expandedNodeContainer.expandedBayesNodePanel .expandedBayesNodeMyForecast {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}

#expandedNodeContainer.expandedBayesNodePanel .expandedBayesNodeMyForecastLabel {
  display: inline-block;
  vertical-align: top;
  font-size: 14px;
  font-family: 'Montserrat', sans-serif;
  color: #475569;
}

#expandedNodeContainer.expandedBayesNodePanel .expandedBayesNodeTableContainer::-webkit-scrollbar {
  height: 8px;
}

#expandedNodeContainer.expandedBayesNodePanel .expandedBayesNodeTableContainer::-webkit-scrollbar-thumb {
  background: #d3dce5;
  border-radius: 999px;
}

#expandedNodeContainer.expandedBayesNodePanel .expandedBayesNodeTableContainer::-webkit-scrollbar-track {
  background: transparent;
}
