.video-embed {
    max-width: 1550px;
}

.video-card .mud-card-media {
    object-fit: cover;
}

.mud-text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.5em;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

/* YouTube-style UI */

.yt-appbar {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.yt-drawer {
    border-right: 1px solid rgba(0, 0, 0, 0.1);
}

.yt-duration-badge {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    font-size: 12px;
    border-radius: 4px;
    padding: 2px 4px;
    line-height: 1;
}

.yt-thumbnail-container {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 12px;
}

.yt-thumbnail-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.video-card-yt:hover .yt-thumbnail-container img {
    transform: scale(1.02);
}

.yt-chip-bar {
    position: sticky;
    top: 0;
    overflow-x: auto;
    white-space: nowrap;
    padding: 8px 0;
    z-index: 1;
}

.yt-description {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.yt-description.expanded {
    -webkit-line-clamp: unset;
}

.yt-channel-banner {
    height: 120px;
    background: linear-gradient(135deg, #00897B, #26A69A);
    border-radius: 12px;
}

.yt-search-container {
    max-width: 500px;
    width: 100%;
}

/* Hide top channels section when drawer is in mini/collapsed state */
.mud-drawer--closed .yt-drawer-expanded-only,
.mud-drawer-mini .yt-drawer-expanded-only {
    display: none;
}

.mud-drawer--open .yt-drawer-expanded-only {
    display: block;
}

/* Ensure main content clears the fixed AppBar */
.mud-main-content {
    padding-top: 80px !important;
}

/* Space between channel banner and page content */
.yt-channel-banner-wrapper {
    margin-bottom: 16px;
}
