/* ==========================================================================
   Now Playing — Boring Mode
   Compact, scan-optimized event list. No drama, all data.
   ========================================================================== */

.npb {
    padding: 1rem 0 1.5rem;
}

/* --- Heading --- */
.npb-heading {
    font-family: 'Karla', system-ui, sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--theme-text-muted, #6b7280);
    margin: 0 0 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--theme-border-color, #e5e7eb);
}

/* --- Event grid (auto-fit: 1→1col, 2→2col, 3+→3col) --- */
.npb-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0.75rem;
}

/* --- Event card --- */
.npb-event {
    padding: 0.75rem;
    border: 1px solid var(--theme-border-color, #e5e7eb);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    overflow: hidden;
    min-width: 0;
}

.npb-event--today {
    border-top: 3px solid #dc2626;
}

/* --- Primary row: when + name --- */
.npb-primary {
    display: flex;
    align-items: baseline;
    gap: 0.625rem;
    flex-wrap: wrap;
}

.npb-when {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    flex-shrink: 0;
    min-width: 120px;
}

.npb-day {
    font-family: 'Karla', system-ui, sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--theme-text-secondary, #374151);
}

.npb-day--today {
    color: #dc2626;
}

.npb-meta-sep {
    color: var(--theme-text-muted, #9ca3af);
    font-size: 0.85rem;
}

.npb-week {
    font-family: 'Karla', system-ui, sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--theme-text-muted, #9ca3af);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.npb-name {
    font-family: 'Karla', system-ui, sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
    flex: 1;
    min-width: 0;
}

.npb-name a {
    color: var(--theme-text-primary, #111827);
    text-decoration: none;
}

.npb-name a:hover {
    text-decoration: underline;
}

/* --- Details row --- */
.npb-details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.125rem 0.75rem;
    padding-left: 0;
    overflow: hidden;
}

.npb-detail {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.9rem;
    color: var(--theme-text-muted, #6b7280);
}

.npb-detail:not(:first-child) {
    white-space: nowrap;
}

.npb-detail i {
    font-size: 0.75rem;
    width: 0.95rem;
    text-align: center;
    color: var(--theme-text-muted, #9ca3af);
}

.npb-detail--doubles {
    font-weight: 600;
}

.npb-league-emoji {
    font-size: 1rem;
    line-height: 1;
}

.npb-league-link {
    color: var(--theme-text-muted, #6b7280);
    text-decoration: none;
}

.npb-league-link:hover {
    text-decoration: underline;
}

/* --- Buy-in indicators --- */
.npb-buyins {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.npb-buyin {
    font-family: 'Karla', system-ui, sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.5rem;
    border-radius: 2px;
}

.npb-buyin--on {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.npb-buyin--off {
    background: #f9fafb;
    color: #9ca3af;
    border: 1px solid #e5e7eb;
    text-decoration: line-through;
}

/* --- Footer: PDGA code + actions --- */
.npb-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.125rem;
    flex-wrap: wrap;
}

/* --- PDGA badge --- */
.npb-pdga {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    text-decoration: none;
    color: var(--theme-text-primary, #111827);
    padding: 0.25rem 0.5rem;
    border: 1px solid #93c5fd;
    border-radius: 3px;
    background: #eff6ff;
}

.npb-pdga:hover {
    background: #dbeafe;
    text-decoration: none;
    color: var(--theme-text-primary, #111827);
}

.npb-pdga-icon {
    height: 18px;
    width: auto;
}

.npb-pdga-label {
    font-family: 'Karla', system-ui, sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--theme-text-muted, #6b7280);
}

.npb-pdga-code {
    font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #1d4ed8;
    background: transparent;
    padding: 0;
}

/* --- Action links --- */
.npb-actions {
    display: flex;
    gap: 0.125rem;
}

.npb-action {
    font-family: 'Karla', system-ui, sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.625rem;
    border: 1px solid var(--theme-border-color, #d1d5db);
    border-radius: 3px;
    background: transparent;
    color: var(--theme-text-secondary, #374151);
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}

.npb-action:hover {
    background: var(--theme-text-primary, #111827);
    color: #fff;
    border-color: var(--theme-text-primary, #111827);
    text-decoration: none;
}

.npb-action--primary {
    background: var(--theme-text-primary, #111827);
    color: #fff;
    border-color: var(--theme-text-primary, #111827);
}

.npb-action--primary:hover {
    opacity: 0.85;
    color: #fff;
}

/* --- Empty state --- */
.npb-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--theme-text-muted, #6b7280);
    font-size: 0.85rem;
}

.npb-empty p {
    margin: 0 0 0.75rem;
}

/* ==========================================================================
   Dark Mode
   ========================================================================== */

[data-bs-theme="dark"] .npb-heading {
    border-bottom-color: #374151;
}

[data-bs-theme="dark"] .npb-event {
    border-color: #374151;
}

[data-bs-theme="dark"] .npb-event--today {
    border-top-color: #f87171;
}

[data-bs-theme="dark"] .npb-day--today {
    color: #f87171;
}

[data-bs-theme="dark"] .npb-buyin--on {
    background: rgba(16, 185, 129, 0.12);
    color: #6ee7b7;
    border-color: rgba(16, 185, 129, 0.25);
}

[data-bs-theme="dark"] .npb-buyin--off {
    background: rgba(255, 255, 255, 0.04);
    color: #4b5563;
    border-color: #374151;
}

/* PDGA badge always renders in light mode (contractual branding) */
[data-bs-theme="dark"] .npb-pdga {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #111827;
}

[data-bs-theme="dark"] .npb-pdga:hover {
    background: #dbeafe;
    color: #111827;
}

[data-bs-theme="dark"] .npb-pdga-label {
    color: #6b7280;
}

[data-bs-theme="dark"] .npb-pdga-code {
    color: #1d4ed8;
}

[data-bs-theme="dark"] .npb-action {
    border-color: #4b5563;
    color: #d1d5db;
}

[data-bs-theme="dark"] .npb-action:hover {
    background: #e5e7eb;
    color: #111827;
    border-color: #e5e7eb;
}

[data-bs-theme="dark"] .npb-action--primary {
    background: #e5e7eb;
    color: #111827;
    border-color: #e5e7eb;
}

[data-bs-theme="dark"] .npb-action--primary:hover {
    opacity: 0.85;
    color: #111827;
}

/* ==========================================================================
   Mobile
   ========================================================================== */

@media (max-width: 640px) {
    .npb-primary {
        flex-direction: column;
        gap: 0.125rem;
    }

    .npb-when {
        min-width: 0;
    }

    .npb-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .npb-pdga {
        justify-content: center;
    }

    .npb-actions {
        justify-content: stretch;
    }

    .npb-action {
        flex: 1;
        text-align: center;
    }

    .npb-list {
        grid-template-columns: 1fr;
    }
}
