.charts-text-body {
  font-weight: 400;
  font-size: 14px;
  line-height: 1.25;
  font-family: "Montserrat", sans-serif;
}
.charts-text-body-bold {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.25;
  font-family: "Montserrat", sans-serif;
}
.charts-text-big-bold {
  font-weight: 700;
  font-size: 18px;
  line-height: 1.25;
  font-family: "Montserrat", sans-serif;
}
.charts-text-value {
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  font-family: "Spacegrotesk", "Space Grotesk", sans-serif;
}

#vis-vertical-filter {
  .vis-filter-category-container {
    position: relative;
    display: flex;
    width: fit-content;

    .vis-filter-item {
      z-index: 11;
      padding: 12px 50px;
      border: 1px solid #040078;
      background-color: #fff;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 12px;

      @media (max-width: 590px) {
        padding: 6px 12px;
        gap: 8px;
      }

      &:first-child {
        border-radius: 100px 0px 0px 100px;
      }
      &:nth-child(2) {
        border-radius: 0px 100px 100px 0px;
      }

      p {
        margin: 0;
        @media (max-width: 590px) {
          font-size: 14px;
        }
      }

      .category-icon svg {
        height: 28px;
      }
      .category-icon.consumer svg {
        height: 32px;
      }
      @media (max-width: 590px) {
        .category-icon svg {
          height: 20px;
        }
        .category-icon.consumer svg {
          height: 24px;
        }
      }

      &.selected {
        background-color: #040078;
        p {
          color: #ffffff;
        }

        .category-icon svg path {
          fill: white;
        }
      }
    }
  }
  .vis-filter-menu-container {
    position: absolute;
    top: 24px;
    right: 0;
    background-color: #ffffff;
    z-index: 10;
    border-left: 1px solid #040078;
    border-right: 1px solid #040078;
    border-bottom: 1px solid #040078;
    border-radius: 0px 0px 10px 10px;
    width: 100%;
    padding: 60px 26px 26px 26px;

    @media (max-width: 590px) {
      padding: 30px 12px 12px 12px;
    }

    &.fixed {
      position: relative;
      top: -36px;

      @media (max-width: 590px) {
        top: -18px;
      }
    }

    p {
      margin: 0;
      font-family: "Montserrat", sans-serif;
      font-weight: 500;
      font-size: 14px;
      line-height: 1.25;
      color: #000000;
    }

    .vertical-list {
      display: flex;
      flex-wrap: wrap;
      gap: 12px;
      margin-top: 25px;
      margin-bottom: 0px;
      list-style: none;
      padding: 0;

      @media (max-width: 590px) {
        gap: 8px;
        margin-top: 8px;
      }

      .vertical-item {
        display: flex;
        align-items: center;
        gap: 8px;
        background-color: #f2f2f2;
        color: #000000;
        font-size: 16px;
        line-height: 1.25;
        border-radius: 20px;
        cursor: pointer;
        white-space: nowrap;
        transition: all 0.3s ease-in-out;
        @media (max-width: 590px) {
          font-size: 14px;
        }

        .vertical-icon {
          width: auto;
          height: 100%;
          display: flex;
          align-items: center;
          justify-content: center;

          svg {
            width: 100%;
            height: 100%;
            circle {
              transition: fill 0.3s ease-in-out;
            }
          }
        }

        span {
          padding: 6px 12px 6px 0;
        }

        &.active {
          background-color: #040078;
          color: #ffffff;

          .vertical-icon svg circle {
            fill: #040078;
          }
          .vertical-icon svg path {
            fill: white;
          }
        }
        &:hover {
          background-color: #040078;
          color: #ffffff;

          .vertical-icon svg circle {
            fill: #040078;
          }
          .vertical-icon svg path {
            fill: white;
          }
        }
      }
    }
  }
}
.vis-filter-floating-container {
  position: fixed;
  bottom: 8px;
  right: 50%;
  transform: translateX(50%);
  z-index: 3;

  display: flex;
  flex-direction: column;
  align-items: center;

  @media (max-width: 590px) {
    bottom: 4px;
  }

  .vis-filter-floating-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    background-color: #040078;
    color: white;
    padding: 10px 20px;
    width: 225px;
    border-radius: 100px;
    border: 1px solid #fff;
    font-family: "Montserrat", sans-serif;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    @media (max-width: 590px) {
      font-size: 14px;
    }

    img {
      transition: transform 0.3s ease;
    }
  }
  .vis-filter-floating-content {
    padding: 16px;
    transition: all 0.3s ease;

    &.open {
      display: block;
    }
    &.closed {
      display: none;
    }

    .vis-filter-floating-content-inner {
      display: flex;
      flex-direction: column;
      gap: 0;
      justify-content: center;
      align-items: center;
      width: 551px;

      @media (max-width: 590px) {
        width: 330px;
      }
    }
  }
}

