/*
 * Copyright (C) 2000 - 2026 Silverpeas
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * As a special exception to the terms and conditions of version 3.0 of
 * the GPL, you may redistribute this Program in connection with Free/Libre
 * Open Source Software ("FLOSS") applications as described in Silverpeas's
 * FLOSS exception.  You should have received a copy of the text describing
 * the FLOSS exception, and it is also available here:
 * "https://www.silverpeas.org/legal/floss_exception.html"
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 */

.chart-tooltip {
  pointer-events: none;
}

.survey .principalContent {
  min-height: auto;
}

/* to highlight the questions */
.surveyResult .questionResults th {
  font-size: 1.2em;
  padding-bottom: 1em;
}

.questionResults .questionResults-top th {
  font-size: 1em;
}

/* to shift the answers */
.surveyResult .questionResults td {
  min-height: 33px;
  padding-left: 1.2em;
}

.surveyResult .pie-chart-line .contentAnswer {
  padding-top: calc(1.5em - 4px);
}

.surveyResult .horizontal-bar-chart-line .contentAnswer {
  padding-top: 5px;
}

.surveyResult .horizontal-bar-chart-line .contentAnswer div span {
  display: block;
}

.legend {
  display: none;
}

.horizontal-bar-chart-line {
  display: flex;
  line-height: 1.5em;
  margin-bottom: 0.5em;
}

.left {
  order: 2;
}

.right {
  order: 1;
  flex-basis: calc(100px + 16px + 1em);
  position: relative;
  margin-right: 5px;
}

.right > img {
  float: right;
  margin-top: 1.5em;
  margin-right: calc(16px + 0.25em);
}

.right span {
  position: absolute;
  top: 0;
  right: calc(16px + 0.25em);
  width: 5em;
  text-align: right;
  line-height: 1.5em;
}

.right .iconInfo {
  position: absolute;
  top: calc(1.25em - 2.5px - 5px);
  right: 0;
}

.contentAnswer .iconInfo {
  text-decoration: underline;
  font-size: 0.9em;
  color: #1c94d4;
  display: block;
}

.legend-color {
  width: 25px;
  height: 15px;
}

.legend-color > div {
  width: 100%;
  height: 100%;
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 400;
}

.survey .chart-pie-label {
  font-size: 16px;
  font-weight: 400;
}

.survey .chart-area:hover {
  background-color: inherit;
}

.survey .chart-area .chart {
  width: 600px;
  height: 300px;
}

.surveyResult .pie-chart-line {
  display: flex;
  flex-wrap: wrap;
}

.surveyResult .pie-chart-line > div:first-child {
  flex-basis: calc(100% - 600px);
}

.surveyResult .pie-chart-line div.flex-container {
  flex-basis: 600px;
}

.surveyResult .pie-chart-line .labelAnswer {
  display: flex;
  margin-bottom: 2em;
  text-align: justify;
  padding-right: 0;
}

.surveyResult .pie-chart-line .labelAnswer .legend-color {
  border: 1px solid #999;
  padding: 3px;
  width: 3em;
  height: 3em;
  flex-basis: 3em;
  flex-shrink: 0;
  margin-right: 1em;
  text-align: center;
  line-height: 3em;
}

.surveyResult .pie-chart-line .labelAnswer .contentAnswer .thumbs img,
.horizontal-bar-chart-line .labelAnswer .contentAnswer .thumbs img {
  max-width: 250px;
  height: auto;
}

.horizontal-bar-chart-line .labelAnswer {
  text-align: left;
  padding-right: 0;
  flex-basis: calc(100% - 100px - 16px - 1.5em);
}

@media only screen and (max-width: 980px), only screen and (max-device-width: 980px) {
  .surveyResult .pie-chart-line div:first-child {
    flex-basis: 100%;
  }
}

@media print {
  .eventInfo {
    margin-bottom: 0.5em;
  }

  .survey .principalContent {
    width: 100%;
    padding: 0;
    margin: 0;
  }

  div.flex-container {
    display: block;
    page-break-inside: avoid;
    break-inside: avoid;
    height: 600px;
  }

  .surveyResult .pie-chart-line .legend-color {
    font-size: 10px;
  }

  .surveyResult .pie-chart-line .labelAnswer .legend-color {
    border: 0;
    padding: 0;
  }

  .surveyResult .pie-chart-line {
    display: flex;
    flex-direction: column;
  }

  .surveyResult .pie-chart-line > div:first-child {
    order: 2;
    display: flex;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
  }

  .surveyResult .pie-chart-line > div:first-child > div {
    display: flex;
    flex-direction: row;
    padding: 2em;
    max-width: 200px;
  }

  .surveyResult .pie-chart-line div.flex-container {
    order: 1;
    flex-basis: 300px !important;
    overflow: hidden;
  }

  .horizontal-bar-chart-line .labelAnswer .contentAnswer .thumbs img,
  .surveyResult .pie-chart-line .labelAnswer .contentAnswer .thumbs img {
    max-width: 150px;
    height: auto;
  }

  /* on masque */
  .inlineMessage, .sousNavBulle,
  #classification, .contentAnswer
  .iconInfo, .right .iconInfo,
  .surveyParticipation img[src="icons/info.gif"] {
    display: none;
  }

  .surveyResult {
    padding: 0;
  }

  .legend-color div {
    border-width: 4px;
    border-style: solid;
  }

  .surveyResult .questionResults td.questionSeparator {
    padding: 0;
    font-size: 1px;
  }
}