/* Detail Panel & Sidebar Panels */

.detail-panel {
    position: fixed;
    top: 56px;
    right: -420px;
    width: 400px;
    height: calc(100vh - 56px);
    background: var(--bg-card, #161b22);
    border-left: 1px solid var(--border-color, #30363d);
    z-index: 95;
    transition: right 0.3s ease;
    overflow-y: auto;
    padding: 1.5rem;
}

.detail-panel.open {
    right: 0;
}

.detail-panel-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    border: none;
    color: var(--text-secondary, #8b949e);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
}

.detail-panel-close:hover {
    color: var(--text-primary, #e6edf3);
}

/* Member header in detail panel */
.detail-member-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.detail-photo {
    width: 60px;
    height: 75px;
    border-radius: 6px;
    object-fit: cover;
    background: var(--bg-surface, #21262d);
}

.detail-name {
    font-size: 1.1rem;
    font-weight: 700;
}

.detail-meta {
    font-size: 0.85rem;
    color: var(--text-secondary, #8b949e);
}

/* Stats row */
.detail-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.detail-stat {
    text-align: center;
    background: var(--bg-surface, #21262d);
    border-radius: 8px;
    padding: 0.6rem 0.4rem;
}

.detail-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
}

.detail-stat-label {
    font-size: 0.7rem;
    color: var(--text-muted, #6e7681);
    text-transform: uppercase;
}

/* Allies list in detail panel */
.detail-section h4 {
    font-size: 0.8rem;
    color: var(--text-muted, #6e7681);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.6rem;
}

.detail-ally-list {
    list-style: none;
}

.detail-ally-list li {
    display: flex;
    align-items: center;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--border-color, #30363d);
    font-size: 0.85rem;
}

.detail-ally-list li:last-child {
    border-bottom: none;
}

.detail-ally-party {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.detail-ally-name {
    flex: 1;
}

.detail-ally-count {
    color: var(--text-muted, #6e7681);
    font-size: 0.8rem;
}

/* View full profile link */
.detail-profile-link {
    display: block;
    text-align: center;
    margin-top: 1.25rem;
    padding: 0.6rem;
    background: var(--bg-surface, #21262d);
    border-radius: 8px;
    font-size: 0.85rem;
    transition: background 0.15s;
}

.detail-profile-link:hover {
    background: var(--border-color, #30363d);
    text-decoration: none;
}

/* ─── Responsive ────────────────────────────────────────────── */

@media (max-width: 768px) {
    .detail-panel {
        width: 100%;
        right: -100%;
        top: auto;
        bottom: 0;
        height: 60vh;
        border-left: none;
        border-top: 1px solid var(--border-color, #30363d);
        border-radius: 12px 12px 0 0;
    }
}
