/* ==========================================================================
   Play-by-Play — Event feed, PBP filters, PBP period tabs
   ========================================================================== */

.pbp-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--theme-border-strong);
}
.pbp-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    font-size: 8px;
    font-weight: var(--weight-extra-bold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid #CCC;
    background: #FFFFFF;
    color: #555;
    cursor: pointer;
    font-family: inherit;
}
.pbp-filter-btn:hover {
    border-color: #999;
    color: #333;
}
.pbp-filter-btn.active {
    background: #000;
    color: #FFF;
    border-color: #000;
}

/* Secondary controls row */
.pbp-controls-secondary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-bottom: 1px solid var(--theme-border-strong);
    flex-wrap: wrap;
}
.pbp-team-filter {
    display: flex;
    gap: 4px;
}
.pbp-search {
    padding: 3px 8px;
    font-size: 8px;
    font-weight: var(--weight-bold);
    font-family: inherit;
    border: 1px solid #CCC;
    background: #FFFFFF;
    color: #333;
    letter-spacing: 0.3px;
    min-width: 100px;
    max-width: 140px;
}
.pbp-search::placeholder {
    color: #AAA;
}
.pbp-search:focus {
    outline: none;
    border-color: #000;
}

.pbp-period-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--theme-border-strong);
}
.pbp-period-tab {
    padding: 5px 12px;
    font-size: 8px;
    font-weight: var(--weight-extra-bold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    border: none;
    border-bottom: 2px solid transparent;
    background: none;
    cursor: pointer;
    font-family: inherit;
}
.pbp-period-tab.active {
    color: #000;
    border-bottom-color: #000;
}
.pbp-event-feed {
    /* No max-height — flows with outer panel scroll */
}
.pbp-period-divider {
    padding: 5px 10px;
    font-size: 8px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    background: #F0F0F0;
    border-bottom: 1px solid var(--theme-border-strong);
}
.pbp-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-bottom: 1px solid #F0F0F0;
    font-size: var(--text-xs);
    border-left: 3px solid transparent;
}
.pbp-row:last-child { border-bottom: none; }
.pbp-row-goal {
    border-left-color: #22C55E;
    font-weight: var(--weight-extra-bold);
    background: #FAFFFE;
}
.pbp-row-penalty {
    border-left-color: #EF4444;
    background: #FFFAFA;
}
.pbp-time {
    background: #1A1A1A;
    color: #FFF;
    padding: 2px 5px;
    font-size: 8px;
    font-weight: var(--weight-extra-bold);
    letter-spacing: 0.3px;
    min-width: 32px;
    text-align: center;
    flex-shrink: 0;
}
.pbp-period-label {
    font-size: 7px;
    font-weight: var(--weight-bold);
    color: #999;
    text-transform: uppercase;
    min-width: 14px;
    flex-shrink: 0;
}
.pbp-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}
.pbp-dot-goal { background: #22C55E; }
.pbp-dot-shot { background: var(--theme-accent-secondary); }
.pbp-dot-penalty { background: #EF4444; }
.pbp-dot-faceoff { background: #999; }
.pbp-dot-hit { background: #F97316; }
.pbp-dot-other { background: #CCC; }
.pbp-team {
    font-size: 8px;
    font-weight: var(--weight-extra-bold);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #333;
    min-width: 26px;
    flex-shrink: 0;
}
.pbp-type {
    font-size: 8px;
    font-weight: var(--weight-extra-bold);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #555;
    min-width: 40px;
    flex-shrink: 0;
}
.pbp-desc {
    flex: 1;
    min-width: 0;
    font-size: var(--text-xs);
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pbp-row-goal .pbp-desc {
    font-weight: var(--weight-extra-bold);
    color: var(--text-main);
}
.pbp-score {
    font-size: 8px;
    font-weight: var(--weight-bold);
    color: #999;
    white-space: nowrap;
    flex-shrink: 0;
}
.pbp-sit {
    font-size: 7px;
    font-weight: var(--weight-extra-bold);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 1px 4px;
    border: 1px solid #DDD;
    color: #666;
    flex-shrink: 0;
    min-width: 16px;
    text-align: center;
}
.pbp-sit-pp {
    border-color: var(--theme-accent-secondary);
    color: var(--theme-accent-secondary);
}
.pbp-sit-sh {
    border-color: #555;
    color: #555;
}
.pbp-empty {
    padding: 20px 10px;
    text-align: center;
    font-size: var(--text-xs);
    color: #999;
    font-style: italic;
}

/* ==========================================================================
   Game Detail Tab Bar
   ========================================================================== */

.gd-tab-bar {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--theme-border-strong);
    background: #FFFFFF;
}
.gd-tab {
    padding: 7px 16px;
    font-size: 9px;
    font-weight: var(--weight-extra-bold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    border: none;
    border-bottom: 2px solid transparent;
    background: none;
    cursor: pointer;
    font-family: inherit;
}
.gd-tab:hover { color: #555; }
.gd-tab.active {
    color: #000;
    border-bottom-color: #000;
}

/* ==========================================================================
   PBP Filter Counts
   ========================================================================== */

.pbp-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 14px;
    height: 14px;
    padding: 0 3px;
    font-size: 7px;
    font-weight: var(--weight-extra-bold);
    border-radius: 7px;
    background: #E8E8E8;
    color: #666;
}
.pbp-filter-btn.active .pbp-filter-count {
    background: rgba(255, 255, 255, 0.25);
    color: #FFF;
}

/* ==========================================================================
   Two-Column Layout (no independent scroll)
   ========================================================================== */

.pbp-two-col {
    display: flex;
    gap: 0;
}
.pbp-col-left {
    flex: 1;
    min-width: 0;
    border-right: 1px solid var(--theme-border-strong);
}
.pbp-col-right {
    width: 35%;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    align-self: flex-start;
    padding: 10px;
}

/* ==========================================================================
   Rink Visualization
   ========================================================================== */

.pbp-rink {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1.18;
    background: #FFFFFF;
    border: 2px solid #333;
    border-radius: 6px 6px 40% 40%;
    overflow: hidden;
    margin-bottom: 6px;
}
.pbp-rink-ice {
    position: absolute;
    inset: 0;
}
.pbp-rink-blueline {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: #2563EB;
    top: 25%;
}
.pbp-rink-goalline {
    position: absolute;
    left: 10%;
    right: 10%;
    height: 1px;
    background: #DC2626;
    top: 88%;
}
.pbp-rink-crease {
    position: absolute;
    width: 14%;
    height: 6%;
    border: 1px solid #DC2626;
    border-radius: 50% 50% 0 0;
    left: 43%;
    top: 83%;
    background: rgba(59, 130, 246, 0.08);
}

/* Shot dots — team-colored via inline style */
.pbp-rink-dot {
    position: absolute;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    cursor: pointer;
    transition: transform 0.15s ease;
}
.pbp-rink-dot:hover {
    transform: translate(-50%, -50%) scale(2.2);
    z-index: 10;
}
.pbp-rink-dot-shot {
    width: 6px;
    height: 6px;
    opacity: 0.7;
}
.pbp-rink-dot-shot:hover {
    opacity: 1;
}
.pbp-rink-dot-goal {
    width: 10px;
    height: 10px;
    opacity: 1;
    border: 2px solid #000;
}

/* High-danger shot dots — slightly larger */
.pbp-dot-danger-high.pbp-rink-dot-shot {
    width: 7px;
    height: 7px;
    opacity: 0.85;
}

/* Rink tooltip */
.pbp-rink-tooltip {
    position: absolute;
    z-index: 20;
    background: #1A1A1A;
    color: #FFF;
    padding: 6px 8px;
    font-size: 8px;
    line-height: 1.5;
    white-space: nowrap;
    pointer-events: none;
    border: 1px solid #333;
}
.pbp-tooltip-player {
    font-weight: var(--weight-extra-bold);
    font-size: 9px;
    letter-spacing: 0.3px;
}
.pbp-tooltip-detail {
    color: #AAA;
    font-size: 8px;
}
.pbp-tooltip-danger {
    color: #EF4444;
    font-weight: var(--weight-bold);
}
.pbp-tooltip-score {
    color: #FFF;
    font-weight: var(--weight-extra-bold);
    font-size: 8px;
    margin-top: 2px;
    padding-top: 2px;
    border-top: 1px solid #333;
}

/* Clickable player names in PBP feed */
.pbp-desc-link {
    cursor: pointer;
}
.pbp-desc-link:hover {
    text-decoration: underline;
    color: var(--text-main);
}

/* Flash highlight on PBP row when clicked from rink */
.pbp-row-flash {
    animation: pbp-flash 1.5s ease-out;
}
@keyframes pbp-flash {
    0% { background: #FFF3CD; }
    100% { background: transparent; }
}

/* ==========================================================================
   Shot Chart — Tally Header + Filter Strip + Footer
   ========================================================================== */

/* Clickable tally header */
.sc-tally-header {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid #E0E0E0;
}
.sc-tally-team {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 4px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: opacity 0.15s;
}
.sc-tally-team:hover { background: #FAFAFA; }
.sc-tally-team.active { border-bottom-color: #000; }
.sc-tally-team.dimmed { opacity: 0.25; }
.sc-tally-abbrev {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 7px;
    font-weight: var(--weight-extra-bold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
}
.sc-tally-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
}
.sc-tally-num {
    font-size: 18px;
    font-weight: var(--weight-extra-bold);
    color: #1A1A1A;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}
.sc-tally-both {
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 7px;
    font-weight: var(--weight-extra-bold);
    text-transform: uppercase;
    color: #BBB;
    cursor: pointer;
    border-left: 1px solid #F0F0F0;
    border-right: 1px solid #F0F0F0;
}
.sc-tally-both:hover { background: #FAFAFA; }
.sc-tally-both.active { color: #000; background: #F5F5F5; }

/* Compact filter strip */
.sc-filters {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 4px 8px;
    border-bottom: 1px solid #E0E0E0;
    flex-wrap: wrap;
}
.sc-f {
    padding: 1px 4px;
    font-size: 6px;
    font-weight: var(--weight-extra-bold);
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border: 1px solid #E0E0E0;
    background: #FFF;
    color: #AAA;
    cursor: pointer;
}
.sc-f:hover { border-color: #999; color: #666; }
.sc-f.active { background: #1A1A1A; color: #FFF; border-color: #1A1A1A; }
.sc-f-sep {
    width: 1px;
    height: 10px;
    background: #E0E0E0;
    margin: 0 1px;
    flex-shrink: 0;
}

/* Minimal goal footer */
.sc-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    gap: 3px;
    font-size: 7px;
    color: #BBB;
    border-top: 1px solid #E0E0E0;
}
.sc-footer-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #888;
    border: 2px solid #000;
}
