/* DASHBOARD BUTTONS */

.dashboards__wrapper :is(button, .button) {
    width: fit-content;
    align-content: center;
    background: none;
    background-color: #f26a5c;
    border: none;
    border-radius: 30px;
    color: #ffffff !important;
    cursor: pointer;
    font-family: Rubik;
    font-size: 14px;
    height: 46px;
    min-height: 46px;
    letter-spacing: .05em;
    padding: 0 18px;
    text-transform: uppercase;
    transition: all .4s ease-in-out;
}

.dashboards__wrapper :is(button, .button):hover {
    background-color: #1E2752;
}

.dashboard__selectors {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.dashboard__selectors button.active {
  background-color: #1E2752;
  color: #FFFFFF;
}

.dashboard__expand button {
  position: relative;
}

/* DASHBOARD CONTAINER */

.dashboards__wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: auto;
    align-items: center;
    padding: 40px 80px;
}

.dashboard__container {
    display: flex;
    flex-direction: column;
    gap: 40px;
    align-items: center;
    width: 100%;
    background-color: #EDEDF1;
    padding: 40px;
    border-radius: 24px;
    max-width: 1280px;
}

.dashboard__container:not(.active) {
    display: none;
}

.dashboard {
    position: relative;
    display: grid;
    align-items: start;
    width: 100%;
    height: 360px;
}

.dashboard__data {
  grid-column: 1;
  grid-row: 1;
}

/* DASHBOARD AXES */

.dashboard__axes {
    display: flex;
    height: 100%;
    justify-content: space-between;
    width: 100%;
    opacity: 1;
    grid-column: 1;
    grid-row: 1;
    position: relative;
}

.vertical .dashboard__axes {
    padding-bottom: 60px;
    width: calc(100% + 80px);
    left: -40px;
    flex-direction: column;
}

.vertical .axis__line {
    align-items: center;
    position: relative;
    display: flex;
    height: 2px;
    width: 100%;
}

.vertical .benchmark__line {
    position: absolute;
    width: 100%;
    height: 2px;
    background-image: linear-gradient(to right, #A6A6A6 50%, rgba(255, 255, 255, 0) 0%);
    background-position: left;
    background-size: 12px 2px;
    background-repeat: repeat-x;
    z-index: 1;
}

span.benchmark__label {
    transform: translateY(calc(-100%)););
    position: absolute;
    line-height: 1.2;
    left: 160px;
    width: 115px;
    padding: 4px 0px;
    font-weight: 500;
    font-size: 14.8px;
}

.vertical .axis__line:not(:last-of-type) {
    background-color: #F3F3F6;
}

.vertical .axis__line:last-of-type {
    background-color: #F3F3F6;
    z-index: 1;
}

