/* Custom CSS to distinguish between Python, C++, and CUDA files */

/* Add colored badges based on file extension */

/* Python files - Green badge */
a[href*=".py.html"]:after,
a[href*=".pyw.html"]:after {
    content: " [Python]";
    background-color: #3776ab;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
    margin-left: 8px;
    text-decoration: none;
}

/* CUDA files - Purple/Magenta badge */
a[href*=".cu.html"]:after,
a[href*=".cuh.html"]:after {
    content: " [CUDA]";
    background-color: #76b900;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
    margin-left: 8px;
    text-decoration: none;
}

/* C++ files - Blue badge */
a[href*=".cpp.html"]:after,
a[href*=".cc.html"]:after,
a[href*=".cxx.html"]:after {
    content: " [C++]";
    background-color: #659ad2;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
    margin-left: 8px;
    text-decoration: none;
}

/* C++ header files - Light Blue badge */
a[href*=".h.html"]:after,
a[href*=".hpp.html"]:after,
a[href*=".hxx.html"]:after {
    content: " [C++ Header]";
    background-color: #89b4d8;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
    margin-left: 8px;
    text-decoration: none;
}

/* Namespace badges for Python modules */
a[href*="namespacepy"]:before {
    content: "🐍 ";
    font-size: 14px;
}

/* File icons enhancement */
.icondoc {
    position: relative;
}

/* Add background highlight to file rows based on extension */
tr:has(a[href*=".py.html"]) {
    background-color: rgba(55, 118, 171, 0.05);
}

tr:has(a[href*=".cu.html"]),
tr:has(a[href*=".cuh.html"]) {
    background-color: rgba(118, 185, 0, 0.05);
}

tr:has(a[href*=".cpp.html"]),
tr:has(a[href*=".cc.html"]) {
    background-color: rgba(101, 154, 210, 0.05);
}

/* Legend/Key at the top of file list */
.header {
    position: relative;
}

/* Add a legend box */
#file-legend {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px 15px;
    margin: 15px 0;
    font-size: 13px;
}

#file-legend h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #333;
}

#file-legend .legend-item {
    display: inline-block;
    margin-right: 20px;
    margin-bottom: 5px;
}

#file-legend .badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-weight: bold;
    color: white;
    font-size: 11px;
    margin-right: 5px;
}

#file-legend .badge-python {
    background-color: #3776ab;
}

#file-legend .badge-cuda {
    background-color: #76b900;
}

#file-legend .badge-cpp {
    background-color: #659ad2;
}

#file-legend .badge-header {
    background-color: #89b4d8;
}

/* Enhance readability of file paths */
.directory .levels {
    font-family: 'Courier New', monospace;
}

