/*
Theme Name: StreamTube Child
Description: Video WordPress Theme.
Author: phpface
Theme URI: https://1.envato.market/qny3O5
Author URI: https://1.envato.market/mgXE4y
Version: 1.0.0
Requires at least: 5.3
Tested up to: 5.8
Requires PHP: 5.6
License: Themeforest Licence
License URI: http://themeforest.net/licenses
Text Domain: streamtube-child
Template: streamtube
Tags: two-columns, one-column, custom-menu, custom-logo, featured-images, rtl-language-support, sticky-post, threaded-comments, translation-ready
*/

/* Remove left padding for post content */
.single-body .post-bottom__author + .post-bottom__content .post-content {
    padding-left: 0;
}

/* Hide all author meta and avatar */
.post-meta__author,
.post-avatar,
a[href*="/author/"] {
    display: none !important;
    visibility: hidden !important;
}

/* ===== 16:9 FRAME FOR PLYR AND THEME OVERRIDE ===== */
/* Override theme 21:9 ratio - use only aspect-ratio */
.player-wrapper-ratio.ratio-21x9,
.player-embed.ratio-21x9 {
    aspect-ratio: 16/9 !important;
    padding-bottom: 0 !important; /* Important: remove bottom padding */
    min-height: auto !important;
}

/* Remove default bottom padding of theme */
.player-wrapper-ratio.ratio-21x9::before,
.player-embed.ratio-21x9::before {
    padding-top: 0 !important;
    content: none !important;
}

/* Ensure Plyr displays correct 16:9 ratio */
.plyr--youtube .plyr__video-wrapper,
.plyr--youtube .plyr__video-embed,
.plyr--video .plyr__video-wrapper {
    aspect-ratio: 16/9 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    background: #000 !important;
}

/* Fix container to prevent layout shifting */
.player-container,
.player-embed-inner {
    height: auto !important;
    position: relative !important;
}

/* ===== OVERLAY AND FLOATING PLAY BUTTON ===== */
.plyr {
    position: relative;
}

.plyr-overlay-paused {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    z-index: 1; /* Under Plyr play button */
    opacity: 0;
    transition: all 0.4s ease;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.plyr-paused .plyr-overlay-paused {
    opacity: 1;
    pointer-events: auto; /* Enable interaction when visible */
}

/* Large overlay play button - visible when paused */
.plyr-overlay-paused::before {
    content: "";
    position: absolute;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    z-index: 2;
    transition: all 0.3s ease;
    cursor: pointer;
}

.plyr-overlay-paused::after {
    content: "▶";
    position: absolute;
    font-size: 32px;
    color: #000;
    z-index: 3;
    margin-left: 4px; /* Center play icon */
    cursor: pointer;
}

/* Hover effect for play button */
.plyr-overlay-paused:hover::before {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

/* Hide default Plyr large play button when overlay exists */
.plyr-paused .plyr__control--overlaid {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Regular control buttons remain visible */
.plyr__controls .plyr__control {
    z-index: 10 !important;
}

/* ===== FIX Z-INDEX LAYERS ===== */
.plyr__video-wrapper {
    position: relative;
    z-index: 0;
}

.plyr__controls {
    z-index: 5 !important;
    position: relative;
}

/* Ensure YouTube iframe unaffected */
.plyr__video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* ===== JSON POSTS DISPLAY AT PAGE FOOTER ===== */
.footer-sidebar {
    display: none !important; /* Hide footer sidebar */
}

.videos-grid {
    display: flex;
    flex-wrap: wrap;
    min-height: 50px; /* Ensure container has minimum height for debug */
}

.debug-placeholder {
    color: #999;
    font-size: 1rem;
    padding: 10px;
}

.post-item {
    margin-bottom: 1.5rem;
}

.post-meta__title {
    font-size: 1.1rem;
    margin: 0.5rem 0;
}

.post-thumbnail img {
    width: 100%;
    height: auto;
}

.video-length.badge {
    position: absolute;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 3px;
}

/* Pagination Styles */
.pagination {
    margin-top: 20px;
}

.pagination .page-item {
    margin: 0 5px;
}

.pagination .page-link {
    border-radius: 5px;
    color: #333;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 8px 12px;
}

.pagination .page-item.active .page-link {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.pagination .page-link:hover {
    background-color: #e9ecef;
}

.pagination .page-item.disabled .page-link {
    background-color: #f8f9fa;
    color: #6c757d;
    pointer-events: none;
}

.header-user__dropdown {
    display: none !important;
}

.comments-list-lg {
    display: none !important;
}

.btn.widget-load-more-posts {
    display: none !important;
}

/* 🎨 Avatar nghệ sĩ tròn hoàn hảo */
#item-header .post-author .user-avatar {
    width: 100px !important;
    height: 100px !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #111; /* nền trung tính */
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
}

#item-header .post-author .user-avatar img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 50% !important;
    display: block;
}

/* 🎵 Căn chỉnh tổng thể khối artist box */
#item-header .author__avatar {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: center;
    justify-content: flex-start;
}

/* 🧾 Căn tên ca sĩ */
#item-header .author-info {
    text-align: center;
    margin-top: 0.5rem;
}

#item-header .author-name a {
    font-weight: 600;
    color: #fff;
    text-decoration: none;
}

#item-header .author-name a:hover {
    color: var(--bs-primary, #0d6efd);
}

