/* =============================================================================
   SHOT CHART STYLES - Basketball Shot Visualization
   ============================================================================= */

.shot-chart-container {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
}

/* Header */
.sc-header {
    margin-bottom: 1.5rem;
}

.sc-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent);
    margin: 0 0 1rem 0;
}

/* Filters */
.sc-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.sc-filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.sc-filter-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-right: 0.25rem;
}

.sc-filter-btn {
    background: rgba(148, 163, 184, 0.1);
    border: 1px solid transparent;
    color: var(--text-secondary);
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sc-filter-btn:hover {
    background: rgba(148, 163, 184, 0.2);
    color: var(--text-primary);
}

.sc-filter-btn.active {
    background: var(--accent);
    color: #000;
    font-weight: 600;
}

/* Two Courts Side by Side */
.sc-courts-wrapper {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin: 1.5rem 0;
}

.sc-court-panel {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 1rem;
    border-top: 3px solid;
    flex: 1;
    min-width: 280px;
    max-width: 380px;
}

.sc-court-panel.visitor {
    border-top-color: #3b82f6;
}

.sc-court-panel.home {
    border-top-color: #22c55e;
}

.sc-court-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding: 0 0.25rem;
}

.sc-team-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60%;
}

.sc-court-panel.visitor .sc-team-name {
    color: #3b82f6;
}

.sc-court-panel.home .sc-team-name {
    color: #22c55e;
}

.sc-team-pct {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
}

.sc-court {
    width: 100%;
    height: auto;
    border-radius: 6px;
    overflow: visible;
}

.sc-court-stats {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

/* Shot markers */
.sc-shot {
    cursor: pointer;
    pointer-events: all;
}

.sc-shot.make {
    transition: r 0.15s ease, filter 0.15s ease;
}

.sc-shot.miss {
    transition: filter 0.15s ease;
}

.sc-shot:hover {
    filter: brightness(1.3) drop-shadow(0 0 3px currentColor);
}

/* Visitor shots - Blue theme */
.sc-shot.visitor.make {
    fill: #3b82f6;
    stroke: #1e40af;
    stroke-width: 2;
}

.sc-shot.visitor.miss line {
    stroke: #3b82f6;
    stroke-width: 2.5;
}

/* Home shots - Green theme */
.sc-shot.home.make {
    fill: #22c55e;
    stroke: #15803d;
    stroke-width: 2;
}

.sc-shot.home.miss line {
    stroke: #22c55e;
    stroke-width: 2.5;
}

/* Legend */
.sc-legend {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.sc-legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.sc-legend-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
}

.sc-legend-dot.make {
    background: linear-gradient(135deg, #3b82f6, #22c55e);
}

.sc-legend-dot.miss {
    background: transparent;
    position: relative;
}

.sc-legend-dot.miss::before,
.sc-legend-dot.miss::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 2.5px;
    background: linear-gradient(90deg, #3b82f6, #22c55e);
    top: 50%;
    left: 50%;
}

.sc-legend-dot.miss::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.sc-legend-dot.miss::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

/* Responsive */
@media (max-width: 700px) {
    .sc-courts-wrapper {
        flex-direction: column;
        align-items: center;
    }
    
    .sc-court-panel {
        width: 100%;
        max-width: 400px;
    }
}

@media (max-width: 400px) {
    .shot-chart-container {
        padding: 1rem;
    }
    
    .sc-court-panel {
        padding: 0.75rem;
    }
    
    .sc-court-stats {
        font-size: 0.75rem;
        gap: 0.5rem;
    }
    
    .sc-filter-btn {
        padding: 0.35rem 0.6rem;
        font-size: 0.75rem;
    }
}

/* Shot Detail Popup */
.sc-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 1rem;
}

.sc-popup-content {
    background: var(--bg-card, #1e293b);
    border-radius: 12px;
    padding: 1.5rem;
    min-width: 250px;
    max-width: 320px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    animation: popupFadeIn 0.2s ease;
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.sc-popup-close {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted, #94a3b8);
    cursor: pointer;
    line-height: 1;
    padding: 0.25rem;
}

.sc-popup-close:hover {
    color: var(--text-primary, #fff);
}

.sc-popup-header {
    text-align: center;
    margin-bottom: 0.75rem;
}

.sc-popup-result {
    display: inline-block;
    font-size: 1.1rem;
    font-weight: 800;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sc-popup-result.made.visitor {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.sc-popup-result.made.home {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.sc-popup-result.missed.visitor {
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    opacity: 0.8;
}

.sc-popup-result.missed.home {
    background: rgba(34, 197, 94, 0.1);
    color: #4ade80;
    opacity: 0.8;
}

.sc-popup-player {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary, #fff);
    text-align: center;
    margin-bottom: 1rem;
}

.sc-popup-details {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.sc-popup-detail {
    font-size: 0.9rem;
    color: var(--text-secondary, #cbd5e1);
    text-align: center;
}
