.container {
    padding: 40px;
    height: 100%;
}

body {
    margin: 0px;
    padding: 0px;
    font: 14px Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
}

label,select {
    margin-right: 10px;
}

.explanation-view-select {
    min-width: 280px;
    font-size: 15px;
    padding: 4px 8px;
}

h3 {
    line-height: 0em;
}

.selectors {
    margin-bottom: 30px;
}

#explanation-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

#tables-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}


/* button to copy the link. unimportant as shit but cool. */
.copy-button {
    margin-bottom: 10px;
    padding: 10px 10px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s;
}
.copy-button:hover {
    background-color: #0056b3;
}
.copy-button:active {
    background-color: #004085;
}


/* table style */
table {
  border-collapse: collapse;
  margin-bottom: 10px;
  border: none;
}

.case-label-cell {
  text-align: center;
  font-size: 17px;
  font-weight: bold;
  padding: 0 10px 6px 10px;
  border-bottom: 1px solid black;
}

.case-label-spacer {
  padding: 0 10px 6px 10px;
  border-bottom: none;
}

/* default cell padding */
th,
td {
  padding: 5px 10px;
  font-size: 17px;
  border: none;
  white-space: nowrap;
}

#none-explanation-table thead tr:not(.case-label-row) th:not(:first-child),
#counterfactual-table thead tr:not(.case-label-row) th {
  border-bottom: 1px solid black;
}

.no-padding {
  padding: 0;
}

/* various col styles */

.attribute {
  text-align: right;
}

.value {
  text-align: center;
  padding: 10;
}

.prediction-row-label {
  font-weight: 700;
}

.prediction-row-value {
  text-align: center;
  padding-top: 10px;
}

.prediction-result {
  font-weight: 600;
  border: 2px solid black;
  padding: 4px 8px;
  display: inline-block;
  text-align: center;
}
.prediction-result-positive {
  color: rgba(60, 136, 232);
}
.prediction-result-negative {
  color: rgba(234, 51, 53);
}



/* METER STYLES */

/* default meter styling */
.meter-container {
  text-align: center;
  width: 100px;
  padding-right: 15px;
}

meter {
  width: 100%;
  height: 25px;
}

meter:hover {
  cursor: pointer;
}

meter::-webkit-meter-optimum-value {
  /* background: rgba(60, 136, 232); */
  background: black;
}
meter::-moz-meter-bar {
  /* background: rgba(60, 136, 232); */
  background: black;
}

.icons-container {
  text-align: left;
  min-width: 100px;
}

.attribution-header {
  text-align: center;
}

.counterfactual-table thead tr:not(.case-label-row) th:first-child,
.counterfactual-table td.value {
  text-align: center;
}

.counterfactual-table .case-label-cell {
  text-align: center;
}

.counterfactual-table.counterfactual-table-inline thead tr:not(.case-label-row) th:last-child {
  min-width: 120px;
}

.diff-column-header,
.diff-cell {
  background: rgba(99, 180, 110, 0.2);
  color: rgba(39, 92, 46, 1);
  text-align: right;
  width: 1%;
  white-space: nowrap;
}

.diff-cell {
  padding-left: 10px;
  padding-right: 10px;
}

.diff-content {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.diff-track {
  position: relative;
  width: 82px;
  height: 14px;
  border-radius: 999px;
  background:
    linear-gradient(
      to right,
      transparent 49%,
      rgba(0, 0, 0, 0.25) 49%,
      rgba(0, 0, 0, 0.25) 51%,
      transparent 51%
    );
  background-color: rgba(0, 0, 0, 0.06);
}

.inline-meter-wrapper {
  position: relative;
  width: 100px;
}

.inline-meter-wrapper meter {
  position: relative;
  z-index: 1;
}

.comparison-arrow-track {
  position: absolute;
  left: 0;
  right: 0;
  top: 5px;
  height: 14px;
  z-index: 2;
  pointer-events: none;
}

.comparison-arrow-line {
  position: absolute;
  top: 5px;
  height: 4px;
  background: rgba(64, 143, 74, 0.95);
  border-radius: 999px;
  min-width: 6px;
}

.comparison-arrow-head {
  position: absolute;
  top: 1px;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}

.comparison-arrow-head-right {
  border-left: 8px solid rgba(64, 143, 74, 0.95);
}

.comparison-arrow-head-left {
  border-right: 8px solid rgba(64, 143, 74, 0.95);
}

.comparison-arrow-origin {
  position: absolute;
  top: 1px;
  width: 4px;
  height: 12px;
  margin-left: -2px;
  background: rgba(64, 143, 74, 0.95);
  border-radius: 999px;
}

.comparison-icons {
  display: flex;
  gap: 4px;
  min-width: 100px;
}

.comparison-icon {
  position: relative;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.6px solid #9a9a9a;
  box-sizing: border-box;
  background: transparent;
}

.comparison-icon-current {
  background: black;
  border-color: black;
}

.comparison-icon-original::after {
  content: "";
  position: absolute;
  inset: -3px;
  border: 1.6px solid rgba(64, 143, 74, 0.95);
  border-radius: 50%;
}

.comparison-icon-muted {
  opacity: 0.45;
}

.diff-fill {
  position: absolute;
  top: 2px;
  bottom: 2px;
  border-radius: 999px;
}

.diff-fill-positive {
  background: rgba(64, 143, 74, 0.9);
}

.diff-fill-negative {
  background: rgba(64, 143, 74, 0.9);
}

.diff-text {
  font-size: 14px;
  line-height: 1.3;
  white-space: nowrap;
}

.counterfactual-table tr.counterfactual-row-unchanged td {
  color: rgba(0, 0, 0, 0.3);
}

.counterfactual-table tr.counterfactual-row-unchanged .diff-cell {
  color: rgba(0, 0, 0, 0.3);
}

.counterfactual-table tr.counterfactual-row-unchanged .inline-meter-wrapper,
.counterfactual-table tr.counterfactual-row-unchanged .comparison-icons {
  opacity: 0.45;
}

meter.meter-unchanged::-webkit-meter-optimum-value {
  background: rgba(0, 0, 0, 0.22);
}

meter.meter-unchanged::-moz-meter-bar {
  background: rgba(0, 0, 0, 0.22);
}


/* Feature Attribution Styles */
#feature-attribution-div {
  display: flex;
  flex-direction: column; /* Stack children vertically */
  justify-content: start;
  align-items: center;
  height: 100%;
}


#feature-importance-canvas,
#feature-attribution-canvas {
  width: 120px;
  height: 100%;
  opacity: 1;
}

#feature-attribution-chart,
#feature-importance-chart {
  border: 2px solid black;
  padding-top: 0;
  padding-bottom: 0;
  height: 100%;
}

.influence-direction-labels {
  display: flex;
  justify-content: space-between;
  width: 100%;
  min-width: 120px;
  box-sizing: border-box;
  font-size: 11px;
  line-height: 1.15;
  color: rgba(0, 0, 0, 0.72);
}

.influence-direction-labels span {
  flex: 1;
}

.influence-direction-labels span:first-child {
  text-align: left;
}

.influence-direction-labels span:last-child {
  text-align: right;
}

.influence-direction-cell {
  padding-left: 0;
  padding-right: 0;
  padding-top: 0;
  text-align: center;
}

.influence-direction-spacer {
  padding: 0;
}

.narrative-panel {
  margin-top: 4px;
  max-width: 540px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  padding: 14px 16px;
  background: rgba(244, 247, 243, 0.95);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.narrative-panel-title {
  margin: 0 0 8px 0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.narrative-panel-text {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
  color: rgba(0, 0, 0, 0.8);
}
