/* =====================================================
   Magnetic Moments – MRI Fundraising Widget Styles
   File: wwwroot/css/donut-chart.css
   ===================================================== */

/* ---------- Widget wrapper ---------- */
.mm-widget {
    padding: 20px 40px 48px;
    font-family: var(--font-primary);
}

    /* ---------- Title ---------- */
    .mm-widget h2 {
        color: #1a3a5c;
        font-size: 36px;
        font-weight: var(--font-bold);
        text-align: center;
        margin: 0 0 40px 0;
    }

/* ---------- Two-column grid ---------- */
.mm-grid {
    display: flex;
    gap: 40px;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
    --mm-chart-size: 420px;
}

/* Chart column */
.mm-chart {
    flex: 0 1 var(--mm-chart-size);
    min-width: 260px;
    background: #ffffff;
    border-radius: 16px;
    padding: 36px 32px 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: var(--shadow-primary);
}

/* Responsive square wrapper – Chart.js sizes to this */
.mm-chart-wrap {
    position: relative;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    aspect-ratio: 1 / 1;
}

    .mm-chart-wrap canvas {
        width: 100% !important;
        height: 100% !important;
        display: block;
    }

/* ---------- Legend ---------- */
.mm-legend {
    margin-top: 28px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 24px;
    width: 100%;
}

.mm-legend-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mm-swatch {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    display: inline-block;
    flex-shrink: 0;
}

.mm-legend-text {
    font-size: 13px;
    color: #444444;
}

/* ---------- Metrics column ---------- */
.mm-metrics {
    flex: 1 1 360px;
    min-width: 260px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Shared card base */
.mm-goal,
.mm-raised,
.mm-mini > div {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px 28px;
    box-shadow: var(--shadow-primary);
}

/* Goal card – blue left border */
.mm-goal {
    border-left: 5px solid #1a3a5c;
}

/* Raised card – red left border */
.mm-raised {
    border-left: 5px solid #c0392b;
}

/* ---------- Metric numbers ---------- */
.mm-goal-number {
    font-size: 48px;
    font-weight: var(--font-bold);
    color: #1a3a5c;
    line-height: normal;
    margin-bottom: 6px;
}

.mm-raised-number {
    font-size: 48px;
    font-weight: var(--font-bold);
    color: #c0392b;
    line-height: normal;
    margin-bottom: 6px;
}

.mm-goal-label,
.mm-raised-label {
    font-size: 14px;
    color: #666666;
}

/* ---------- Mini stats row (donors + launch year) ---------- */
.mm-mini {
    display: flex;
    gap: 16px;
}

    .mm-mini > div {
        flex: 1;
        text-align: center;
        padding: 20px 16px;
    }

.mm-donors-number,
.mm-launch-year {
    font-size: 28px;
    font-weight: 800;
    color: #1a3a5c;
    line-height: 1.1;
    margin-bottom: 6px;
}

.mm-donors-label,
.mm-launch-label {
    font-size: 14px;
    color: #666666;
}

/* ---------- Responsive ---------- */
@media (max-width: 990px) {
    .mm-widget {
        padding: 32px 0;
    }

    .mm-grid {
        flex-direction: column;
        align-items: stretch;
    }

    .mm-chart {
        width: 100%;
    }

    .mm-chart-wrap {
        max-width: 320px;
    }

    .mm-goal-number,
    .mm-raised-number {
        font-size: 34px;
    }
}
