/* Nagłówek i triggery zakładek */
.main-tabs { 
    display: flex; 
    gap: 10px; 
    margin-bottom: 20px; 
    border-bottom: 2px solid #e2e8f0; 
    padding-bottom: 0; 
    overflow-x: auto; 
    flex-shrink: 0; 
}

.tab-trigger { 
    padding: 12px 15px; 
    border: none; 
    background: none; 
    cursor: pointer; 
    font-weight: bold; 
    color: #64748b; 
    border-bottom: 3px solid transparent; 
    transition: 0.2s; 
    white-space: nowrap; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
}

.tab-trigger.active { 
    color: var(--ec-blue); 
    border-bottom-color: var(--ec-blue); 
}

/* Panele zakładek */
.tab-pane { 
    display: none; 
    animation: fadeIn 0.3s ease; 
}

.tab-pane.active { 
    display: flex !important; 
    flex-direction: column; 
    flex-grow: 1; 
    min-height: 0; /* Kluczowe dla działania wewnętrznych scrolli */
}

/* Wymuszenie na kartach wewnątrz zakładek wypełniania wysokości */
.tab-pane.active > .card, 
.tab-pane.active > div.card {
    flex-grow: 1;
    margin-bottom: 0 !important;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* --- LISTA IP I SCROLL --- */
.ip-scroll-container {
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 0;
    padding-right: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Personalizacja paska przewijania (Chrome/Safari/Edge) */
.ip-scroll-container::-webkit-scrollbar { width: 6px; }
.ip-scroll-container::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
.ip-scroll-container::-webkit-scrollbar-track { background: #f1f5f9; }

/* --- PRZYCISK USUWANIA IP (Wersja A) --- */
.delete-ip-btn {
    background: none;
    border: none;
    color: #cbd5e1; /* Dyskretny szary domyślnie */
    cursor: pointer;
    font-size: 1rem;
    padding: 6px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.delete-ip-btn:hover {
    background-color: #fee2e2; /* Jasnoczerwone tło po najechaniu */
    color: #ef4444;           /* Czerwony kolor ikony kosza */
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* --- WIDOK MOBILNY (Poniżej 768px) --- */
@media (max-width: 768px) {
    /* Ukrywanie tekstu w zakładkach (zostają same piktogramy) */
    .tab-trigger span {
        display: none;
    }
    
    .tab-trigger {
        padding: 12px 20px;
        font-size: 1rem;
        justify-content: center;
        flex: 1;
    }

    .main-tabs {
        gap: 0;
    }

    /* Zmniejszenie wysokości animacji w zakładce "O nas" o połowę */
    #tab-about .card div[style*="height: 260px"] {
        height: 130px !important;
    }

    #compilationCanvas {
        max-height: 130px !important;
    }
}
