.mwa-wrap {
    max-width: 820px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.mwa-course-block {
    margin-bottom: 20px;
    border: 1px solid #edeef0;
    border-radius: 10px;
    padding: 4px 20px 20px;
}

.mwa-course-title {
    margin: 0;
    padding: 16px 0;
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    cursor: pointer;
    list-style: none;
}

.mwa-course-title::-webkit-details-marker {
    display: none;
}

.mwa-course-title::before {
    content: "▸";
    display: inline-block;
    margin-right: 8px;
    transition: transform 0.2s ease;
    color: #999;
}

.mwa-course-block[open] > .mwa-course-title::before {
    transform: rotate(90deg);
}

.mwa-course-body {
    padding-top: 8px;
}

.mwa-chart-wrap {
    margin-bottom: 26px;
    background: #fafbfc;
    border: 1px solid #eef0f2;
    border-radius: 10px;
    padding: 16px;
}

/*
 * Sidebar tab icon — added via CSS rather than relying on LearnPress's
 * internal tab-icon rendering (which varies by theme/version), so this
 * works regardless of how the profile menu is built. Matches the same
 * dashicon font already used for the other tabs' icon slot.
 */
.lp-list-tabs a[href*="module-analysis"]::before,
.learn-press-tabs a[href*="module-analysis"]::before,
a[href*="module-analysis"] .lp-tab-icon::before {
    font-family: dashicons;
    content: "\f185"; /* dashicons-chart-bar */
    margin-right: 8px;
    font-size: 18px;
    line-height: 1;
    vertical-align: -3px;
}

/* ── Summary ── */
.mwa-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 26px;
}

.mwa-summary-item {
    flex: 1 1 170px;
    background: #fafbfc;
    border: 1px solid #eef0f2;
    border-radius: 10px;
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mwa-summary-label {
    font-size: 11px;
    color: #8a8f98;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}

.mwa-summary-value {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a1a;
}

.mwa-summary-weak-list {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

.mwa-summary-weak {
    background: #fff5f4;
    border-color: #ffd9d5;
}

.mwa-summary-weak .mwa-summary-value {
    color: #c0392b;
}

/* ── Module list ── */
.mwa-module-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mwa-module-row {
    background: #fff;
    border: 1px solid #edeef0;
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.mwa-module-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.mwa-module-name {
    font-weight: 600;
    font-size: 15px;
    color: #1a1a1a;
}

.mwa-module-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.mwa-strong .mwa-module-badge   { background: #27ae60; }
.mwa-average .mwa-module-badge { background: #e67e22; }
.mwa-weak .mwa-module-badge     { background: #e74c3c; }
.mwa-attempted .mwa-module-badge,
.mwa-none .mwa-module-badge     { background: #b0b6bd; }

.mwa-bar-track {
    background: #f0f1f3;
    border-radius: 8px;
    height: 8px;
    overflow: hidden;
    margin-bottom: 10px;
}

.mwa-bar-fill {
    height: 100%;
    border-radius: 8px;
    background: #b0b6bd;
    transition: width 0.6s ease;
}

.mwa-strong .mwa-bar-fill   { background: #27ae60; }
.mwa-average .mwa-bar-fill { background: #e67e22; }
.mwa-weak .mwa-bar-fill     { background: #e74c3c; }

.mwa-module-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    font-size: 13px;
    color: #6b7178;
}

.mwa-module-meta span {
    display: inline-flex;
    align-items: center;
}

/* ── Error box ── */
.mwa-error {
    background: #fee;
    border: 1px solid #c00;
    padding: 15px;
    color: #900;
    border-radius: 6px;
    margin-bottom: 16px;
}

.mwa-summary-weak-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.mwa-weak-details {
    display: inline-block;
    position: relative;
}

.mwa-more-toggle {
    display: inline;
    cursor: pointer;
    color: #c0392b;
    font-weight: 700;
    list-style: none;
    text-decoration: underline;
    margin-left: 4px;
}

.mwa-more-toggle::-webkit-details-marker {
    display: none;
}

.mwa-weak-details[open] .mwa-more-toggle {
    text-decoration: none;
}

.mwa-hidden-weak-names {
    display: inline;
    font-weight: 600;
}
/* Jokhoni details tag open hobe, tokhon +more button-ti hide hoye jabe */
.mwa-weak-details[open] .mwa-more-toggle {
    display: none;
}

/* Weak module improvement tip styling */
.mwa-weak-tip {
    margin-top: 12px;
    padding: 8px 12px;
    background-color: #fff5f4;
    border: 1px dashed #ffd9d5;
    border-radius: 6px;
    font-size: 13px;
    color: #c0392b;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mwa-weak-tip .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: #c0392b;
}

.mwa-module-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #555;
}

.mwa-module-meta span strong {
    color: #333;
    font-weight: 600;
}

