.chart-header {
    border-bottom: 1px solid #D6D7D8;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: relative;
    padding-bottom: 20px;
}

.chart-header:has(.pill-label:not(:empty)) {
  padding-bottom: 40px;
}

.chart-header h3:not([class]) {
    margin: 0;
}

.chart-header .dropdown-wrapper {
    position: relative;
    display: inline-block;
    width: auto;
}

.chart-header .dropdown-option input {
    width: 1.5rem;
    min-width: 1.5rem;
    height: 1.5rem;
    margin-top: .25rem;
    margin-right: .5rem;
    margin-bottom: 0;
    border-radius: .25rem;
    transition: all .16s ease-in-out;
    font-size: 1rem;
    line-height: 1.5rem;
    color: #565e66;
    border: 1px solid #abbccc;
    position: absolute;
    z-index: -1;
}

.chart-header .dropdown-option span {
    padding-left: 32px;
}

@media screen and (min-width: 991px) {
    .chart-header .dropdown-wrapper {
        display: flex;
        align-items: center;
        gap: 5px;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .chart-header .pills-container {
        display: flex;
        width: 100%;
        justify-content: flex-end;
    }
}

.chart-header .dropdown-button {
    background-color: #fff;
    border: 1px solid #A9ABAE;
    border-radius: 8px;
    padding: 15px 60px 15px 8px;
    cursor: pointer;
    width: auto;
    display: inline-block;
    text-align: left;
    font-size: 1rem;
    color: #58595B;
    position: relative;
    min-width: 200px;
}

.chart-header .dropdown-button.open {
    border-color: var(--base-secondary);
    outline: 1px solid var(--base-secondary);
}

.chart-header .dropdown-button.open:after {
    transform: rotate(270deg);
}

.chart-header .dropdown-button::after {
    position: absolute;
    right: 6px;
    transform: rotate(90deg);
    display: inline-block;
    content: "";
    width: 24px;
    height: 24px;
    background-image: url(../../../../../themes/custom/agrippa/img/svg/icons/icon-chevron-right-rounded.svg);
}

.chart-header .dropdown-menu {
    position: absolute;
    top: 100%;
    background-color: #fff;
    border: 1px solid #C0C1C3;
    box-shadow: 0 4px 12px #06142840;
    border-radius: .5rem;
    max-height: 200px;
    overflow-y: auto;
    z-index: 10;
    width: max-content;
    right: 0;
    left: unset;
    min-width: 210px;
}

.chart-header .dropdown-option {
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    position: relative;
    outline: 2px solid transparent;
    outline-offset: -3px;
}

.chart-header .dropdown-option.selected {
    background-color: var(--base-secondary);
    color: #fff;
}

.chart-legend {
    display: flex;
    gap: 12px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.color-box {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

.legend-label {
    font-size: 14px;
    color: #333;
}

.chart-header-text p:not([class]) {
    font-size: 18px;
    color: #808284;
    margin: 2px 0 0 0;
}

.chart-header .pills-container {
    display: flex;
    gap: 5px;
    margin-block: 8px;
    flex-wrap: wrap;
}

.chart-header .pill {
    background: white;
    color: gray;
    border: 1px solid gray;
    font-size: 12px;
    border-radius: 15px;
    padding: 2px 8px;
    display: flex;
    align-items: center;
    gap: 3px;
}

.chart-header .pill-close {
    cursor: pointer;
    width: 14px;
    height: 14px;
    filter: invert(45%);
    background-image: url(../../../../../themes/custom/agrippa/img/svg/icons/icon-cross-rounded.svg);

}

.chart-header .pills-container {
    position: absolute;
    left: 0;
    bottom: 0;
    width: auto;
}

.chart-container {
    position: relative;
}

.chart-container canvas {
    min-height: 550px;
    max-height: 550px;
}

@media screen and (max-width: 767px) {
    .chart-header .dropdown-wrapper {
        width: 100%;
    }

    .chart-header .dropdown-menu {
        width: 100%;
    }

    .chart-container canvas {
        min-height: 250px;
        max-height: 250px;
    }
}

.has-totals .chart-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 10px;
}

.chart-totals.totals-display {
    display: grid;
}

.chart-totals.totals-display span {
    font-weight: 600;
    font-size: 26px;
    line-height: 128%;
    letter-spacing: -2%;
    color: #1B1105;
}

.bar-chart-versus .pills-container .pill,
.line-chart-versus .pills-container .pill {
    display: none;
}

.bar-chart-versus .dropdown-option span,
.line-chart-versus .dropdown-option span {
    padding-left: 12px;
}

.chart-header.no-border {
    border-bottom: none;
}

.versus-text {
    color: #1B1105;
    margin-right: 5px;
}

.chart-header-title {
    font-size: 1.25rem;
    letter-spacing: -.017em;
    margin-block: 0;
    font-weight: bold;
    font-family: Inter, Arial, sans-serif;
    line-height: 128%;
    color: #343535;
}

@media screen and (min-width: 991.9px) {
    .chart-header-title {
        font-size:1.625rem;
        letter-spacing: -.02em;
    }
}

.chart-title {
    margin-bottom: 8px;
}

.progress-pie-chart canvas {
    min-height: 300px;
    max-height: 300px;
    /* min-width: 300px;
    max-width: 300px; */
}
