/* Fancy Index Styles */
#mirror-list {
    margin-top: 20px;
}

#list {
    margin-top: 20px;
}

/* Remove top padding for fancy index pages */
body:has(#list) {
    padding-top: 0 !important;
}

/* Fallback for browsers that don't support :has() */
.fancy-index-page {
    padding-top: 0 !important;
}

/* Ensure header displays correctly on fancy index pages */
.fancy-index-page .header {
    position: relative !important;
    transform: none !important;
    top: 0 !important;
}

#list tbody td {
    font-family: 'Fira Code Retina', 'Fira Code', 'Fira Mono', 'JetBrains Mono', 'Source Code Pro', 'Consolas', 'Menlo', 'Monaco', monospace;
    vertical-align: middle;
}

#path {
    font-family: 'Fira Code Retina', 'Fira Code', 'Fira Mono', 'JetBrains Mono', 'Source Code Pro', 'Consolas', 'Menlo', 'Monaco', monospace;
    color: #0A77FF;
}

#list tbody tr td:first-child a i {
    width: 16px;
    text-align: center;
    margin-right: 8px;
}

/* Responsive layout for fancy index header */
.vbottom {
    display: inline-block;
    vertical-align: bottom;
    float: none;
}

.text-right-md {
    text-align: right;
}

@media (max-width: 768px) {
    .text-right-md {
        text-align: left !important;
    }
    
    .text-left-xs {
        text-align: left;
    }
}

/* Mirror status labels in fancy index */
.label {
    display: inline;
    padding: .2em .6em .3em;
    font-size: 75%;
    font-weight: bold;
    line-height: 1;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: .25em;
}

.label-status {
    margin-left: 10px;
}

.label-success {
    background-color: #5cb85c;
}

.label-warning {
    background-color: #f0ad4e;
}

.label-danger {
    background-color: #d9534f;
}

.label-info {
    background-color: #5bc0de;
}

.label-default {
    background-color: #777;
}

/* Hidden on extra small screens */
@media (max-width: 767px) {
    .hidden-xs {
        display: none !important;
    }
}

/* Sticky header for fancy index */
.fancy-index-header {
    position: sticky;
    top: 0;
    z-index: 1020;
    background-color: #fff;
    border-bottom: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.back-to-top.show {
    opacity: 0.8;
    visibility: visible;
}

.back-to-top:hover {
    opacity: 1;
    background-color: #0056b3;
    transform: translateY(-2px);
}
