/* ============================================
   TRADE ADVISOR - Intent x Context UI
   ============================================ */

/* Context indicator in trade options bar */
.trade-context-indicator {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.6rem;
    background: rgba(124, 58, 237, 0.1);
    border: 1px solid rgba(124, 58, 237, 0.25);
    border-radius: 6px;
    white-space: nowrap;
}

.trade-context-label {
    font-size: 0.72rem;
    color: #c4b5fd;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.trade-context-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    font-size: 0.6rem;
    font-weight: 700;
    color: #7c3aed;
    border: 1px solid #7c3aed;
    border-radius: 50%;
    cursor: help;
    transition: background 0.15s;
}

.trade-context-help:hover {
    background: #7c3aed;
    color: white;
}

/* Advisor action button styling */
.trade-action-btn.suggest-btn {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    color: white;
    border: 1px solid #8b5cf6;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.trade-action-btn.suggest-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #6d28d9, #5b21b6);
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
}

.trade-action-btn.suggest-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   RESULTS PANEL
   ============================================ */

.ta-results-panel {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: 420px;
    max-width: 95vw;
    background: #0f172a;
    border-left: 1px solid #1e293b;
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.4);
    z-index: 900;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: ta-slide-in 0.25s ease-out;
}

@keyframes ta-slide-in {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Results header */
.ta-results-header {
    padding: 1rem 1.25rem;
    background: #1e293b;
    border-bottom: 1px solid #334155;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.ta-results-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #f1f5f9;
    flex: 1;
}

.ta-results-strategy {
    font-size: 0.7rem;
    color: #94a3b8;
    width: 100%;
}

.ta-close-btn {
    background: #374151;
    color: #9ca3af;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
}
.ta-close-btn:hover { background: #4b5563; color: white; }

/* Results list */
.ta-results-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
}

/* Loading state */
.ta-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 3rem;
    color: #94a3b8;
    height: 100%;
}

.ta-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #334155;
    border-top-color: #a78bfa;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.ta-cancel-btn {
    background: #374151;
    color: #9ca3af;
    border: 1px solid #4b5563;
    padding: 0.4rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.78rem;
}
.ta-cancel-btn:hover { background: #4b5563; color: white; }

/* Empty state */
.ta-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 3rem;
    text-align: center;
    height: 100%;
}

.ta-empty-icon { font-size: 2.5rem; opacity: 0.5; }
.ta-empty-text { font-size: 0.95rem; color: #94a3b8; font-weight: 600; }
.ta-empty-hint { font-size: 0.78rem; color: #64748b; }

/* ============================================
   SUGGESTION CARDS
   ============================================ */

.ta-suggestion-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 10px;
    margin-bottom: 0.6rem;
    display: flex;
    overflow: hidden;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.ta-suggestion-card:hover {
    border-color: #475569;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.ta-suggestion-card.baseline {
    border-color: #7c3aed;
    background: rgba(124, 58, 237, 0.05);
}

/* Rank column */
.ta-card-rank {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.15);
    min-width: 56px;
}

.ta-rank-num {
    font-size: 0.7rem;
    color: #64748b;
    font-weight: 700;
}

.ta-grade {
    font-size: 1.2rem;
    font-weight: 800;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.ta-grade.grade-a { background: #064e3b; color: #10b981; }
.ta-grade.grade-b { background: #1e3a5f; color: #3b82f6; }
.ta-grade.grade-c { background: #78350f; color: #f59e0b; }
.ta-grade.grade-d { background: #7f1d1d; color: #ef4444; }

/* Card body */
.ta-card-body {
    flex: 1;
    padding: 0.6rem 0.75rem;
    min-width: 0;
}

.ta-card-label {
    font-size: 0.68rem;
    color: #a78bfa;
    font-weight: 600;
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ta-trade-line {
    font-size: 0.78rem;
    color: #e2e8f0;
    margin-bottom: 0.25rem;
    line-height: 1.5;
}

.ta-direction {
    color: #64748b;
    font-weight: 600;
    font-size: 0.7rem;
    margin-right: 0.25rem;
}

.ta-player {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    margin: 0 0.1rem;
    font-size: 0.75rem;
}

.ta-player.give {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
}

.ta-player.receive {
    background: rgba(16, 185, 129, 0.1);
    color: #6ee7b7;
}

.ta-pos {
    font-size: 0.6rem;
    font-weight: 700;
    color: #a78bfa;
    margin-right: 0.15rem;
}

.ta-from {
    font-size: 0.62rem;
    color: #64748b;
}

/* Scores row */
.ta-card-scores {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.35rem;
}

.ta-jg-score {
    font-size: 0.72rem;
    font-weight: 700;
    color: #c4b5fd;
    background: rgba(124, 58, 237, 0.15);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
}

.ta-normalized {
    font-size: 0.68rem;
    color: #64748b;
}

/* Card actions */
.ta-card-actions {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.5rem;
    justify-content: center;
}

.ta-btn {
    background: #374151;
    border: 1px solid #4b5563;
    color: #9ca3af;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.ta-btn:hover {
    background: #4b5563;
    color: white;
    border-color: #6b7280;
}

.ta-btn.ta-btn-send {
    border-color: #10b981;
    color: #10b981;
}

.ta-btn.ta-btn-send:hover {
    background: #10b981;
    color: white;
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .ta-results-panel {
        width: 100vw;
    }
    
    .trade-context-indicator {
        display: none; /* Hide in mobile -- context shown in trade bar */
    }
    
    .ta-suggestion-card {
        flex-wrap: wrap;
    }
    
    .ta-card-rank {
        flex-direction: row;
        min-width: unset;
        width: 100%;
        padding: 0.4rem 0.75rem;
        gap: 0.5rem;
    }
    
    .ta-card-actions {
        flex-direction: row;
        width: 100%;
        border-top: 1px solid #334155;
        justify-content: center;
        padding: 0.4rem;
    }
}
