/* Teacher Training (prototype) tab. */

.sd-tt-loading, .sd-tt-error, .sd-tt-empty { color: #888; padding: 24px; text-align: center; }
.sd-tt-error { color: #b91c1c; }

/* KPI strip */
.sd-tt-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    margin: 8px 0 20px;
}
.sd-tt-kpi {
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 10px;
    padding: 14px 16px;
    text-align: center;
}
.sd-tt-kpi-val { font-size: 1.5rem; font-weight: 700; color: #2f3b2a; }
.sd-tt-kpi-label { font-size: 0.72rem; color: #888; margin-top: 4px; text-transform: uppercase; letter-spacing: 0.03em; }

/* Card grid */
.sd-tt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}
.sd-tt-card {
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 12px;
    padding: 16px 18px;
}
.sd-tt-card-title { font-size: 1rem; font-weight: 700; margin: 0 0 4px; color: #2f3b2a; display: flex; align-items: center; }
.sd-tt-card-note { font-size: 0.78rem; color: #999; margin: 0 0 12px; line-height: 1.4; }
.sd-tt-card-body { margin-top: 8px; }

/* Horizontal bars */
.sd-tt-hbar-row { display: flex; align-items: center; gap: 8px; margin: 5px 0; }
.sd-tt-hbar-label { flex: 0 0 130px; font-size: 0.8rem; color: #555; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sd-tt-hbar-track { flex: 1; height: 16px; background: #f1f1ef; border-radius: 8px; overflow: hidden; }
.sd-tt-hbar-fill { height: 100%; background: #8aa06f; border-radius: 8px; }
.sd-tt-hbar-fill.sd-tt-fill-accent { background: #6b8e4e; }
.sd-tt-hbar-fill.sd-tt-fill-teacher { background: #7a9ec4; }
.sd-tt-hbar-val { flex: 0 0 auto; font-size: 0.8rem; font-weight: 600; color: #444; min-width: 48px; text-align: right; }

/* Compare groups */
.sd-tt-compare-group { margin-bottom: 14px; }
.sd-tt-compare-title { font-size: 0.82rem; font-weight: 600; color: #666; margin-bottom: 3px; }

/* Vertical bar chart */
.sd-tt-vchart {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 150px;
    padding-top: 16px;
}
.sd-tt-vbar-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; }
.sd-tt-vbar {
    width: 70%;
    background: #6b8e4e;
    border-radius: 4px 4px 0 0;
    position: relative;
    min-height: 3px;
    display: flex;
    justify-content: center;
}
.sd-tt-vbar.sd-tt-vbar-alt { background: #c9a96e; }
.sd-tt-vbar-val { position: absolute; top: -16px; font-size: 0.72rem; font-weight: 600; color: #555; }
.sd-tt-vbar-label { font-size: 0.68rem; color: #888; margin-top: 5px; white-space: nowrap; }

/* Candidate table */
.sd-tt-table-scroll { max-height: 460px; overflow-y: auto; border: 1px solid #f0f0f0; border-radius: 6px; }
.sd-tt-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.sd-tt-table thead th { position: sticky; top: 0; background: #fff; z-index: 1; }
.sd-tt-table th { text-align: left; padding: 8px 10px; border-bottom: 2px solid #eee; color: #888; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.03em; }
.sd-tt-table td { padding: 8px 10px; border-bottom: 1px solid #f3f3f3; }
/* Right-align numeric columns for BOTH header and cells (th needs the override
   because .sd-tt-table th sets text-align:left at equal specificity). */
.sd-tt-table th.sd-tt-num,
.sd-tt-table td.sd-tt-num { text-align: right; }

/* Studio column + dual-studio badge (Seattle merged view). */
.sd-tt-studio { color: #555; white-space: nowrap; }
.sd-tt-dual {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    background: #eef3e8;
    color: #4f6b34;
    border-radius: 8px;
    font-size: 0.68rem;
    font-weight: 700;
}

/* Clickable candidate rows → open member slide-over. */
.sd-tt-cand-row { cursor: pointer; transition: background 0.12s; }
.sd-tt-cand-row:hover { background: #f7f9f4; }

/* Seattle cross-studio breakdown card. */
.sd-tt-seattle-stats { display: flex; flex-wrap: wrap; gap: 18px; }
.sd-tt-seattle-stat { display: flex; flex-direction: column; min-width: 120px; }
.sd-tt-seattle-num { font-size: 1.5rem; font-weight: 700; color: #2f3e1f; }
.sd-tt-seattle-lbl { font-size: 0.74rem; color: #888; text-transform: uppercase; letter-spacing: 0.03em; }
.sd-tt-score {
    display: inline-block;
    min-width: 30px;
    padding: 2px 8px;
    background: #6b8e4e;
    color: #fff;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.8rem;
}

/* Info-icon tooltip (self-contained copy of the shared .sd-mv2-filter-* styles,
   so it renders correctly on the TT tab even when members.css isn't loaded). */
.sd-tt-card-title .sd-mv2-filter-info {
    position: relative;
    display: inline-block;
    margin-left: 6px;
    cursor: help;
    vertical-align: middle;
    font-weight: 400;
}
.sd-tt-card-title .sd-mv2-filter-info-icon {
    font-size: 13px;
    color: #b0b8c4;
    line-height: 1;
    font-style: normal;
}
.sd-tt-card-title .sd-mv2-filter-info:hover .sd-mv2-filter-info-icon {
    color: #6b7280;
}
.sd-tt-card-title .sd-mv2-filter-tooltip {
    display: none;
    position: fixed;
    width: auto;
    max-width: min(420px, calc(100vw - 20px));
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    padding: 10px 12px;
    background: #1f1e1c;
    color: #f5f0eb;
    font-size: 11px;
    line-height: 1.45;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    text-align: left;
    border-radius: 8px;
    z-index: 100000;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    pointer-events: none;
}
.sd-tt-card-title .sd-mv2-filter-tooltip-desc {
    display: block;
    margin-bottom: 8px;
    color: #c8c2b8;
    font-size: 11px;
    line-height: 1.5;
}
.sd-tt-card-title .sd-mv2-filter-tooltip-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.sd-tt-card-title .sd-mv2-filter-tooltip-item {
    display: flex;
    align-items: baseline;
    gap: 5px;
    line-height: 1.4;
    white-space: normal;
}
.sd-tt-card-title .sd-mv2-filter-tooltip-name {
    font-weight: 600;
    color: #f5f0eb;
    flex-shrink: 0;
}
.sd-tt-card-title .sd-mv2-filter-tooltip-explain {
    color: #8a8680;
}
.sd-tt-card-title .sd-mv2-filter-tooltip-explain::before {
    content: '— ';
}
