/* V325.3: media, category and header layout compatibility fixes. */

.du-userbar__top {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
}

.du-userbar__greeting {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    min-height: 28px;
    padding: 0 4px;
    white-space: nowrap;
}

.du-userbar__actions {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.du-userbar__actions > .btn,
.du-userbar__actions > notification-center,
.du-userbar__actions > .du-preference-switchers {
    margin: 0 !important;
}

.du-userbar__metrics {
    width: 100%;
}

.categoryImage.du-category-icon {
    display: inline-block !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    max-width: 44px !important;
    max-height: 44px !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-size: contain !important;
    vertical-align: middle;
}

.du-torrent-table .category-cell,
.du-torrent-table .torrentCategoryPart {
    width: 52px !important;
    min-width: 52px !important;
    text-align: center;
    vertical-align: middle;
}

.du-torrent-hero.du-torrent-hero--detail.col-md-11.col-centered {
    box-sizing: border-box;
    float: none !important;
    width: calc(100% - 24px) !important;
    max-width: 1170px;
    margin-right: auto !important;
    margin-left: auto !important;
}

.du-torrent-hero--detail .du-torrent-hero__main,
.du-torrent-hero--detail .torrentRow,
.du-torrent-hero--detail .torrent-main {
    min-width: 0;
    max-width: 100%;
}

.du-torrent-detail-table,
.du-torrent-details table {
    box-sizing: border-box;
    width: 100% !important;
    max-width: 100%;
    table-layout: fixed;
}

.du-torrent-detail-table td,
.du-torrent-details table td {
    overflow-wrap: anywhere;
}

@media (max-width: 767px) {
    .du-userbar__top {
        display: block;
    }

    .du-userbar__greeting {
        width: 100%;
        margin-bottom: 6px;
    }

    .du-userbar__actions {
        width: 100%;
    }

    .du-torrent-hero.du-torrent-hero--detail.col-md-11.col-centered {
        width: 100% !important;
    }

    .du-torrent-detail-table,
    .du-torrent-details table {
        table-layout: auto;
    }
}

/* V325.4: keep torrent detail indicators at their pre-V314 sizing. */
.dataup-app .du-torrent-detail-v88 .label {
    display: inline;
    min-height: 0;
    padding: .2em .6em .3em;
    gap: 0;
    overflow: visible;
    font-size: 11px !important;
    font-weight: 700;
    line-height: 1;
    vertical-align: baseline;
}

.dataup-app .du-torrent-detail-v88 .badge {
    display: inline-block;
    min-width: 10px;
    min-height: 0;
    padding: 3px 7px;
    gap: 0;
    overflow: visible;
    font-size: 11px !important;
    font-weight: 700;
    line-height: 1;
    vertical-align: baseline;
}

.dataup-app .du-torrent-detail-v88 .du-count-badge {
    display: inline-flex;
    min-width: 28px;
    min-height: 24px;
    padding: 3px 7px;
    font-size: 11px !important;
    line-height: 1.25;
    vertical-align: middle;
}

.dataup-app .du-torrent-detail-v88 .torrent-label {
    min-height: 0;
    padding: .2em .6em .3em;
}

.dataup-app .du-torrent-detail-v88 .progress {
    height: 20px;
    margin: 0 0 20px;
    border-radius: 4px;
}

.dataup-app .du-torrent-detail-v88 .progress-bar {
    display: block;
    height: 100%;
    overflow: visible;
    font-size: 11px;
    font-weight: 400;
    line-height: 20px;
}

@media (max-width: 767px) {
    .dataup-app .du-torrent-detail-v88 .label,
    .dataup-app .du-torrent-detail-v88 .badge,
    .dataup-app .du-torrent-detail-v88 .du-count-badge {
        font-size: 11px !important;
    }
}
