/* ============================================================
   Recovery Profile Module — rc- prefix
   ============================================================ */

/* ── Container ── */
.rc-container {
    padding: 0;
}

/* ── Context bar ── */
.rc-context-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 24px;
    background: var(--surface-chrome);
    border-bottom: 1px solid var(--ink-line);
    font-size: 0.78rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

/* ── Back to Readiness button ── */
.rc-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border: 1px solid var(--ink-line-strong);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.rc-back-btn:hover {
    color: var(--text-primary);
    border-color: var(--text-tertiary);
    background: var(--ink-wash);
}

/* ── Info / Methodology button ── */
.rc-info-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border: 1px solid var(--ink-line-strong);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.rc-info-btn:hover {
    color: var(--text-primary);
    border-color: var(--text-tertiary);
    background: var(--ink-wash);
}

.rc-context-title {
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.82rem;
}

.rc-context-separator {
    width: 1px;
    height: 16px;
    background: var(--ink-line);
}

.rc-context-match {
    font-weight: 500;
    color: var(--text-primary);
}

.rc-context-tier-counts {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

.rc-tier-count {
    font-weight: 600;
    font-size: 0.72rem;
}

/* ── MD day badge ── */
.rc-md-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.rc-md-1 {
    color: var(--info);
    background: rgba(96, 165, 250, 0.12);
}

.rc-md-2 {
    color: var(--accent-dark);
    background: rgba(3, 71, 82, 0.2);
}

/* ── Table ── */
.rc-table-wrap {
    margin: 0;
    overflow-x: auto;
}

.rc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
}

.rc-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 8px 10px;
    background: var(--surface-chrome);
    border-bottom: 2px solid var(--ink-line-strong);
    color: var(--text-tertiary);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    text-align: left;
    white-space: nowrap;
}

.rc-table thead th.rc-th-center {
    text-align: center;
}

.rc-table tbody tr {
    border-bottom: 1px solid var(--ink-line);
    transition: background 0.1s ease;
}

.rc-table tbody tr:hover {
    background: var(--ink-wash);
}

.rc-table tbody td {
    padding: 8px 10px;
    vertical-align: middle;
    white-space: nowrap;
}

.rc-table tbody td.rc-td-center {
    text-align: center;
}

/* ── Row tier emphasis (tier badge column carries the signal) ── */
.rc-table tbody tr[data-tier="4"] {
    background: rgba(var(--accent-rgb), 0.04);
}

/* ── Player name cell ── */
.rc-player-name {
    font-weight: 600;
    color: var(--text-primary);
}

.rc-player-pos {
    display: inline-block;
    width: 30px;
    padding: 1px 0;
    border-radius: var(--radius-sm);
    font-size: 0.62rem;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    background: var(--surface-raised);
}

/* ── Score bar ── */
.rc-score-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rc-score-value {
    font-weight: 700;
    font-size: 0.8rem;
    min-width: 28px;
    text-align: right;
    color: var(--text-primary);
}

.rc-score-bar {
    width: 70px;
    height: 5px;
    background: var(--surface-raised);
    border-radius: var(--radius-3);
    overflow: hidden;
}

.rc-score-fill {
    height: 100%;
    border-radius: var(--radius-3);
    transition: width 0.3s ease;
}

/* ── Tier badges ── */
.rc-tier-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
}

.rc-tier-0 {
    color: var(--text-tertiary);
    background: transparent;
}

.rc-tier-1 {
    color: var(--info);
    background: rgba(96, 165, 250, 0.12);
}

.rc-tier-2 {
    color: var(--accent-teal);
    background: rgba(3, 71, 82, 0.18);
}

.rc-tier-3 {
    color: var(--accent);
    background: rgba(var(--accent-rgb), 0.15);
}

.rc-tier-4 {
    color: var(--accent);
    background: rgba(var(--accent-rgb), 0.25);
    box-shadow: 0 0 6px rgba(var(--accent-rgb), 0.2);
}

/* ── Modality cells ── */
.rc-mod-assigned {
    text-align: center;
}

.rc-mod-step {
    display: block;
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-tertiary);
    margin-bottom: 1px;
}

.rc-mod-check {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1;
}

.rc-mod-duration {
    display: block;
    font-size: 0.6rem;
    color: var(--text-tertiary);
    margin-top: 1px;
}

.rc-mod-dash {
    color: var(--text-tertiary);
    opacity: 0.3;
    font-size: 0.75rem;
    text-align: center;
}

/* ── Estimated time ── */
.rc-est-time {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.75rem;
}

/* ── Minutes played ── */
.rc-minutes {
    font-weight: 600;
    color: var(--text-primary);
}

.rc-minutes-zero {
    color: var(--text-tertiary);
}

/* ── Empty state ── */
.rc-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    color: var(--text-tertiary);
    text-align: center;
    line-height: 1.45;
}

.rc-empty-state-title {
    font-size: 0.86rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--text-secondary);
}

.rc-empty-state-desc {
    font-size: 0.76rem;
    max-width: 400px;
}

/* ── Loading ── */
.rc-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 24px;
    color: var(--text-tertiary);
    gap: 12px;
}

/* ============================================================
   Methodology Modal
   ============================================================ */

.rc-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    background: var(--scrim);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

.rc-modal {
    background: var(--surface-chrome);
    border: 1px solid var(--ink-line-strong);
    border-radius: var(--radius-md);
    width: 90%;
    max-width: 780px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-modal);
}

.rc-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid var(--ink-line-strong);
}

.rc-modal-header h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rc-modal-close {
    background: none;
    border: none;
    color: var(--text-tertiary);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    line-height: 1;
}

.rc-modal-close:hover {
    color: var(--text-primary);
    background: var(--ink-wash);
}

.rc-modal-body {
    padding: 20px 24px;
    overflow-y: auto;
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ── Info sections ── */
.rc-info-section {
    margin-bottom: 24px;
}

.rc-info-section:last-child {
    margin-bottom: 0;
}

.rc-info-section h4 {
    margin: 0 0 8px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.rc-info-section h5 {
    margin: 14px 0 6px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--accent);
}

.rc-info-section p {
    margin: 0 0 8px;
}

.rc-info-note {
    font-size: 0.72rem;
    color: var(--text-tertiary);
    font-style: italic;
}

/* ── Info tables ── */
.rc-info-table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0;
    font-size: 0.72rem;
}

.rc-info-table thead th {
    padding: 6px 10px;
    background: var(--surface-raised);
    border-bottom: 1px solid var(--ink-line-strong);
    color: var(--text-tertiary);
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;
}

.rc-info-table tbody td {
    padding: 6px 10px;
    border-bottom: 1px solid var(--ink-line);
    vertical-align: top;
    color: var(--text-secondary);
    line-height: 1.5;
}

.rc-info-table tbody tr:last-child td {
    border-bottom: none;
}

/* ── Info list ── */
.rc-info-list {
    margin: 8px 0 0;
    padding-left: 18px;
}

.rc-info-list li {
    margin-bottom: 6px;
    line-height: 1.5;
}

.rc-info-list li strong {
    color: var(--text-primary);
}
