.physical-profile-paper {
    border: 0 !important;
    background: transparent !important;
}

.physical-profile-eyebrow,
.physical-profile-mode-label,
.physical-profile-ranking__hint {
    color: var(--mud-palette-text-secondary) !important;
}

.physical-profile-player-name {
    color: var(--mud-palette-text-primary);
}

.physical-profile-player-summary {
    text-align: right;
    white-space: nowrap;
}

.physical-profile-export {
    color: var(--mud-palette-text-primary);
    min-width: 0;
}

.physical-profile-export__header {
    min-height: 42px;
    padding: 6px 0 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--mud-palette-divider);
}

.physical-profile-export__actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.physical-profile-section-title {
    display: flex;
    align-items: center;
    color: var(--mud-palette-text-primary) !important;
}

.physical-profile-overview {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(270px, 0.95fr);
    gap: 24px;
    align-items: center;
    padding: 14px 0 0;
    min-width: 0;
}

.physical-profile-chart {
    width: 100%;
    min-width: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: visible;
    padding: 1.5em 0;
}

.physical-profile-chart .mud-chart {
    width: 100%;
    max-width: 320px;
    min-width: 0;
}

.physical-profile-chart svg {
    display: block;
    width: 100%;
    max-width: 320px;
    height: auto;
    /* de labels van twee regels bovenaan en onderaan mogen buiten het diagram vallen, niet afgeknipt */
    overflow: visible;
}

.physical-profile-ranking {
    width: 100%;
    min-width: 0;
}

.physical-profile-ranking__header {
    min-height: 40px;
    padding: 7px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    border-bottom: 1px solid var(--mud-palette-divider);
}

.physical-profile-ranking__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(42px, 0.42fr) 48px;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 6px 0;
    border-bottom: 1px solid var(--mud-palette-divider);
}

.physical-profile-ranking__row:last-child {
    border-bottom: 0;
}

.physical-profile-ranking__label {
    min-width: 0;
    line-height: 1.25rem;
}

.physical-profile-ranking__bar {
    height: 5px;
    background: var(--mud-palette-background-grey);
}

.physical-profile-ranking__bar > span {
    display: block;
    height: 100%;
}

.physical-profile-ranking__score {
    text-align: right;
    color: #555 !important;
    white-space: nowrap;
}

.physical-profile-ranking__score.is-high {
    color: var(--mud-palette-primary) !important;
    font-weight: 700;
}

.physical-profile-ranking__zscore {
    grid-column: 2 / 4;
    text-align: right;
    color: var(--mud-palette-primary) !important;
    font-weight: 600;
}

/* Buitenste container */
.physical-evolution-chart {
    position: relative;
    width: 100%;
    max-width: none;
    min-width: 0;
    margin: 24px 0;
    box-sizing: border-box;

    color: var(--mud-palette-text-primary);
    background-color: var(--mud-palette-surface);
    font-family: var(--mud-typography-default-family);
}

/* Losse titel: niet meer in het interne assenstelsel */
.physical-evolution-chart .physical-evolution-chart__title {
    display: block;
    margin: 0 0 24px;
    color: var(--mud-palette-text-primary);
}

/* Hoofdcontainer van IzzyBlazor */
.physical-evolution-chart .ib-chart {
    width: 100%;
    min-width: 0;
    margin: 0;
}

.physical-evolution-chart ib-chart {
    display: block;
    width: 100%;
    min-width: 0;
}

/*
 * Iets lager tekengebied.
 * De data blijft dezelfde verhouding tot de y-as houden.
 */
.physical-evolution-chart .ib-chart-plot {
    position: relative;
    min-width: 0;
    height: 360px;
    padding-bottom: 16px;
    box-sizing: border-box;
}

/*
 * Tekenlaag vastzetten binnen het plotgebied.
 * Absolute positionering voorkomt extra ruimte onderaan
 * doordat een SVG als een normaal inline-element meedoet.
 */
.physical-evolution-chart .ib-chart-plot > svg.ib-chart-svg {
    position: absolute;
    inset: 0;
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    overflow: hidden;
}

/* Geneste tekenlagen vullen exact dezelfde ruimte */
.physical-evolution-chart .ib-chart-svg > svg.ib-chart-paths {
    x: 0;
    y: 0;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    overflow: hidden;
}

/* Extra afstand tussen tekengebied en categorielabels */
.physical-evolution-chart .ib-chart-bottom {
    margin-top: 14px;
}

/* Alleen de achtergrond-rasterlijnen verwijderen */
.physical-evolution-chart .ib-chart-grid {
    display: none !important;
}

/* Show data en de bijbehorende uitklapbare tabel verbergen */
.physical-evolution-chart .ib-chart-data {
    display: none !important;
}

/* Asopmaak */
.physical-evolution-chart .ib-chart-label,
.physical-evolution-chart .ib-chart-title {
    color: var(--mud-palette-text-primary) !important;
}

