/* ── Trade Finder Panel ───────────────────────────────────────────────────── */
.tf-panel {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    justify-content: flex-end;
    pointer-events: none; /* let backdrop handle click-through */
}

.tf-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    pointer-events: auto;
}

/* Left-edge resize grip — 8px wide, full height */
/* Left-edge resize grip — lives INSIDE .tf-content so it tracks the panel edge */
.tf-resize-handle {
    position: absolute;
    left: 0;
    top: 0;
    width: 8px;
    height: 100%;
    cursor: ew-resize;
    z-index: 10;
    pointer-events: auto;
    background: transparent;
    transition: background 0.15s;
}
.tf-resize-handle:hover,
.tf-resize-handle:active { background: rgba(124, 58, 237, 0.35); }

.tf-content {
    position: relative;
    width: min(560px, 100vw);   /* wider default — trades need room */
    min-width: 320px;
    height: 100%;
    background: #111827;
    border-left: 1px solid #1f2937;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    pointer-events: auto;
}

.tf-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1rem 1rem 0.85rem;
    border-bottom: 1px solid #1f2937;
    flex-shrink: 0;
    gap: 0.6rem;
}

.tf-header-left  { flex: 1; min-width: 0; }
.tf-header-right { display: flex; align-items: center; gap: 0.4rem; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }

/* Toggle pills — shared base */
.tf-stack-toggle,
.tf-activity-toggle {
    padding: 0.28rem 0.55rem;
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 20px;
    color: #9ca3af;
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
}