#vis-seasonality-timeline {
  width: 100%;

  .selected-state-pre-hol .state-pre-hol,
  .selected-state-peak-hol .state-peak-hol,
  .selected-state-post-hol .state-post-hol {
    opacity: 1;
  }
  .state-pre-hol,
  .state-peak-hol,
  .state-post-hol {
    opacity: 0;
  }

  path,
  g,
  rect,
  circle,
  text {
    pointer-events: none;
  }

  .click-to-pre,
  .click-to-peak,
  .click-to-post {
    cursor: pointer;
    pointer-events: all;
    fill: transparent;
  }
}

#vis-comparison-years {
  width: 100%;

  .vis-year-buttons-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    justify-content: start;
    align-items: start;

    @media (max-width: 480px) {
      flex-direction: row;
    }

    .vis-year-button {
      font-family: "Montserrat", sans-serif;
      font-size: 16px;
      line-height: 1.25;
      font-weight: 400;
      color: #000000;
      background: #f8f8f8;
      cursor: pointer;
      border-radius: 10px;
      padding: 15px 15px;
      width: 100%;

      @media (max-width: 480px) {
        font-size: 14px;
      }

      &.selected {
        font-weight: 700;
        color: white;
        background: #0280fb;
      }
    }
  }
}
#vis-comparison-periods {
  flex-grow: 1;
  width: 100%;

  .vis-period-buttons-container {
    display: flex;
    flex-direction: row;
    gap: 12px;
    height: 100%;
    width: 100%;

    @media (max-width: 480px) {
      flex-direction: column;
    }

    .vis-period-button {
      font-family: "Montserrat", sans-serif;
      font-size: 14px;
      line-height: 1.25;
      font-weight: 400;
      color: rgba(0, 0, 0, 1);
      background: #f8f8f8;
      cursor: pointer;
      border-radius: 10px;
      padding: 15px 15px;
      display: flex;
      flex-direction: row;
      align-items: center;
      gap: 12px;
      transition: all 0.3s ease;
      flex-grow: 1;
      justify-content: space-between;

      &.selected {
        color: white;
        background: #0280fb;
      }
      &.selected.has-icon {
        justify-content: space-around;
      }

      @media (max-width: 480px) {
        padding: 20px 20px;
        justify-content: space-between;
        padding-left: 24px;

        &.selected.has-icon {
          justify-content: space-between;
          flex-direction: row-reverse;
        }
      }

      img {
        width: 50px;
        height: 50px;
        object-fit: contain;
        @media (max-width: 480px) {
          width: 60px;
          height: 60px;
        }
      }

      .vis-period-button-text {
        display: flex;
        flex-direction: column;
        gap: 6px;
      }

      .vis-period-title {
        display: block;
        font-weight: 700;
      }
    }
  }
}

.single-charts-title {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 1.115rem;
  line-height: 1.25;
}

/* used in advertiser and comparison chart */
.vis-metrics-buttons-container {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  position: relative;

  .vis-metrics-button {
    padding: 5px 15px;
    cursor: pointer;
    border-radius: 10px;
    background-color: #e4e4e4;
    color: #000;
    font-family: "Montserrat", sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.25;

    &.selected {
      background-color: #000;
      color: #ffffff;
      font-weight: 700;
    }
  }
}

#vis-user-container,
#vis-advertiser-container,
#vis-comparison-container {
  svg {
    overflow: visible;
  }
}

/*
Tooltip for multiple visualizations
*/
.tooltip {
  position: absolute;
  background-color: white;
  border-radius: 10px;
  padding: 16px;
  border: 0.5px solid #000;
  z-index: 1000;
  top: 0;
  left: 0;
  transition: all 0.3s ease;

  display: flex;
  flex-direction: column;
  gap: 16px;
  pointer-events: none;

  p {
    color: black;
    margin: 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.25;
  }

  p.tooltip-title {
    font-weight: 700;
  }
  p.tooltip-value {
    font-weight: 700;
    font-family: "Spacegrotesk", "Space Grotesk", sans-serif;
  }
}

/* top is set dynamically inline */
.loader-overlay {
  position: absolute;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;

  width: 100px;
  height: 100px;
}
