/* ================================
   Wrapper: chart on left, legends on right
=================================== */
.ownership-chart-wrapper {
    display: flex;
    align-items: flex-start;
    margin: 0 auto;
    gap: 30px; /* space between chart and legend */
}

/* Chart area */
.ownership-chart-inner {
    flex: 1; /* chart takes remaining space */
    height: 580px;
}

canvas.ownership-chart-canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

/* Legends container */
.ownership-legend {
    flex: 0 0 45%; /* fixed width for legend */
    display: flex;
    flex-direction: column; /* single column, one per row */
    gap: 15px; /* space between each legend item */
}

/* Legend item styling */
.ownership-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f5f5f5;
    padding: 12px 16px;
    border-radius: 12px;
    cursor: pointer;
    border: 2px solid transparent; /* default border */
    transition: all 0.25s ease;
}

.ownership-item img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: contain;
    border: 1px solid #ddd;
}

.ownership-info strong {
    display: block;
    font-size: 16px;
    color: #222;
}

.ownership-info span {
    font-size: 14px;
    color: #666;
}

/* Highlight active legend on slice hover */
.ownership-item.active {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
    background: #fff;
    /* border color will be set dynamically via JS to match slice color */
}

/* ================================
   Responsive
=================================== */
@media (max-width: 768px) {
    .ownership-chart-wrapper {
        flex-direction: column;
        align-items: center;
    }

    .ownership-legend {
        flex: 1;
        width: 100%;
    }
}
