/* ==========================================================================
   META DASHBOARD - STYLISTYKA I WIDOK (IZOLOWANE OD style.css)
   ========================================================================== */

.item-name-wrapper { display: flex; align-items: center; gap: 8px; overflow: hidden; }
.item-icon { width: 24px; height: 24px; border-radius: 2px; background-color: #111; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5)); flex-shrink: 0; }
.item-icon-placeholder { width: 24px; height: 24px; border-radius: 2px; background-color: transparent; flex-shrink: 0; }

.rarity-0 { color: var(--text-muted) !important; }
.rarity-1 { color: #8888ff !important; }
.rarity-2 { color: #ffff77 !important; }
.rarity-3 { color: #af6025 !important; font-weight: bold; }
.rarity-4 { color: #1aa29b !important; }
.rarity-5 { color: #aa9e82 !important; }
.rarity-6 { color: #1aa29b !important; }
.rarity-7 { color: #00ff00 !important; }

.search-input { width: 100%; box-sizing: border-box; padding: 10px 14px; background: rgba(15,23,42,0.6); border: 1px solid var(--border-color); border-radius: 4px; color: var(--text-bright); outline: none; font-size: 13px; transition: border-color 0.2s; }
.search-input:focus { border-color: var(--accent-blue); }

.equip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.equip-card { background: rgba(15, 23, 42, 0.4); border: 1px solid var(--border-color); border-radius: 6px; padding: 14px; }
.equip-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 8px; }
.equip-card-header .sub-section-title { margin: 0; border: none; padding: 0; }

.corrupted-badge { font-size: 10px; font-weight: bold; background: rgba(220, 38, 38, 0.15); color: #fca5a5; padding: 2px 6px; border-radius: 4px; border: 1px solid rgba(220, 38, 38, 0.3); }
.equip-sub-label { font-size: 10px; color: var(--text-dark); text-transform: uppercase; margin-bottom: 6px; letter-spacing: 0.5px; }
.empty-data { font-size: 12px; color: var(--text-dark); font-style: italic; }

.mod-row { background: rgba(0,0,0,0.2) !important; border-color: rgba(255,255,255,0.05) !important; }
.mod-row .ninja-name { color: var(--text-muted) !important; font-size: 11px; }
.mod-bar { background: rgba(168, 85, 247, 0.08) !important; border-right-color: rgba(168, 85, 247, 0.4) !important; }
.mod-row .ninja-pct { color: var(--accent-blue); }

.class-selector-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; width: 100%; }
.class-tile { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 6px; font-size: 12px; font-weight: 500; text-decoration: none; color: var(--text-muted); transition: all 0.2s; }
.class-tile:hover, .class-tile.active { border-color: var(--accent-blue); background: #1c212e; color: var(--text-bright); }
.class-tile.disabled { opacity: 0.3; cursor: not-allowed; pointer-events: none; filter: grayscale(100%); }

.bracket-tabs { display: flex; gap: 6px; }
.bracket-btn { text-decoration: none; display: inline-block; background: rgba(15,23,42,0.6); border: 1px solid var(--border-color); color: var(--text-muted); padding: 4px 10px; font-size: 11px; border-radius: 4px; cursor: pointer; transition: all 0.2s; }
.bracket-btn:hover:not(.disabled) { background: rgba(255,255,255,0.05); color: var(--text-bright); }
.bracket-btn.active { background: #1c212e; border-color: var(--accent-blue); color: var(--accent-blue); font-weight: bold; }
.bracket-btn.disabled { opacity: 0.3; cursor: not-allowed; }

.meta-dashboard { width: 100%; max-width: 1000px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.split-layout { display: grid; grid-template-columns: 260px 1fr; gap: 16px; width: 100%; align-items: start; }

.vertical-menu { display: flex; flex-direction: column; gap: 2px; max-height: 700px; overflow-y: auto; padding-right: 4px; }
.vertical-menu::-webkit-scrollbar { width: 6px; }
.vertical-menu::-webkit-scrollbar-track { background: rgba(15, 23, 42, 0.2); border-radius: 4px; }
.vertical-menu::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }
.vertical-menu::-webkit-scrollbar-thumb:hover { background: var(--accent-blue); }

.skill-menu-item { border: 1px solid transparent; border-left: 4px solid transparent; border-radius: 4px; color: var(--text-muted); font-size: 13px; padding: 6px 8px; transition: all 0.2s; display: flex; align-items: center; cursor: pointer; }
.skill-menu-item:hover { background: #1c212e; border-left-color: var(--accent-blue-hover); color: var(--text-bright); }
.skill-menu-item.is-active { background: #1c212e; border: 1px solid var(--border-color); border-left: 4px solid var(--accent-blue); color: var(--text-bright); }
.skill-count { font-size: 11px; color: var(--text-dark); background: rgba(255,255,255,0.03); padding: 2px 6px; border-radius: 10px; flex-shrink: 0; }
.skill-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }

.analytic-header { padding: 16px 20px; }
.skill-title { font-size: 24px; color: var(--text-bright); margin: 0; font-weight: 700; }
.class-sub { color: var(--accent-blue); font-size: 16px; font-weight: 500; }
.cohort-info { font-size: 12px; color: var(--text-dark); margin: 4px 0 0 0; }

.analytics-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border-color); padding-bottom: 12px; margin-bottom: 16px; }
.tab-btn { background: transparent; border: 1px solid var(--border-color); border-radius: 4px; padding: 8px 16px; color: var(--text-muted); font-size: 13px; font-weight: 500; cursor: pointer; transition: all 0.2s; }
.tab-btn:hover { background: rgba(255,255,255,0.02); color: var(--text-bright); }
.tab-btn.active { background: #1c212e; border-color: var(--accent-blue); color: var(--accent-blue); }

.sub-section-title { font-size: 12px; text-transform: uppercase; color: var(--text-muted); margin: 0 0 12px 0; letter-spacing: 0.5px; }

.skills-ecosystem-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.gem-link-group { background: rgba(15, 23, 42, 0.3); border: 1px solid var(--border-color); border-radius: 6px; padding: 8px; }
.active-gem-row { border-color: rgba(255,255,255,0.1); background: rgba(0,0,0,0.4); box-shadow: 0 4px 6px rgba(0,0,0,0.2); z-index: 2; }
.support-gems-container { padding-left: 20px; margin-top: 4px; display: flex; flex-direction: column; gap: 2px; position: relative; }
.support-gem-row { background: transparent; border: none; height: 26px; }
.support-gem-row:hover { background: rgba(255,255,255,0.03); }
.link-connector { color: var(--border-color); font-size: 14px; margin-right: 4px; padding-bottom: 4px; font-weight: bold; flex-shrink: 0; }
.support-pct { font-size: 11px; font-weight: normal; color: var(--text-muted); }

.meta-right-actions { display: flex; align-items: center; gap: 8px; z-index: 5; flex-shrink: 0; }
.quick-trade-btn { color: var(--text-muted); display: flex; align-items: center; transition: color 0.2s; }
.quick-trade-btn:hover { color: #4ade80; }
.overcap-help { display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 14px; border-radius: 50%; background: rgba(255,255,255,0.1); color: var(--text-muted); font-size: 10px; cursor: help; margin-left: 4px; }
.overcap-help:hover { background: var(--accent-blue); color: #fff; }

.ninja-row { position: relative; background: rgba(15, 23, 42, 0.6); border: 1px solid var(--border-color); border-radius: 4px; overflow: hidden; height: 34px; display: flex; align-items: center; border-left: 4px solid transparent; transition: all 0.15s; box-sizing: border-box; }
.ninja-row.skill-hover { cursor: help; }
.ninja-row.small { height: 28px; margin-bottom: 4px; }
.ninja-bar { position: absolute; top: 0; left: 0; bottom: 0; background: rgba(43, 166, 222, 0.08); border-right: 2px solid rgba(43, 166, 222, 0.4); z-index: 1; transition: width 0.3s ease; }
.ninja-meta { position: relative; z-index: 2; width: 100%; display: flex; justify-content: space-between; padding: 0 14px; font-size: 13px; color: var(--text-main); font-weight: 500; box-sizing: border-box; }
.ninja-row.small .ninja-meta { font-size: 12px; padding: 0 10px; }
.ninja-pct { color: var(--accent-blue); font-weight: bold; display: flex; align-items: center; }
.ninja-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.hidden { display: none !important; }
.disclaimer-text { font-size: 11px; font-style: italic; color: var(--text-dark); margin-bottom: 16px; line-height: 1.4; border-left: 2px solid var(--accent-blue); padding-left: 8px; }

/* ==========================================================================
   HEATMAP LAYOUT STYLES & PASSIVE EXPAND LOGIC (Lista ułożona pod Canvasem)
   ========================================================================== */

.passives-list-column { 
    display: flex !important; 
    flex-direction: column !important; 
    width: 100% !important;
    gap: 6px;
    padding-right: 8px; 
    box-sizing: border-box;
    overflow-x: hidden;
}

.passives-list-column::-webkit-scrollbar { width: 6px; }
.passives-list-column::-webkit-scrollbar-track { background: rgba(15, 23, 42, 0.2); border-radius: 4px; }
.passives-list-column::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }

.passives-list-column .ninja-row { 
    width: 100% !important; 
    display: flex !important; 
    flex-direction: column !important;
    flex: none !important; 
    height: auto !important;
    min-height: 34px !important;
    cursor: pointer;
}

.passives-list-column .ninja-meta {
    height: 34px;
    align-items: center;
}

.passive-details {
    display: none;
    padding: 6px 14px 14px 46px; 
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.4;
    width: 100%;
    box-sizing: border-box;
    border-top: 1px dashed rgba(255,255,255,0.05);
    background: rgba(0,0,0,0.2);
    z-index: 2;
    position: relative;
}

.ninja-row.route-selected { 
    background: #1c212e !important; 
    border: 1px solid var(--border-color) !important; 
    border-left: 4px solid var(--accent-blue) !important; 
}
.ninja-row.route-selected .passive-details { display: block; }

.passive-details-tags { color: var(--text-muted); text-transform: uppercase; font-size: 10px; margin-bottom: 6px; font-weight: bold; letter-spacing: 0.5px; }
.passive-details-desc { font-style: italic; margin-bottom: 8px; color: var(--text-dark); }
.passive-details-stats { color: var(--accent-blue); margin-bottom: 12px; font-weight: 500; }
.passive-details-links a { color: var(--text-muted); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; transition: color 0.2s; background: rgba(0,0,0,0.3); padding: 4px 10px; border-radius: 4px; border: 1px solid var(--border-color); }
.passive-details-links a:hover { color: var(--text-bright); border-color: var(--accent-blue); }

.deselect-hint { display: none; color: #f87171; font-size: 11px; font-weight: bold; background: rgba(248, 113, 113, 0.1); padding: 3px 8px; border-radius: 4px; border: 1px solid rgba(248,113,113,0.3); transition: all 0.2s; }
.deselect-hint:hover { background: rgba(248, 113, 113, 0.2); color: #fca5a5; }
.ninja-row.route-selected .pct-data { display: none; }
.ninja-row.route-selected .deselect-hint { display: inline-flex; align-items: center; justify-content: center; }

/* CANVAS CZARNE TŁO I POPRAWNE KOLORY WIDOKU */
.passives-canvas-wrapper { background: #000000; border: 1px solid var(--border-color); border-radius: 6px; position: relative; overflow: hidden; }
#heatmap-canvas { width: 100%; height: 100%; cursor: crosshair; }

.canvas-meta-topbar { position: absolute; top: 0; left: 0; right: 0; height: 42px; background: rgba(24, 29, 40, 0.85); border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; padding: 0 16px; z-index: 10; pointer-events: none; backdrop-filter: blur(4px); }
.canvas-overlay-text { color: var(--text-muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
.canvas-live-title { color: var(--text-bright); font-size: 14px; font-weight: bold; }

@media (max-width: 900px) {
    .passives-canvas-wrapper { height: 350px; }
    .passives-list-column { max-height: 350px; }
    .split-layout { grid-template-columns: 1fr; }
    .equip-grid { grid-template-columns: 1fr; }
    .analytic-header { flex-direction: column; gap: 12px; }
}