/* Institution Completion Pie Chart Styles */

.im-institution-completion-wrap {
    padding: 40px 20px;
    background: #f5f5f5;
}

.im-completion-pie-section {
    max-width: 1400px;
    margin: 0 auto;
}

/* Top Controls */
.im-completion-controls {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
    align-items: center;
    flex-wrap: wrap;
}

.im-control-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.im-control-group label {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    white-space: nowrap;
}

.im-school-select,
.im-degree-select {
    appearance: none;
    background: url("data:image/svg+xml,%3Csvg width='18' height='10' viewBox='0 0 18 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9.01015 10C8.79514 10 8.59358 9.96801 8.40545 9.90402C8.21732 9.84104 8.04263 9.73337 7.88138 9.58102L0.423429 2.53447C0.127799 2.25515 -0.013029 1.90574 0.00094624 1.48625C0.0138465 1.06778 0.168111 0.718877 0.463742 0.439555C0.759372 0.160232 1.13563 0.0205702 1.59251 0.0205702C2.0494 0.0205702 2.42565 0.160232 2.72128 0.439555L9.01015 6.3815L15.3393 0.401465C15.635 0.122142 16.0048 -0.0114242 16.4487 0.000764447C16.8917 0.0139688 17.2609 0.160232 17.5566 0.439555C17.8522 0.718877 18 1.07438 18 1.50606C18 1.93774 17.8522 2.29324 17.5566 2.57256L10.1389 9.58102C9.97767 9.73337 9.80297 9.84104 9.61485 9.90402C9.42672 9.96801 9.22515 10 9.01015 10Z' fill='%23B2B2B2'/%3E%3C/svg%3E")
    no-repeat right 0.35em top 0.6em;
    background-color: transparent;
    padding: 0 !important;
    width: 9em;
    color: #000000;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    border: 0;
    height: auto;
    cursor: pointer;
}

.im-school-select:focus,
.im-degree-select:focus {
    outline: none;
    color: #4a90e2;
}

/* Wrapper for two-column layout */
.im-charts-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.im-chart-column {
    display: flex;
    flex-direction: column;
}

/* Chart Area */
.im-completion-chart {
    flex: 1;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

/* Chart Legend */
.im-completion-chart-legend {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    width: 100%;
    max-height: none;
    overflow: visible;
    padding-right: 0;
    margin-bottom: 15px;
}

.im-chart-legend-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #666;
    padding: 8px 0;
    transition: all 0.2s ease;    white-space: nowrap;}

.im-chart-legend-item:hover {
    color: #1a1a1a;
    transform: translateX(4px);
}

.im-chart-legend-color {
    width: 16px;
    height: 16px;
    border-radius: 2px;
    flex-shrink: 0;
    display: block;
}

.im-chart-legend-text {
    flex: 0;
}

/* Column Labels */
.im-chart-column-label {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    padding-top: 20px;
    border-top: 2px solid #ddd;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 1400px) {
    .im-charts-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 1024px) {
    .im-completion-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .im-completion-chart {
        min-height: 350px;
    }
}

@media (max-width: 768px) {
    .im-completion-pie-section {
        padding: 0 15px;
    }

    .im-charts-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .im-completion-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        margin-bottom: 30px;
    }

    .im-control-group {
        flex-direction: column;
        gap: 8px;
    }

    .im-control-group label {
        font-size: 12px;
    }

    .im-completion-chart-legend {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .im-chart-legend-item {
        white-space: normal;
    }

    .im-completion-chart {
        min-height: 300px;
    }

    .im-chart-column-label {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .im-completion-pie-section {
        padding: 0 10px;
    }

    .im-completion-controls {
        gap: 10px;
    }

    .im-completion-chart-legend {
        grid-template-columns: 1fr;
    }

    .im-chart-legend-item {
        font-size: 12px;
    }

    .im-completion-chart {
        min-height: 250px;
    }

    .im-chart-column-label {
        font-size: 14px;
    }

    .im-school-select,
    .im-degree-select {
        width: 100%;
    }
}

/* ApexCharts Override */
.apexcharts-canvas {
    margin: 0 auto;
}

.apexcharts-tooltip {
    background: rgba(26, 26, 26, 0.95) !important;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.apexcharts-tooltip-custom {
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 4px;
}

