/* Badge container - make links with badges flex containers */
table a:has(.badge-left),
table a:has(.badge-only) {
    display: inline-flex;
    align-items: stretch;
    width: 100%;
}

/* Badge styles for download buttons */
.badge-left,
.badge-right,
.badge-only {
    display: inline-block;
    padding: 6px 12px;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    transition: all 0.2s ease;
    margin: 0.2rem 0rem;
    text-transform: uppercase;
}

/* Left part of the badge - stretches to fill available space */
.badge-left {
    background-color: #555;
    color: #fff;
    border-radius: 4px 0 0 4px;
    border-right: 1px solid rgba(0, 0, 0, 0.1);
    flex: 1 1 auto;
    min-width: 0;
}

/* Right part of the badge - stays compact */
.badge-right {
    background-color: #007ec6;
    color: #fff;
    border-radius: 0 4px 4px 0;
    margin-left: -4px;
    flex: 0 0 auto;
}

/* Single badge (no split) */
.badge-only {
    background-color: #6c757d;
    color: #fff;
    border-radius: 4px;
    width: 100%;
}

/* Remove underline from links containing badges */
a:has(.badge-left),
a:has(.badge-right),
a:has(.badge-only) {
    text-decoration: none !important;
}

/* Hover effect for entire badge link */
a:hover .badge-left {
    background-color: #444;
}

a:hover .badge-right {
    background-color: #0066a1;
}

a:hover .badge-only {
    background-color: #5a6268;
}

/* Ensure badges are inline */
a .badge-left + .badge-right {
    display: inline-block;
}

/* Mobile responsive */
@media screen and (max-width: 768px) {
    .badge-left,
    .badge-right,
    .badge-only {
        font-size: 12px;
        padding: 5px 10px;
    }
}