.physical-evolution-chart .ib-chart-ticks {
    color: var(--mud-palette-text-secondary) !important;
}

/* Boxplot kleuren: de n-de box krijgt de kleur van de n-de zichtbare categorie (PhysicalCategory in C#) */
.physical-evolution-chart .ib-chart-box > g:nth-of-type(1) {
    color: var(--physical-color-1, #0050A0);
}

.physical-evolution-chart .ib-chart-box > g:nth-of-type(2) {
    color: var(--physical-color-2, #F59E0B);
}

.physical-evolution-chart .ib-chart-box > g:nth-of-type(3) {
    color: var(--physical-color-3, #2E9E6B);
}

/* Kleur van de binnenste box */
.physical-evolution-chart .ib-chart-box > g > rect {
    fill: currentColor !important;
    stroke: currentColor !important;
    fill-opacity: 0.75;
}

/* Kleur van de whiskers */
.physical-evolution-chart .ib-chart-box > g > line {
    stroke: currentColor !important;
}

/* Mediaan duidelijk leesbaar houden */
.physical-evolution-chart .ib-chart-box > g > .ib-chart-median {
    stroke: var(--mud-palette-text-primary) !important;
}

/* De ingebouwde charttitel boven de grafiek centreren */
.physical-evolution-chart figure.ib-chart > figcaption.ib-chart-label {
    position: static !important;
    inset: auto !important;
    transform: none !important;

    display: block !important;
    width: 100%;
    box-sizing: border-box;

    margin: 0 0 24px !important;
    padding: 0 !important;

    text-align: center !important;
    align-self: center;
    justify-self: stretch;

    color: var(--mud-palette-text-primary) !important;
    font-family: var(--mud-typography-default-family);
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.5;
}
/* Alle violin plots: grijze achtergrondvulling, de boxplot erin draagt de kleur */
.physical-evolution-chart path.ib-chart-violin {
    fill: #9E9E9E !important;
    stroke: #757575 !important;
    fill-opacity: 0.24 !important;
    stroke-opacity: 1 !important;
    stroke-width: 2px;
    vector-effect: non-scaling-stroke;
}

/* Ook de boxplot (box, mediaan en whiskers) mee verplaatsen */
.physical-evolution-chart .ib-chart-box {
    transform: translateY(0px);
}

.physical-evolution-match-table tr.physical-match-selected > td {
    background-color: rgba(25, 118, 210, 0.14) !important;
    font-weight: 600;
}

.physical-evolution-match-table tbody tr {
    cursor: pointer;
}
.physical-evolution-match-table {
    width: 100%;
    min-width: 0;
}

.physical-evolution-match-table .mud-table-container {
    width: 100%;
    overflow-x: auto;
}

.physical-evolution-chart .physical-metric-switch .mud-switch-thumb {
    background-color: var(--switch-color) !important;
}

.physical-evolution-chart .physical-metric-switch .mud-switch-track {
    background-color: color-mix(in srgb, var(--switch-color) 45%, transparent) !important;
}

.physical-evolution-chart {
    position: relative;
}

.violin-scatter-layer {
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 0;
    pointer-events: none;
    z-index: 2;
}

.violin-scatter-point {
    position: absolute;
    width: 12px;
    height: 12px;
    margin: -6px 0 0 -6px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: var(--point-color);
    cursor: pointer;
    pointer-events: auto;
    padding: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
    transition:
            transform 0.12s ease,
            box-shadow 0.12s ease;
}

.violin-scatter-point::after {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 50%;
}

.violin-scatter-point:hover,
.violin-scatter-point:focus-visible {
    transform: scale(1.25);
}

.violin-scatter-point.is-selected {
    transform: scale(1.2);
    box-shadow:
            0 0 0 3px #ffffff,
            0 0 0 6px var(--point-color);
}

.violin-scatter-tooltip {
    position: absolute;
    transform: translate(-50%, calc(-100% - 14px));
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.88);
    color: #fff;
    font-size: 12px;
    line-height: 1.25;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.12s ease;
    z-index: 3;
}

.violin-scatter-tooltip.is-visible {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 600px) {
    .physical-evolution-chart .ib-chart-plot {
        height: 280px;
    }
}
@media (max-width: 850px) {
    .physical-profile-overview {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

}

@media (max-width: 520px) {
    .physical-profile-export__header,
    .physical-profile-export__actions {
        align-items: flex-start;
    }

    .physical-profile-export__header {
        flex-direction: column;
    }

    .physical-profile-export__actions {
        width: 100%;
        justify-content: space-between;
    }

    .physical-profile-ranking__row {
        grid-template-columns: minmax(0, 1fr) minmax(36px, 0.35fr) 44px;
        gap: 6px;
    }

    .physical-profile-player-summary {
        white-space: normal;
    }
}
