/* ============================================================
   HELP Campus — Mock Exam Category Tracker CSS
   Mobile-first, matches existing gradebook design language
   ============================================================ */

/* ── Wrap ── */
.hmt-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 0 2rem;
    color: #1f2937;
}

/* ── Empty state ── */
.hmt-empty {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    color: #6b7280;
}

/* ── Summary Header ── */
.hmt-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.hmt-header-stat {
    flex: 1 1 120px;
    background: #1e3a5f;
    color: #fff;
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    min-width: 100px;
}
.hmt-header-num {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
}
.hmt-header-label {
    display: block;
    font-size: 0.75rem;
    opacity: 0.85;
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ── Section / Toggle ── */
.hmt-section {
    margin-bottom: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}
.hmt-toggle {
    width: 100%;
    background: #e5e7eb;
    color: #111827;
    border: none;
    padding: 0.85rem 1rem;
    text-align: left;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.hmt-toggle:hover { background: #d1d5db; }
.hmt-chevron { transition: transform 0.2s; }
.hmt-panel-closed .hmt-chevron,
.hmt-toggle[aria-expanded="false"] .hmt-chevron { transform: rotate(-90deg); }

.hmt-panel {
    padding: 1rem;
    background: #fff;
}
.hmt-panel-closed { display: none; }
.hmt-panel-desc {
    font-size: 0.85rem;
    color: #6b7280;
    margin: 0 0 1rem;
}

/* ── Category Card Grid ── */
.hmt-cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
}
.hmt-cat-card {
    border-radius: 8px;
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
}
.hmt-cat-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.25rem;
}
.hmt-cat-pct {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 0.4rem;
}
.hmt-cat-bar-wrap {
    background: #e5e7eb;
    border-radius: 4px;
    height: 6px;
    margin-bottom: 0.35rem;
    overflow: hidden;
}
.hmt-cat-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s ease;
}
.hmt-cat-detail {
    font-size: 0.72rem;
    color: #6b7280;
}

/* ── Color Classes ── */
.hmt-green .hmt-cat-pct,
.hmt-green { color: #065f46; }
.hmt-green .hmt-cat-bar { background: #10b981; }
.hmt-green.hmt-cat-card { border-color: #a7f3d0; background: #ecfdf5; }

.hmt-yellow .hmt-cat-pct,
.hmt-yellow { color: #92400e; }
.hmt-yellow .hmt-cat-bar { background: #f59e0b; }
.hmt-yellow.hmt-cat-card { border-color: #fde68a; background: #fffbeb; }

.hmt-red .hmt-cat-pct,
.hmt-red { color: #991b1b; }
.hmt-red .hmt-cat-bar { background: #ef4444; }
.hmt-red.hmt-cat-card { border-color: #fecaca; background: #fef2f2; }

/* ── Per-Exam Block ── */
.hmt-exam-block {
    border-bottom: 1px solid #f3f4f6;
    padding: 0.75rem 0;
}
.hmt-exam-block:last-child { border-bottom: none; }
.hmt-exam-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}
.hmt-exam-label {
    font-weight: 600;
    font-size: 0.9rem;
    min-width: 70px;
}
.hmt-exam-score {
    font-size: 1rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
}
.hmt-exam-score.hmt-green { background: #d1fae5; }
.hmt-exam-score.hmt-yellow { background: #fef3c7; }
.hmt-exam-score.hmt-red { background: #fee2e2; }

.hmt-exam-date {
    font-size: 0.78rem;
    color: #6b7280;
}
.hmt-exam-attempts {
    font-size: 0.72rem;
    background: #e5e7eb;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    color: #374151;
}
.hmt-exam-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.hmt-exam-cat-pill {
    font-size: 0.72rem;
    padding: 0.2rem 0.45rem;
    border-radius: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.hmt-exam-cat-pill.hmt-green { background: #d1fae5; color: #065f46; }
.hmt-exam-cat-pill.hmt-yellow { background: #fef3c7; color: #92400e; }
.hmt-exam-cat-pill.hmt-red { background: #fee2e2; color: #991b1b; }

/* ── Consolidated Report ── */
.hmt-report-section .hmt-toggle {
    background: #1e3a5f;
    color: #fff;
}
.hmt-report-section .hmt-toggle:hover { background: #162d4a; }

.hmt-report-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
@media (max-width: 480px) {
    .hmt-report-cols { grid-template-columns: 1fr; }
}
.hmt-report-col h4 {
    font-size: 0.85rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.hmt-strength-col h4 { color: #065f46; }
.hmt-weakness-col h4 { color: #991b1b; }

.hmt-report-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    margin-bottom: 0.35rem;
    font-size: 0.85rem;
}
.hmt-report-item.hmt-green { background: #d1fae5; color: #065f46; }
.hmt-report-item.hmt-red { background: #fee2e2; color: #991b1b; }

/* ── Trend Table ── */
.hmt-trend-wrap h4 {
    font-size: 0.85rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #374151;
}
.hmt-trend-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.hmt-trend-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
    min-width: 500px;
}
.hmt-trend-table th,
.hmt-trend-table td {
    padding: 0.35rem 0.5rem;
    border: 1px solid #e5e7eb;
    text-align: center;
    white-space: nowrap;
}
.hmt-trend-table th {
    background: #f3f4f6;
    font-weight: 600;
    color: #374151;
}
.hmt-trend-cat {
    text-align: left !important;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
}
.hmt-trend-table td.hmt-green { background: #d1fae5; color: #065f46; font-weight: 600; }
.hmt-trend-table td.hmt-yellow { background: #fef3c7; color: #92400e; font-weight: 600; }
.hmt-trend-table td.hmt-red { background: #fee2e2; color: #991b1b; font-weight: 600; }
.hmt-trend-table td.hmt-na { color: #9ca3af; }
.hmt-trend-avg { font-weight: 700 !important; }

/* ── Unlock Notice ── */
.hmt-unlock-notice {
    background: #f3f4f6;
    border: 1px dashed #d1d5db;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    text-align: center;
    color: #6b7280;
    font-size: 0.9rem;
    margin-top: 1rem;
}
.hmt-lock-icon {
    margin-right: 0.4rem;
    font-size: 1rem;
}

/* ── Notice ── */
.hmt-notice {
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    color: #92400e;
    font-size: 0.9rem;
}

/* ── Admin ── */
.hmt-admin-wrap { max-width: 1100px; }
.hmt-admin-desc { color: #6b7280; font-size: 0.9rem; margin-bottom: 1.5rem; }
.hmt-admin-table { border-collapse: collapse; width: 100%; }
.hmt-admin-table th { background: #e5e7eb; color: #111827; font-weight: 600; }
.hmt-admin-table th, .hmt-admin-table td { padding: 0.5rem 0.75rem; border: 1px solid #e5e7eb; }
.hmt-admin-table tr:nth-child(even) td { background: #f9fafb; }
.hmt-admin-bar-wrap { background: #e5e7eb; border-radius: 4px; height: 10px; overflow: hidden; min-width: 80px; }
.hmt-admin-bar { height: 100%; border-radius: 4px; }
.hmt-admin-bar.hmt-green { background: #10b981; }
.hmt-admin-bar.hmt-yellow { background: #f59e0b; }
.hmt-admin-bar.hmt-red { background: #ef4444; }
.hmt-admin-table td.hmt-green { color: #065f46; font-weight: 600; }
.hmt-admin-table td.hmt-yellow { color: #92400e; font-weight: 600; }
.hmt-admin-table td.hmt-red { color: #991b1b; font-weight: 600; }
