﻿/* Accordion */
.accordion-title {
    background-color: var(--ivory-color);
}

.accordion-content-container {
    max-height: 0;
    overflow: hidden;
    transition: max-height .8s cubic-bezier(0, 1, 0, 1) -.1s;
}

    .accordion-content-container.expanded {
        max-height: 9999px;
        transition-timing-function: cubic-bezier(0.5, 0, 1, 0);
        transition-delay: 0s;
    }

.accordion i {
    transition: 0.25s ease-in-out;
}

    .accordion i.expanded {
        transform: rotate(-180deg);
    }

/* Gauge */
@keyframes gaugeRotation {
    0% {
        transform: rotate(0);
    }

    100% {
        transform: rotate( calc((var(--metric) - var(--min)) / (var(--max) - var(--min)) * 180deg) );
    }
}

.gauge-wrapper {
    display: inline-block;
    width: auto;
    background: inherit;
}

.gauge {
    --gauge-height: calc(var(--gauge-width) / 2);
    width: var(--gauge-width);
    height: var(--gauge-height);
    border-radius: var(--gauge-height) var(--gauge-height) 0 0 !important;
    position: relative;
    overflow: hidden;
    background: inherit;
}

.gauge-slices {
    height: 100%;
}

    .gauge-slices .marker {
        position: absolute;
        top: 0;
        border-radius: var(--gauge-height) var(--gauge-height) 0 0 !important;
        width: var(--gauge-width);
        height: var(--gauge-height);
        box-sizing: border-box;
        transform-origin: calc(var(--gauge-width) / 2) var(--gauge-height);
        animation: 1.5s ease-in 0s 1 gaugeRotation;
        transform: rotate( calc(calc((var(--metric) - var(--min)) / (var(--max) - var(--min)) * 180deg - 0.1deg)) );
        background: var(--background-color);
    }

.gauge-center {
    width: 80%;
    height: 80%;
    background: inherit;
    border-radius: var(--gauge-height) var(--gauge-height) 0 0 !important;
    position: absolute;
    right: 9.5%;
    bottom: 0;
    background-color: white;
}

/* radio */
.radio input[type="radio"] {
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--darkish-inactive-color);
    box-shadow: inset 0 0 0 18px white, 0 0 0 3px var(--darkish-inactive-color);
    border-radius: 50%;
    transition: .2s;
    cursor: pointer;
}

    .radio input[type="radio"]:hover, .radio input[type="radio"]:checked {
        background: var(--ivory-color);
        box-shadow: inset 0 0 0 3.5px white, 0 0 0 4px var(--ivory-color);
    }

    .radio input[type="radio"]:checked {
        background: var(--primary-color);
        box-shadow: inset 0 0 0 3px white, 0 0 0 3px var(--primary-color);
    }

    .radio input[type="radio"]:focus {
        outline: 0;
    }


/* animated clear button */

.animated-clear-btn {
    position: relative;
}

    .animated-clear-btn:not(.transparent) {
        background-color: #FF5B5A;
    }

    .animated-clear-btn.transparent {
        background-color: white;
    }

        .animated-clear-btn.transparent .line:nth-of-type(1) {
            scale: 0.6;
            transform: rotate(135deg);
        }

        .animated-clear-btn.transparent .line:nth-of-type(2) {
            scale: 0.6;
            transform: rotate(-135deg);
        }

        .animated-clear-btn.transparent:hover .line:nth-of-type(1) {
            scale: 0.7;
        }

        .animated-clear-btn.transparent:hover .line:nth-of-type(2) {
            scale: 0.7;
        }

    .animated-clear-btn:not(.transparent):hover .line:nth-of-type(1) {
        transform: rotate(135deg);
    }

    .animated-clear-btn:not(.transparent):hover .line:nth-of-type(2) {
        transform: rotate(-135deg);
    }

    .animated-clear-btn.transparent .line {
        transition: scale .1s ease-in-out;
    }

    .animated-clear-btn.transparent:hover .line {
        background-color: black;
    }

    .animated-clear-btn:not(.transparent) .line {
        transition: transform .4s ease-in-out;
    }

    .animated-clear-btn .line {
        height: 2px;
        position: absolute;
        width: 60%;
        top: calc(50% - 1px);
        left: 20%;
        margin: auto;
        background-color: white;
    }

    .animated-clear-btn.transparent .line {
        background-color: var(--grey-color);
    }

    .animated-clear-btn:not(.transparent) .line {
        background-color: white;
    }

