/* assets/css/qb_lab.css
   ============================================================
   QB Lab: Season / Career / Head-to-Head
   Uses the same dark palette as the rest of the Gamecenter
   (#0a0f1d background, #00e5ff cyan accent). Swap the hardcoded
   hex values below for your existing CSS variables if you'd
   rather keep one source of truth (e.g. var(--accent-color)).
   ============================================================ */

.qblab-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
    color: #e5e9f0;
}

.qblab-container h2 {
    color: #fff;
    margin-bottom: 20px;
}

.qblab-instruction-box {
    background: #0e1422;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 20px;
    color: #cbd5e1;
    font-size: 0.88rem;
    line-height: 1.6;
}

.qblab-instruction-box strong {
    color: #00e5ff;
}

/* --- Mode switcher tabs --- */
.qblab-mode-switcher {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
}

.qblab-mode-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #cbd5e1;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
}

.qblab-mode-btn.active {
    background: #00e5ff;
    color: #04101c;
    border-color: #00e5ff;
}

/* --- Player + season selectors --- */
.qblab-selector-bar {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.qblab-selector-bar .select-group,
.qblab-mode-controls {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.qblab-selector-bar label,
.qblab-mode-controls label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
    font-weight: 700;
}

.qblab-selector-bar select,
.qblab-mode-controls select {
    background: #131a2b;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 8px 10px;
    min-width: 220px;
}

/* --- Utility row (Reset / Copy Link) --- */
.qblab-utility-row {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}

.qblab-utility-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #94a3b8;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
}

.qblab-utility-btn:hover {
    color: #fff;
    border-color: #00e5ff;
}

/* --- Searchable combobox (QB1 / QB2) --- */
.qblab-combo {
    position: relative;
    min-width: 220px;
}

.qblab-combo-input {
    width: 100%;
    background: #131a2b;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 8px 10px;
    box-sizing: border-box;
    font-size: 0.9rem;
}

.qblab-combo-input:disabled {
    color: #64748b;
    cursor: not-allowed;
}

.qblab-combo-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 260px;
    overflow-y: auto;
    background: #131a2b;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    z-index: 50;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.qblab-combo-dropdown.open {
    display: block;
}

.qblab-combo-option {
    padding: 8px 10px;
    font-size: 0.88rem;
    color: #e5e9f0;
    cursor: pointer;
}

.qblab-combo-option:hover {
    background: rgba(0, 229, 255, 0.12);
}

.qblab-combo-empty {
    padding: 8px 10px;
    font-size: 0.85rem;
    color: #64748b;
}

.qblab-mode-controls {
    margin-bottom: 20px;
}

/* --- Career scope toggle --- */
.qblab-scope-toggle {
    display: flex;
    gap: 6px;
}

.scope-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #cbd5e1;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
}

.scope-btn.active {
    background: #9d4edd;
    color: #fff;
    border-color: #9d4edd;
}

/* --- Top recurring matchups chips --- */
.qblab-section-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
    margin-bottom: 8px;
}

.qblab-matchup-chip {
    background: #131a2b;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #e5e9f0;
    padding: 6px 12px;
    border-radius: 20px;
    margin: 0 6px 6px 0;
    cursor: pointer;
    font-size: 0.85rem;
}

.qblab-matchup-chip .count {
    color: #00e5ff;
    margin-left: 6px;
    font-weight: 700;
}

/* --- Empty state --- */
.qblab-empty {
    padding: 40px 20px;
    text-align: center;
    color: #64748b;
}

/* --- Comparison table (Season / Career / H2H summary) --- */
.qblab-compare-block {
    background: #0e1422;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px;
    margin-top: 10px;
}

.qblab-compare-table {
    width: 100%;
    border-collapse: collapse;
}

.qblab-compare-table th {
    text-align: center;
    padding: 6px 10px 18px;
}

.qblab-logo-row img {
    height: 64px;
    width: 64px;
    object-fit: contain;
    margin: 0 4px;
    background: #fff;
    border-radius: 50%;
    padding: 8px;
    box-shadow: 0 4px 16px rgba(0, 229, 255, 0.25);
}

.qblab-qb-name {
    font-weight: 800;
    color: #fff;
    margin-top: 8px;
    font-size: 1.05rem;
}

.qblab-compare-table td {
    padding: 6px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.9rem;
}

.qblab-section td {
    color: #00e5ff;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    border-bottom: none;
    padding-top: 14px;
    text-align: center;
}

.qblab-stat-label {
    text-align: center;
    color: #94a3b8;
    width: 40%;
}

.qblab-val {
    text-align: center;
    font-weight: 700;
    color: #e5e9f0;
    width: 30%;
}

.qblab-better {
    color: #00e5ff;
}

/* --- Head-to-head hero header (also the exported image) --- */
.qblab-h2h-summary {
    position: relative;
}

.qblab-hero-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 50px;
    margin-bottom: 10px;
    padding: 10px 0 20px;
}

.qblab-hero-side {
    text-align: center;
}

.qblab-hero-name {
    font-weight: 800;
    color: #fff;
    margin: 8px 0 4px;
    font-size: 1.1rem;
}

.qblab-win-number {
    font-size: 2.4rem;
    font-weight: 900;
    color: #fff;
}

.qblab-win-label {
    color: #94a3b8;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.qblab-hero-center {
    text-align: center;
}

.qblab-hero-title {
    font-weight: 900;
    font-size: 1rem;
    letter-spacing: 1px;
    color: #fff;
}

.qblab-hero-title span {
    color: #38bdf8;
}

.qblab-matchup-count {
    color: #94a3b8;
    font-size: 0.8rem;
    margin-top: 4px;
}

/* Hidden on the live page, shown only while html2canvas captures the
   export - same approach as the old downloadHero() pattern. */
.qblab-export-watermark {
    display: none;
    position: absolute;
    bottom: 8px;
    right: 14px;
    height: 26px;
    opacity: 0.85;
}

/* --- Export controls --- */
.qblab-export-controls {
    text-align: center;
    margin: 20px 0;
}

.qblab-export-controls button {
    background: #00e5ff;
    color: #04101c;
    border: none;
    padding: 10px 22px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
}

/* --- Game cards (H2H) --- */
.qblab-game-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.qblab-game-card {
    background: #0e1422;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px 18px;
}

.qblab-game-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.qblab-game-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.qblab-team-block {
    flex: 1;
    text-align: center;
}

.qblab-team-block img {
    height: 56px;
    width: 56px;
    object-fit: contain;
    margin-bottom: 8px;
    background: #fff;
    border-radius: 50%;
    padding: 7px;
    box-shadow: 0 4px 14px rgba(0, 229, 255, 0.2);
}

.qblab-card-player {
    font-weight: 800;
    color: #fff;
    margin-bottom: 4px;
}

.qblab-card-line {
    font-size: 0.78rem;
    color: #94a3b8;
}

.qblab-score-pill {
    background: #131a2b;
    border-radius: 10px;
    padding: 8px 16px;
    font-weight: 900;
    font-size: 1.2rem;
    color: #fff;
    flex-shrink: 0;
}
