/* Wrapper to allow scrolling and container alignment */
.chart-wrapper {
    overflow-x: auto;
    border-left: 0.4vw solid #333;
    border-bottom: 0.4vw solid #333;
    height: 70vh;
    position: relative;
    align-self: anchor-center;

    scrollbar-width: none;
    -ms-overflow-style: none;
}

.chart-wrapper::-webkit-scrollbar {
    display: none;
}

/* Flex container for bars */
.chart-wrapper .chart-container {
    display: flex;
    align-items: flex-end;
    /* Bars grow from bottom */
    justify-content: flex-start;
    height: 100%;
    /* Expand width for scrolling */
    position: relative;
}

/* Container for both bar and label */
.chart-wrapper .bar-label-container {
    display: flex;
    flex-direction: column-reverse;
    /* Reverse the order */
    align-items: center;
    height: inherit;
    /* Inherit container height */
    min-width: 4vw;
    /* Minimum width using vw */
    margin: 0 1vw;
    /* Margin between bar-label pairs */
}

/* Bars */
.chart-wrapper .bar {
    width: 100%;
    background-color: #ddd;
    display: flex;
    justify-content: center;
    transition: background-image 0.3s ease;
    height: 0;
    /* Ensure bars start from 0 */
}

/* Labels for X-axis (Date) */
.chart-wrapper .label {
    text-align: center;
    white-space: nowrap;
    font-size: 1vw;
}

.chart-wrapper .label span {
    display: block;
    /* Ensure each part is on a new line */
}

/* Runtime label */
.chart-wrapper .runtime {
    font-size: 0.9vw;
    /* Smaller font for runtime */
    font-weight: bold;
    margin-bottom: 0.5vh;
}

/* Hover effect for bar + labels */
.chart-wrapper .bar-label-container:hover .bar {
    filter: brightness(1.3);
    /* Highlight bar */
}

.bar-label-container:hover .runtime,
.chart-wrapper .bar-label-container:hover .label {
    color: red;
    /* Highlight runtime and date */
}

/* Y-axis label positioning */
.y-axis-label {
    transform: rotate(-180deg);
    font-weight: bold;
    font-size: 1.5vw;
    text-align: center;
    position: relative;
    writing-mode: vertical-rl;
}

/* Bar colors */
.chart-wrapper .passed {
    background-color: #a8e6a1;
}

.chart-wrapper .failed {
    background-color: #f6a1a1;
}

.chart-wrapper .broken {
    background-color: #f3e99f;
}

.chart-wrapper .skipped {
    background-color: #cccccc;
}

/* Hover effects */
.chart-wrapper .bar:hover {
    opacity: 0.9;
}

.chart-info:empty {
    display: none;
}

.chart-info {
    background: #ababab26;
    border: 1px solid #abababc2;
    border-radius: 30px;
    margin: 0.5em;
    display: grid;
    grid-template-columns: auto 1fr;
}