/* 🔗 Keep Stacks — green when active */
.tf-stack-toggle:hover  { border-color: #10b981; color: #34d399; }
.tf-stack-toggle.active { background: #064e3b; border-color: #10b981; color: #6ee7b7; font-weight: 600; }

/* 🎲 Activity — amber when active */
.tf-activity-toggle:hover  { border-color: #f59e0b; color: #fbbf24; }
.tf-activity-toggle.active { background: #78350f; border-color: #f59e0b; color: #fde68a; font-weight: 600; }

/* ▼ Minimize button */
.tf-minimize-btn {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0.2rem 0.3rem;
    line-height: 1;
    transition: color 0.15s;
}
.tf-minimize-btn:hover { color: #d1d5db; }

.tf-close-btn {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 1rem;
    cursor: pointer;
    padding: 0.2rem 0.3rem;
    line-height: 1;
}
.tf-close-btn:hover { color: #f9fafb; }

.tf-title {
    margin: 0 0 0.15rem;
    font-size: 1.05rem;
    color: #f9fafb;
}

.tf-subtitle {
    font-size: 0.76rem;
    color: #9ca3af;
    line-height: 1.4;
}

/* ── Status bar ─────────────────────────────────────────────────────────── */
.tf-status {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    background: #1f2937;
    border-bottom: 1px solid #374151;
    flex-shrink: 0;
}

.tf-status-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.tf-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid #374151;
    border-top-color: #7c3aed;
    border-radius: 50%;
    animation: tf-spin 0.8s linear infinite;
    flex-shrink: 0;
}
@keyframes tf-spin { to { transform: rotate(360deg); } }

#tfStatusMsg {
    font-size: 0.8rem;
    color: #d1d5db;
}

.tf-progress-bar {
    height: 3px;
    background: #374151;
    border-radius: 2px;
    overflow: hidden;
}

.tf-progress-fill {
    height: 100%;
    background: #7c3aed;
    transition: width 0.4s ease;
}

/* ── Sort toolbar ────────────────────────────────────────────────────────── */
.tf-sort-bar {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: #1a2234;
    border-bottom: 1px solid #1f2937;
    flex-shrink: 0;
}

.tf-sort-label {
    font-size: 0.72rem;
    color: #6b7280;
    margin-right: 0.1rem;
}

.tf-sort-btn {
    padding: 0.2rem 0.6rem;
    background: transparent;
    border: 1px solid #374151;
    border-radius: 12px;
    color: #9ca3af;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.15s;
}
.tf-sort-btn:hover  { border-color: #7c3aed; color: #a78bfa; }
.tf-sort-btn.active { background: #312e81; border-color: #4338ca; color: #c7d2fe; font-weight: 600; }

.tf-result-count {
    margin-left: auto;
    font-size: 0.7rem;
    color: #6b7280;
}

/* ── Results list ───────────────────────────────────────────────────────── */
.tf-results {
    flex: 1;
    overflow-y: auto;
    padding: 0.65rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.tf-empty, .tf-error {
    text-align: center;
    padding: 3rem 1rem;
    color: #9ca3af;
    font-size: 0.85rem;
    line-height: 1.6;
}
.tf-error { color: #f87171; }

/* ── Trade card ─────────────────────────────────────────────────────────── */
.tf-card {
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 10px;
    padding: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}
.tf-card:hover { border-color: #7c3aed; }

/* Give/Get sides — stack vertically so long names never get clipped */
.tf-card-sides {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

/* Row to hold the two sides + arrow */
.tf-card-sides-row {
    display: flex;
    align-items: stretch;
    gap: 0.4rem;
}

.tf-card-side {
    flex: 1;
    padding: 0.55rem 0.65rem;
    border-radius: 6px;
    background: #111827;
    min-width: 0; /* allow flex children to shrink */
}

.tf-give { border-left: 3px solid #f97316; }
.tf-get  { border-left: 3px solid #10b981; }

.tf-side-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    margin-bottom: 0.15rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.tf-player-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: #f9fafb;
    /* Allow wrapping for long multi-player names */
    word-break: break-word;
    line-height: 1.3;
}

.tf-player-meta {
    font-size: 0.73rem;
    color: #9ca3af;
    margin-top: 0.1rem;
}

.tf-card-arrow {
    font-size: 0.9rem;
    color: #6b7280;
    flex-shrink: 0;
    align-self: center;
    padding: 0 0.1rem;
}

.tf-card-footer {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.73rem;
    flex-wrap: wrap;
}

.tf-opp-name  { color: #9ca3af; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tf-fairness  { padding: 0.18rem 0.45rem; border-radius: 4px; font-weight: 600; white-space: nowrap; }
.tf-fair-high { background: #064e3b; color: #34d399; }
.tf-fair-mid  { background: #451a03; color: #fb923c; }
.tf-fair-low  { background: #450a0a; color: #f87171; }

.tf-benefit {
    color: #a78bfa;
    font-weight: 600;
    white-space: nowrap;
}

.tf-load-btn {
    padding: 0.28rem 0.6rem;
    background: #7c3aed;
    border: none;
    color: white;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
    margin-left: auto;
}
.tf-load-btn:hover { background: #6d28d9; }

/* Structure badge (2-for-1, 1-for-2) */
.tf-structure-badge {
    display: inline-block;
    padding: 0.08rem 0.35rem;
    background: #312e81;
    border: 1px solid #4338ca;
    border-radius: 4px;
    font-size: 0.62rem;
    color: #a5b4fc;
    font-weight: 700;
    letter-spacing: 0.03em;
}

/* Trade rationale */
.tf-rationale {
    font-size: 0.74rem;
    color: #6b7280;
    font-style: italic;
    line-height: 1.4;
}

/* Panel header tint when activity mode is active */
.tf-panel:has(.tf-activity-toggle.active) .tf-header {
    background: rgba(120, 53, 15, 0.15);
    border-bottom-color: #92400e;
}

/* Color classes for details drawer multipliers */
.tf-detail-up   { color: #34d399 !important; }
.tf-detail-down { color: #f87171 !important; }

/* ── Minimize badge ──────────────────────────────────────────────────────── */
/* Floating pill shown when panel is collapsed */
.tf-badge {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.9rem;
    background: #1f2937;
    border: 1px solid #7c3aed;
    border-radius: 24px;
    color: #d1d5db;
    font-size: 0.82rem;
    font-weight: 500;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
    z-index: 1101;
    pointer-events: auto;
    cursor: default;
}

.tf-badge-restore {
    background: #7c3aed;
    border: none;
    color: white;
    border-radius: 12px;
    padding: 0.2rem 0.55rem;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.tf-badge-restore:hover { background: #6d28d9; }

/* ── Expandable details drawer ───────────────────────────────────────────── */
.tf-details { margin-top: 0.2rem; }

.tf-details-toggle {
    font-size: 0.7rem;
    color: #6b7280;
    cursor: pointer;
    list-style: none;
    padding: 0.15rem 0;
    user-select: none;
}
.tf-details-toggle:hover { color: #a78bfa; }
.tf-details-toggle::marker,
.tf-details-toggle::-webkit-details-marker { display: none; }
.tf-details-toggle::before { content: '▸ '; }
details[open] .tf-details-toggle::before { content: '▾ '; }

.tf-details-body {
    margin-top: 0.35rem;
    padding: 0.55rem;
    background: #0f172a;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
}

.tf-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 0.7rem;
    color: #9ca3af;
    gap: 0.5rem;
}
.tf-detail-row span:first-child { flex: 1; }
.tf-detail-row span:last-child  { color: #d1d5db; font-weight: 500; text-align: right; flex-shrink: 0; }

.tf-detail-warn {
    font-size: 0.7rem;
    color: #fbbf24;
    margin-bottom: 0.25rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #374151;
}

/* Phase 2 mutual surplus — bilateral context note in the details drawer */
.tf-detail-bilateral {
    font-size: 0.7rem;
    color: #818cf8;  /* indigo — distinct from warnings (yellow) and values (green) */
    margin-top: 0.25rem;
    font-style: italic;
    line-height: 1.4;
}

/* ── Franchise Picker (standalone modal) ─────────────────────────── */
#tfFranchisePicker {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tf-fp-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
}

.tf-fp-container {
    position: relative;
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 12px;
    width: min(400px, 90vw);
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tf-fp-header {
    padding: 1.25rem 1.25rem 0.75rem;
    border-bottom: 1px solid #374151;
}

.tf-fp-header h3 {
    margin: 0 0 0.3rem;
    font-size: 1rem;
    color: #f9fafb;
}

.tf-fp-header p {
    margin: 0;
    font-size: 0.78rem;
    color: #9ca3af;
}

.tf-fp-list {
    overflow-y: auto;
    flex: 1;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.tf-fp-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s;
}

.tf-fp-row:hover {
    background: #111827;
    border-color: #7c3aed;
}

.tf-fp-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.tf-fp-icon-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #374151;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
}

.tf-fp-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.tf-fp-team {
    font-size: 0.88rem;
    font-weight: 600;
    color: #f9fafb;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tf-fp-owner {
    font-size: 0.75rem;
    color: #9ca3af;
}

.tf-fp-save-row {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid #374151;
    font-size: 0.78rem;
    color: #9ca3af;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tf-fp-save-row input { cursor: pointer; }

/* ── Mobile: bottom sheet ────────────────────────────────────────────────── */
/* On small screens the panel slides up from the bottom as a sheet.
   Height is capped at 85vh so the board is still visible behind it. */
@media (max-width: 640px) {
    .tf-panel {
        justify-content: flex-start;
        align-items: flex-end;
    }

    .tf-backdrop { background: rgba(0,0,0,0.4); }

    .tf-resize-handle { display: none; } /* no resize on mobile */

    .tf-content {
        width: 100vw !important; /* override any JS-set width */
        height: auto;
        max-height: 85vh;
        border-left: none;
        border-top: 1px solid #374151;
        border-radius: 16px 16px 0 0;
        /* slide up animation */
        animation: tf-slide-up 0.25s ease;
    }

    @keyframes tf-slide-up {
        from { transform: translateY(100%); }
        to   { transform: translateY(0); }
    }

    /* Drag indicator notch at top of sheet */
    .tf-header::before {
        content: '';
        display: block;
        width: 36px;
        height: 4px;
        background: #374151;
        border-radius: 2px;
        margin: 0 auto 0.5rem;
        position: absolute;
        top: 0.5rem;
        left: 50%;
        transform: translateX(-50%);
    }

    .tf-header { padding-top: 1.5rem; position: relative; }

    /* Smaller toggles on narrow screens */
    .tf-stack-toggle,
    .tf-activity-toggle { font-size: 0.65rem; padding: 0.22rem 0.45rem; }

    /* Badge moves to bottom-center on mobile */
    .tf-badge {
        bottom: 0.75rem;
        right: 50%;
        transform: translateX(50%);
    }
}

.tf-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1.25rem 1.25rem 1rem;
    border-bottom: 1px solid #1f2937;
    flex-shrink: 0;
    gap: 0.75rem;
}

.tf-header-left  { flex: 1; min-width: 0; }
.tf-header-right { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }

/* 🎲 Activity mode toggle pill */
.tf-activity-toggle {
    padding: 0.3rem 0.65rem;
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 20px;
    color: #9ca3af;
    font-size: 0.73rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
}
.tf-activity-toggle:hover {
    border-color: #f59e0b;
    color: #fbbf24;
}
.tf-activity-toggle.active {
    background: #78350f;
    border-color: #f59e0b;
    color: #fde68a;
    font-weight: 600;
}

/* 🔗 Keep Stacks toggle pill — green when active (protection on) */
.tf-stack-toggle {
    padding: 0.3rem 0.65rem;
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 20px;
    color: #9ca3af;
    font-size: 0.73rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
}
.tf-stack-toggle:hover {
    border-color: #10b981;
    color: #34d399;
}
/* Active = protection ON = green (safe) */
.tf-stack-toggle.active {
    background: #064e3b;
    border-color: #10b981;
    color: #6ee7b7;
    font-weight: 600;
}

/* Color classes for details drawer multipliers */
.tf-detail-up   { color: #34d399; }
.tf-detail-down { color: #f87171; }

.tf-title {
    margin: 0 0 0.2rem;
    font-size: 1.1rem;
    color: #f9fafb;
}

.tf-subtitle {
    font-size: 0.78rem;
    color: #9ca3af;
    line-height: 1.4;
}

.tf-close-btn {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
}
.tf-close-btn:hover { color: #f9fafb; }

/* ── Status bar ─────────────────────────────────────────────────────────── */
.tf-status {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: #1f2937;
    border-bottom: 1px solid #374151;
    flex-shrink: 0;
}

.tf-status-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.tf-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #374151;
    border-top-color: #7c3aed;
    border-radius: 50%;
    animation: tf-spin 0.8s linear infinite;
    flex-shrink: 0;
}
@keyframes tf-spin { to { transform: rotate(360deg); } }

#tfStatusMsg {
    font-size: 0.82rem;
    color: #d1d5db;
}

.tf-progress-bar {
    height: 3px;
    background: #374151;
    border-radius: 2px;
    overflow: hidden;
}

.tf-progress-fill {
    height: 100%;
    background: #7c3aed;
    transition: width 0.4s ease;
}

/* ── Results list ───────────────────────────────────────────────────────── */
.tf-results {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.tf-empty, .tf-error {
    text-align: center;
    padding: 3rem 1rem;
    color: #9ca3af;
    font-size: 0.85rem;
    line-height: 1.6;
}
.tf-error { color: #f87171; }

/* ── Trade card ─────────────────────────────────────────────────────────── */
.tf-card {
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 10px;
    padding: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.tf-card:hover {
    border-color: #7c3aed;
}

.tf-card-sides {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tf-card-side {
    flex: 1;
    padding: 0.6rem;
    border-radius: 6px;
    background: #111827;
}

.tf-give { border-left: 3px solid #f97316; }
.tf-get  { border-left: 3px solid #10b981; }

.tf-side-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    margin-bottom: 0.2rem;
}

/* .tf-player-name is defined earlier in this file with word-break: break-word */

.tf-player-meta {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 0.15rem;
}

.tf-card-arrow {
    font-size: 1.1rem;
    color: #6b7280;
    flex-shrink: 0;
}

.tf-card-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
}

.tf-opp-name  { color: #9ca3af; flex: 1; }
.tf-fairness  { padding: 0.2rem 0.5rem; border-radius: 4px; font-weight: 600; }
.tf-fair-high { background: #064e3b; color: #34d399; }
.tf-fair-mid  { background: #451a03; color: #fb923c; }
.tf-fair-low  { background: #450a0a; color: #f87171; }

.tf-benefit {
    color: #a78bfa;
    font-weight: 600;
    min-width: 2.5rem;
    text-align: right;
}

.tf-load-btn {
    padding: 0.3rem 0.7rem;
    background: #7c3aed;
    border: none;
    color: white;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}
.tf-load-btn:hover { background: #6d28d9; }

/* Structure badge (2-for-1, 1-for-2) */
.tf-structure-badge {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    background: #312e81;
    border: 1px solid #4338ca;
    border-radius: 4px;
    font-size: 0.65rem;
    color: #a5b4fc;
    font-weight: 600;
    vertical-align: middle;
    margin-left: 0.3rem;
}

/* Trade rationale string — one-line explanation under the players */
.tf-rationale {
    font-size: 0.75rem;
    color: #6b7280;
    font-style: italic;
    padding: 0 0.1rem;
    line-height: 1.4;
}

/* Panel header tint when activity mode is active */
.tf-panel:has(.tf-activity-toggle.active) .tf-header {
    background: rgba(120, 53, 15, 0.15);
    border-bottom-color: #92400e;
}

/* Mobile */
@media (max-width: 500px) {
    .tf-content { width: 100vw; }
    .tf-card-sides { flex-direction: column; }
    .tf-card-arrow { transform: rotate(90deg); align-self: center; }
}

/* ── Franchise Picker (standalone modal) ─────────────────────────── */
#tfFranchisePicker {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tf-fp-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
}

.tf-fp-container {
    position: relative;
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 12px;
    width: min(400px, 90vw);
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tf-fp-header {
    padding: 1.25rem 1.25rem 0.75rem;
    border-bottom: 1px solid #374151;
}

.tf-fp-header h3 {
    margin: 0 0 0.3rem;
    font-size: 1rem;
    color: #f9fafb;
}

.tf-fp-header p {
    margin: 0;
    font-size: 0.78rem;
    color: #9ca3af;
}

.tf-fp-list {
    overflow-y: auto;
    flex: 1;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.tf-fp-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s;
}

.tf-fp-row:hover {
    background: #111827;
    border-color: #7c3aed;
}

.tf-fp-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.tf-fp-icon-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #374151;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
}

.tf-fp-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.tf-fp-team {
    font-size: 0.88rem;
    font-weight: 600;
    color: #f9fafb;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tf-fp-owner {
    font-size: 0.75rem;
    color: #9ca3af;
}

.tf-fp-save-row {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid #374151;
    font-size: 0.78rem;
    color: #9ca3af;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tf-fp-save-row input { cursor: pointer; }

/* Expandable details drawer */
.tf-details { margin-top: 0.25rem; }

.tf-details-toggle {
    font-size: 0.72rem;
    color: #6b7280;
    cursor: pointer;
    list-style: none;
    padding: 0.2rem 0;
    user-select: none;
}
.tf-details-toggle:hover { color: #a78bfa; }
.tf-details-toggle::marker,
.tf-details-toggle::-webkit-details-marker { display: none; }
.tf-details-toggle::before { content: '▸ '; }
details[open] .tf-details-toggle::before { content: '▾ '; }

.tf-details-body {
    margin-top: 0.4rem;
    padding: 0.6rem;
    background: #0f172a;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.tf-detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: #9ca3af;
}
.tf-detail-row span:last-child { color: #d1d5db; font-weight: 500; }

.tf-detail-warn {
    font-size: 0.72rem;
    color: #fbbf24;
    margin-bottom: 0.3rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid #374151;
}