.vertical span.axis__label {
    position: absolute;
    display: flex;
    line-height: 0;
    font-size: 14.8px;
    font-weight: 500;
    left: 80px;
    padding: 16px 8px;
    background-color: rgba(194, 213, 237, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 33;
    text-transform: uppercase;
    border-radius: 6px;
    overflow: hidden;
}

.y-axis-label__container {
    position: absolute;
    top: 0;
    height: calc(100% - 60px);
    width: 80px;
    align-content: center;
    text-align: center;
    font-size: 21px;
}

span.y-axis-label {
    bottom: 50%;
    font-weight: 700;
    letter-spacing: .05em;
    position: absolute;
    text-transform: uppercase;
    transform: translate(-50%, 50%) rotate(-90deg);
    white-space: nowrap;
    z-index: 5;
    padding: 6px 8px;
    background-color: rgba(237, 237, 241, 0.85);
    border-radius: 6px;
    backdrop-filter: blur(8px);
}

/* VERTICAL DASHBOARD */

.vertical .dashboard__data {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-evenly;
    overflow-x: scroll;
    overflow-y: clip;
    overscroll-behavior-x: contain;
    scroll-snap-type: both mandatory;
    padding-bottom: 60px;
    -ms-overflow-style: none;
    scrollbar-width: none;
    width: calc(100% + 80px);
    left: -40px;
    position: relative;
    height: 100%;
}

.vertical .dashboard__data li {
    position: relative;
    align-items: end;
    display: flex;
    gap: 6px;
    padding: 0 10px;
    padding-bottom: 1.5px;
    margin: 0;
    scroll-snap-align: start;
    cursor: default;
}

.vertical .dashboard__data li:first-of-type, .vertical .dashboard__data li:first-of-type .item__title {
    padding-left: 180px;
    transition: 750ms ease;
    transition-delay: 400ms;
  @starting-style {
    padding-left: 40px;
  }
}

.vertical .dashboard__data li:last-of-type, .vertical .dashboard__data li:last-of-type .item__title {
    padding-right: 20px;
}

.vertical .dashboard__data li::before {
    content: none;
}

.vertical .data__item {
  transition: height 300ms, background-color 300ms;
  transition-delay: 50ms, 0ms;
  position: relative;
  height: 0px;
  display: flex;
  justify-content: center;
}

.vertical li .data__item:nth-of-type(1), .dashboard__bar-labels .bar__label:nth-of-type(1)::before {
  background-color: #F26A5C;
}

.vertical li .data__item:nth-of-type(2), .dashboard__bar-labels .bar__label:nth-of-type(2)::before {
  background-color: #1E2752;
}

.vertical li .data__item:nth-of-type(3), .dashboard__bar-labels .bar__label:nth-of-type(3)::before {
  background-color: #3CA0D9;
}

.vertical li.grow .data__item {
  height: var(--metric-normalized);
  opacity: 1;
}

.vertical.small li .data__item {
  width: 60px;
}

.vertical.medium li .data__item {
  width: 90px;
}

.vertical.large li .data__item {
  width: 120px;
}

/* SOURCE LINE */

.dashboard__source-line {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.dashboard__source-line * {
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 14px;
}

.dashboard__source-line a {
    text-decoration: underline;
}

/* LABELS */

.item__metric {
    display: flex;
    font-size: 12px;
    font-weight: 700;
    justify-content: center;
    position: absolute;
    padding: 4px 0px;
    top: 0;
    height: 40px;
    overflow: hidden;
}

.data__item.exterior .item__metric {
    transform: translateY(-100%);
    color: #1E2752;
    align-items: end;
    
}

.data__item.interior .item__metric {
    transform: translateY(0%);
    color: #FFFFFF;
    align-items: center;
}

.item__metric span {
    transition: .3s;
    opacity: 0;
    line-height: 1;
    transform: translateY(100%);
}

li:hover .item__metric span, .data__item.static .item__metric span {
  opacity: 1;
  transform: translateY(0%);
}

.item__title {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    bottom: 0;
    left: 0;
    padding: 0 10px;
    transform: translateY(100%);
    height: 60px;
}

.item__title span {
    display: -webkit-box;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    -webkit-line-clamp: 2;
    text-overflow: ellipsis;
    overflow: hidden;
    -webkit-box-orient: vertical;
    transition: 300ms ease;
    transition-delay: 50ms;
}

.dashboard__bar-labels {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    justify-content: center;
}

.bar__label {
    display: flex;
    gap: 6px;
    position: relative;
    align-items: center;
    line-height: 0;
    width: fit-content;
}

.bar__label::before {
  content: "";
  display: block;
  position: relative;
  width: 12px; 
  height: 12px;
  border-radius: 6px;
}

.bar__title {
    font-size: 14.8px;
    letter-spacing: 0.0125em;
    font-weight: 500;
    text-transform: uppercase;
}

.metric__icon {
  display: flex;
}

.metric__icon svg {
  width: 21px;
  height: 21px;
}

.dashboard__x-axis-title {
    font-size: 16px;
    letter-spacing: 0.0125em;
    font-weight: 500;
    text-transform: uppercase;
}

.dashboard.vertical::before, .dashboard.vertical::after {
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="40" viewBox="0 0 20 40" fill="none"><path d="M0 20C0 8.95431 8.95431 0 20 0V0V40V40C8.95431 40 0 31.0457 0 20V20Z" fill="%23F26A5C"/><path d="M15.7072 20.7071C16.0977 20.3166 16.0977 19.6834 15.7072 19.2929L9.34325 12.9289C8.95272 12.5384 8.31956 12.5384 7.92903 12.9289C7.53851 13.3195 7.53851 13.9526 7.92903 14.3431L13.5859 20L7.92903 25.6569C7.53851 26.0474 7.53851 26.6805 7.92903 27.0711C8.31956 27.4616 8.95272 27.4616 9.34325 27.0711L15.7072 20.7071ZM15 21H15.0001V19H15V21Z" fill="white"/></svg>');
    background-repeat: no-repeat;
    background-size: contain;
    position: absolute;
    display: flex;
    height: 80px;
    width: 80px;
    bottom: calc(50% + 73px);
    transition: 300ms ease;
    transition-delay: 300ms;
    z-index: 34;
}

.dashboard.vertical::before {
    left: -40px;
    transform: translate(-50%, 50%) rotate(180deg);
  @starting-style {
    opacity: 0;
  }
}

.dashboard:has(li.grow:first-of-type)::before {
    opacity: 0;
}

.dashboard.vertical::after {
    right: -40px;
    transform: translate(50%, 50%);
  @starting-style {
    opacity: 0;
  }
}

.dashboard:has(li.grow:last-of-type)::after {
    opacity: 0;
}

@media only screen and (max-width: 767px) {
  .dashboards__wrapper {
    padding: 40px 20px;
  } 
}