@layer components {
    .dashboard-performance {
            background: var(--dashboard-color-surface);
            color: var(--dashboard-color-text);
        }

    .dashboard-performance__header {
            align-items: flex-start;
            border-bottom: 1px solid var(--dashboard-color-border);
            display: flex;
            flex-direction: column;
            gap: 1rem;
            justify-content: space-between;
            padding: var(--dashboard-section-header-padding-y) var(--dashboard-section-padding-x);
        }

    .dashboard-performance__period-tab {
            flex-shrink: 0;
        }

    .dashboard-performance__show-more {
            align-items: center;
            background: transparent;
            border: 0;
            border-radius: var(--dashboard-radius-pill);
            color: var(--dashboard-color-text);
            cursor: pointer;
            display: inline-flex;
            flex-shrink: 0;
            font-size: 0.875rem;
            font-weight: 650;
            gap: 0.375rem;
            line-height: 1.25rem;
            padding: 0.625rem 0.875rem;
            white-space: nowrap;
        }

    .dashboard-performance__show-more:hover {
            background: var(--dashboard-color-pill);
        }

    .dashboard-performance__show-more i,
        .dashboard-performance__show-more svg {
            height: 1rem;
            width: 1rem;
        }

    .dashboard-performance--expanded .dashboard-performance__show-more {
            display: inline-flex;
        }

    .dashboard-performance--expanded .dashboard-performance__show-more i,
        .dashboard-performance--expanded .dashboard-performance__show-more svg {
            transform: rotate(180deg);
        }

    .dashboard-performance__body {
            padding: var(--dashboard-section-padding-y-lg) var(--dashboard-section-padding-x);
        }

    .dashboard-performance__footer {
            align-items: center;
            display: flex;
            justify-content: center;
            padding: 0 var(--dashboard-section-padding-x) var(--dashboard-section-padding-y-lg);
        }

    .dashboard-performance__footer[hidden] {
            display: none;
        }

    .dashboard-performance__bar-panel[hidden],
        .dashboard-performance__heatmap-panel[hidden] {
            display: none;
        }

    .dashboard-performance__chart-wrap {
            height: clamp(18rem, 48vw, 25rem);
            position: relative;
            width: 100%;
        }

    .dashboard-performance__heatmap-scroll {
            container-type: inline-size;
            -webkit-overflow-scrolling: touch;
            overflow-x: auto;
            padding-bottom: 0.25rem;
        }

    @media (min-width: 48rem) {
        .dashboard-performance__heatmap-scroll {
                    overflow-x: visible;
                }
    }

    .dashboard-performance__heatmap {
            --dashboard-performance-heatmap-column-count: 12;
            --dashboard-performance-heatmap-label-width: 2.75rem;
            --dashboard-performance-heatmap-spacing: clamp(0.25rem, 0.35rem + 0.25cqw, 0.5rem);
            align-items: center;
            display: grid;
            gap: var(--dashboard-performance-heatmap-spacing);
            grid-template-columns: minmax(var(--dashboard-performance-heatmap-label-width), auto) repeat(var(--dashboard-performance-heatmap-column-count), minmax(0, 1fr));
            width: 100%;
        }

    @media (max-width: 47.99rem) {
        .dashboard-performance__heatmap:not(.dashboard-performance__heatmap--entity-rows):not(.dashboard-performance__heatmap--logo-rows) {
                    --dashboard-performance-heatmap-spacing: 0.5rem;
                    grid-template-columns: minmax(3.5rem, auto) repeat(12, minmax(4.75rem, 1fr));
                    min-width: 52rem;
                    width: max-content;
                }
    }

    .dashboard-performance__heatmap--entity-rows,
        .dashboard-performance__heatmap--logo-rows {
            grid-template-columns: minmax(var(--dashboard-performance-heatmap-label-width), auto) repeat(var(--dashboard-performance-heatmap-column-count), minmax(0, 1fr));
        }

    @media (max-width: 47.99rem) {
        .dashboard-performance__heatmap--entity-rows,
                .dashboard-performance__heatmap--logo-rows {
                    grid-template-columns: minmax(var(--dashboard-performance-heatmap-label-width), auto) repeat(var(--dashboard-performance-heatmap-column-count), minmax(3.5rem, 1fr));
                    min-width: calc(var(--dashboard-performance-heatmap-label-width) + var(--dashboard-performance-heatmap-column-count) * 3.5rem);
                    width: max-content;
                }
    }

    .dashboard-performance__heatmap-label,
        .dashboard-performance__heatmap-month {
            color: var(--dashboard-color-text-muted);
            font-size: clamp(0.625rem, 0.55rem + 0.25cqw, 0.8125rem);
            font-weight: 600;
            line-height: 1.25;
        }

    .dashboard-performance__heatmap-label:not(.dashboard-performance__heatmap-label--entity):not(.dashboard-performance__heatmap-label--logo) {
            padding-inline-end: 0.125rem;
            text-align: end;
        }

    .dashboard-performance__heatmap-label--entity {
            max-width: 10rem;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

    .dashboard-performance__heatmap-label--logo {
            align-items: center;
            display: flex;
            justify-content: center;
            max-width: none;
            overflow: visible;
            padding: 0.125rem 0;
        }

    .dashboard-performance__heatmap--logo-rows {
            --dashboard-performance-heatmap-spacing: 0.375rem;
        }

    .dashboard-performance__heatmap--logo-rows .dashboard-performance__heatmap-cell {
            min-height: 2.75rem;
        }

    .dashboard-performance__heatmap--logo-rows .dashboard-performance__heatmap-value {
            font-size: clamp(0.5rem, 0.35rem + 0.35cqw, 0.6875rem);
        }

    @media (min-width: 48rem) {
        .dashboard-performance__heatmap--logo-rows {
                    --dashboard-performance-heatmap-spacing: 0.25rem;
                }

        .dashboard-performance__heatmap--logo-rows .dashboard-performance__heatmap-cell {
                    min-height: 2.5rem;
                    min-width: 0;
                }
    }

    .dashboard-performance__heatmap-month {
            text-align: center;
        }

    .dashboard-performance__heatmap-cell {
            --dashboard-performance-cell-bg: var(--dashboard-color-pill);
            --dashboard-performance-cell-text: var(--dashboard-color-text);
            align-items: center;
            background: var(--dashboard-performance-cell-bg);
            border: 0;
            border-radius: clamp(0.375rem, 0.25rem + 0.25cqw, 0.5rem);
            color: var(--dashboard-performance-cell-text);
            cursor: default;
            display: flex;
            flex-direction: column;
            gap: 0.125rem;
            justify-content: center;
            min-height: clamp(2.25rem, 1.75rem + 1.5cqw, 3.5rem);
            min-width: 0;
            padding: var(--dashboard-performance-heatmap-spacing);
            text-align: center;
            width: 100%;
        }

    .dashboard-performance__heatmap-cell:focus-visible {
            outline: 2px solid rgb(var(--dashboard-color-brand-rgb) / 0.35);
            outline-offset: 2px;
        }

    .dashboard-performance__heatmap-cell.is-empty {
            background: var(--dashboard-color-pill);
            color: var(--dashboard-color-text-subtle);
        }

    .dashboard-performance__heatmap-value {
            font-size: clamp(0.5rem, 0.35rem + 0.35cqw, 0.75rem);
            font-weight: 650;
            line-height: 1.2;
            max-width: 100%;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

    @media (min-width: 64rem) {
        .dashboard-performance__heatmap-value {
                    font-size: clamp(0.625rem, 0.55rem + 0.35cqw, 0.875rem);
                }

        .dashboard-performance__heatmap--logo-rows .dashboard-performance__heatmap-value {
                    font-size: 0.6875rem;
                }
    }

    .dashboard-performance__empty {
            color: var(--dashboard-color-text-muted);
            font-size: 0.9375rem;
            padding: 1.25rem var(--dashboard-section-padding-x);
        }

    @media (min-width: 48rem) {
        .dashboard-performance__header {
                    align-items: center;
                    flex-direction: row;
                }
    }

    @media (min-width: 48rem) {
        .dashboard-performance__header {
                    padding: var(--dashboard-section-header-padding-y-lg) var(--dashboard-section-padding-x-lg);
                }
    }

    @media (min-width: 48rem) {
        .dashboard-performance__body {
                    padding-left: var(--dashboard-section-padding-x-lg);
                    padding-right: var(--dashboard-section-padding-x-lg);
                }
    }

    @media (min-width: 48rem) {
        .dashboard-performance__footer {
                    padding-left: var(--dashboard-section-padding-x-lg);
                    padding-right: var(--dashboard-section-padding-x-lg);
                }
    }
}
