/* # Sentiment analysis page  */

.sentiment-analysis .attachment-before {
  @media screen and (width >= 48em) {
    /* display the charts in a grid **/
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--gcds-container-spacing-500);
  }
  /* visually separate the chart from surrounding content */
  margin-bottom: var(--gcds-container-spacing-450);
}

.sentiment-analysis h3 {
  margin: var(--gcds-text-spacing-600) 0 var(--gcds-text-spacing-300);
}

.sentiment-analysis h3:first-of-type {
  margin: 0 0 var(--gcds-text-spacing-300);
}
/* add semantic colours to the comments */
.sentiment-analysis .views-row {
  margin-bottom: var(--gcds-container-spacing-200);
  border: 1px solid transparent;
  border-radius: var(--gcds-border-radius-md);
}

.sentiment-analysis .views-field-comment-body,
.sentiment-analysis .views-field-field-sentiment {
  padding: var(--gcds-text-spacing-150) var(--gcds-text-spacing-200);
}

.sentiment-analysis .views-field-field-sentiment {
  color: var(--gcds-color-grayscale-0);
}

.sentiment-analysis .strongly-agree {
  border-color: var(--gcds-ext-strongly-agree);
}
.sentiment-analysis .strongly-agree .views-field-field-sentiment {
  background-color: var(--gcds-ext-strongly-agree);
}

.sentiment-analysis .agree {
  border-color: var(--gcds-ext-agree);
}
.sentiment-analysis .agree .views-field-field-sentiment {
  background-color: var(--gcds-ext-agree);
}

.sentiment-analysis .neutral {
  border-color: var(--gcds-ext-neutral);
}
.sentiment-analysis .neutral .views-field-field-sentiment {
  background-color: var(--gcds-ext-neutral);
}

.sentiment-analysis .disagree {
  border-color: var(--gcds-ext-disagree);
}
.sentiment-analysis .disagree .views-field-field-sentiment {
  background-color: var(--gcds-ext-disagree);
}

.sentiment-analysis .strongly-disagree {
  border-color: var(--gcds-ext-strongly-disagree);
}
.sentiment-analysis .strongly-disagree .views-field-field-sentiment {
  background-color: var(--gcds-ext-strongly-disagree);
}

.sentiment-analysis .irrelevant {
  border-color: var(---gcds-ext-irrelevant);
}
.sentiment-analysis .irrelevant .views-field-field-sentiment {
  background-color: var(--gcds-ext-irrelevant);
}

.sentiment-analysis .irrelevant .views-field-comment-body {
  text-decoration: line-through;
  color: var(--gcds-ext-irrelevant);

}


/* Set the colours in the pie chart */

/* sentiment */

[class*="bb-legend-item"][class*="Strongly-agree"] .bb-legend-item-tile,
[class*="bb-arc"][class*="Strongly-agree"] {
  fill: var(--gcds-ext-strongly-agree) !important;
  stroke: var(--gcds-ext-strongly-agree) !important;
}

[class*="bb-legend-item"][class*="Agree"] .bb-legend-item-tile,
[class*="bb-arc"][class*="Agree"] {
  fill: var(--gcds-ext-agree) !important;
  stroke: var(--gcds-ext-agree) !important;
}

[class*="bb-legend-item"][class*="Neutral"] .bb-legend-item-tile,
[class*="bb-arc"][class*="Neutral"] {
  fill: var(--gcds-ext-neutral) !important;
  stroke: var(--gcds-ext-neutral) !important;
}

[class*="bb-legend-item"][class*="Disagree"] .bb-legend-item-tile,
[class*="bb-arc"][class*="Disagree"] {
  fill: var(--gcds-ext-disagree) !important;
  stroke: var(--gcds-ext-disagree) !important;
}

[class*="bb-legend-item"][class*="Strongly-disagree"] .bb-legend-item-tile,
[class*="bb-arc"][class*="Strongly-disagree"] {
  fill: var(--gcds-ext-strongly-disagree) !important;
  stroke: var(--gcds-ext-strongly-disagree) !important;
}

[class*="bb-legend-item"][class*="Irrelevant"] .bb-legend-item-tile,
[class*="bb-arc"][class*="Irrelevant"] {
  fill: var(--gcds-ext-irrelevant) !important;
  stroke: var(--gcds-ext-irrelevant) !important;
}

/* Regions */

[class*="bb-legend-item"][class*="Atlantic-Canada"] .bb-legend-item-tile,
[class*="bb-arc"][class*="Atlantic-Canada"] {
  fill: var(--gcds-ext-atlantic-canada) !important;
  stroke: var(--gcds-ext-atlantic-canada) !important;
}

[class*="bb-legend-item"][class*="Central-Canada"] .bb-legend-item-tile,
[class*="bb-arc"][class*="Central-Canada"] {
  fill: var(--gcds-ext-central-canada) !important;
  stroke: var(--gcds-ext-central-canada) !important;
}

[class*="bb-legend-item"][class*="Prairie-Provinces"] .bb-legend-item-tile,
[class*="bb-arc"][class*="Prairie-Provinces"] {
  fill: var(--gcds-ext-prairie-provinces) !important;
  stroke: var(--gcds-ext-prairie-provinces) !important;
}

[class*="bb-legend-item"][class*="Northern-Canada"] .bb-legend-item-tile,
[class*="bb-arc"][class*="Northern-Canada"] {
  fill: var(--gcds-ext-northern-canada) !important;
  stroke: var(--gcds-ext-northern-canada) !important;
}

[class*="bb-legend-item"][class*="West-Coast-or-Pacific-Region"] .bb-legend-item-tile,
[class*="bb-arc"][class*="West-Coast-or-Pacific-Region"] {
  fill: var(--gcds-ext-west-coast) !important;
  stroke: var(--gcds-ext-west-coast) !important;
}

/* Small business */

/* add extra conditions on No so it doesn't collide with Northern */
[class*="bb-legend-item"][class$="No"] .bb-legend-item-tile,
[class*="bb-legend-item"][class*="No-"] .bb-legend-item-tile,
[class*="bb-arc"][class$="No"],
[class*="bb-arc"][class*="No-"] {
  fill: var(--gcds-ext-strongly-disagree) !important;
  stroke: var(--gcds-ext-strongly-disagree) !important;
}

[class*="bb-legend-item"][class*="Yes"] .bb-legend-item-tile,
[class*="bb-arc"][class*="Yes"] {
  fill: var(--gcds-ext-strongly-agree) !important;
  stroke: var(--gcds-ext-strongly-agree) !important;
}

/* Representation */

[class*="bb-legend-item"][class*="Individual"] .bb-legend-item-tile,
[class*="bb-arc"][class*="Individual"] {
  fill: var(--gcds-ext-individual) !important;
  stroke: var(--gcds-ext-individual) !important;
}
[class*="bb-legend-item"][class*="Organization"] .bb-legend-item-tile,
[class*="bb-arc"][class*="Organization"] {
  fill: var(--gcds-ext-organization) !important;
  stroke: var(--gcds-ext-organization) !important;
}

[class*="bb-legend-item"][class*="Government"] .bb-legend-item-tile,
[class*="bb-arc"][class*="Government"] {
  fill: var(--gcds-ext-government) !important;
  stroke: var(--gcds-ext-government) !important;
}
