/* Flex column filling the viewport so charts always fit without scrolling */
#app-layout:has(.plot-page) {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    min-width: 230px;
}

#app-layout:has(.plot-page) #pages-wrapper {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

/* page_container's outer div */
#app-layout:has(.plot-page) #pages-wrapper > div {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

/* Dash page content slot */
#app-layout:has(.plot-page) #_pages_content {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* Allow the Plotly pathbar / chart edges to render without being clipped at the SVG boundary */
#treemap-graph .js-plotly-plot .main-svg,
#timeseries-graph .js-plotly-plot .main-svg {
    overflow: visible;
}

#timeseries-title {
    padding: 6px 40px 2px 40px;
    text-align: center;
    font-size: 17px;
    font-weight: 400;
    color: #444444;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#timeseries-title:empty {
    display: none;
}

@media (max-width: 640px) {
    #timeseries-title {
        white-space: normal;
        word-break: break-word;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2; /* number of lines to show */
                line-clamp: 2;
        -webkit-box-orient: vertical;
    }
}