.animated-clear-labeled-btn {
    display: flex;
    flex-direction: row;
    column-gap: 12px;
    align-items: center;
    border-radius: 16px;
    background-color: var(--inactive-color);
    padding: 6px 16px 6px 16px !important;
}

.animated-clear-btn {
    font-size: 18px;
    border-radius: 50%;
    height: 20px;
    width: 20px;
    padding: 4px;
}

/* side modal */
.side-modal {
    position: fixed;
    z-index: 10;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    transition: all 400ms ease-in-out;
    background-color: rgba(0,0,0,0.01);
}

    .side-modal:not(.visible) {
        visibility: hidden;
    }

    .side-modal.visible {
        visibility: visible;
        background-color: rgba(0,0,0,0.15);
    }

.side-modal-content {
    background-color: white;
    position: fixed;
    overflow: auto;
    top: 0;
    bottom: 0;
    transition: all 400ms ease-in-out;
}

.side-modal.visible .side-modal-content.right {
    right: 0 !important;
}

.side-modal.visible .side-modal-content.left {
    left: 0 !important;
}

/* placeholder */
.placeholder-item {
    height: 10px;
    border-radius: 5px;
}

/* button group */
:root {
    --button-group-height: 36px;
    --button-group-padding: 4px;
}

.button-group {
    height: var(--button-group-height) !important;
    border-radius: calc(var(--button-group-height) / 2);
    padding: var(--button-group-padding);
}

.grouped-button.selected {
    background-color: var(--selected-background-color);
}

.grouped-button {
    border-radius: calc(calc(var(--button-group-height) - var(--button-group-padding)) / 2);
    transition: all 300ms ease-in-out;
}

/* donut */
.donut-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.donut {
    height: auto;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.donut-outer {
    border-radius: 50%;
}

.donut-overlay {
    opacity: 1;
    position: absolute;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.donut-text {
    text-align: center;
}

.donut-legend {
    display: flex;
    justify-content: center;
    margin-top: 1em;
    flex-wrap: wrap;
}

.donut-legend-item {
    display: inline-flex;
    align-items: center;
    margin: 0.5em;
}

.donut-legend-item-color {
    height: 12px;
    width: 12px;
    min-height: 12px;
    min-width: 12px;
    border-radius: 12px;
    margin-right: 0.5em;
}

.donut-sections {
    position: absolute;
    height: auto;
    width: 100%;
    padding-bottom: 100%;
    border-radius: 50%;
}

.donut-section {
    position: absolute;
    height: 100%;
    width: 50%;
    overflow: hidden;
    background-color: transparent;
    transform-origin: 0% 50%;
    pointer-events: none;
}

.donut-filler {
    position: absolute;
    height: 100%;
    width: 100%;
    pointer-events: all;
}

.donut-section.donut-section-right {
    left: 50%;
}

    .donut-section.donut-section-right .donut-filler {
        transform-origin: 0% 50%;
    }

.donut-section.donut-section-left {
    left: 0%;
    transform-origin: 100% 50%;
}

    .donut-section.donut-section-left .donut-filler {
        transform-origin: 100% 50%;
    }

/* donut */

/* treemap */
.treemap {
    position: relative;
    width: 100%;
}

.treemap-node-container {
    position: absolute;
    box-sizing: border-box;
    padding: 6px;
    transition: all 0.4s ease-in-out;
}

.treemap-node {
    overflow: hidden;
    text-align: center;
    white-space: -moz-pre-wrap;
}

/* treemap */
