/* ==========================================================================
   YOUTUBE STYLE VIDEOCLIPS MODULE STYLES - THONG KE HAI PHONG
   Institutional Government & VSIC Palette System (Square Cards, Crisp Typography)
   ========================================================================== */

/* 1. WATCH DETAIL PAGE */
.yt-watch-wrapper {
    position: relative;
    padding: 10px 0 45px;
    background: transparent;
}

.yt-watch-player-box {
    position: relative;
    width: 100%;
    border-radius: 0 !important;
    overflow: hidden;
    background: #000000;
    border: 1px solid #CBD5E1;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    margin-bottom: 22px;
}

.yt-watch-iframe-wrap {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Cinema Aspect Ratio */
    background: #000000;
}

.yt-watch-iframe-wrap iframe,
.yt-watch-iframe-wrap video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    border: 0;
}

.yt-watch-info {
    margin-bottom: 35px;
}

.yt-watch-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary-black, #111827) !important;
    line-height: 1.35;
    margin: 0 0 16px 0;
}

.yt-watch-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #E2E8F0;
    margin-bottom: 18px;
}

.yt-watch-channel {
    display: flex;
    align-items: center;
    gap: 12px;
}

.yt-watch-avatar {
    width: 46px;
    height: 46px;
    border-radius: 0 !important;
    overflow: hidden;
    border: 1px solid #CBD5E1;
    background: #FFFFFF;
    flex-shrink: 0;
}

.yt-watch-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.yt-watch-author {
    font-size: 15.5px;
    font-weight: 700;
    color: var(--text-primary-black, #111827) !important;
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.2;
    margin-bottom: 3px;
}

.yt-channel-verified {
    color: var(--brand-royal-blue, var(--hp-blue-link, #005781));
    font-size: 14px;
}

.yt-watch-subinfo {
    font-size: 13px;
    color: var(--text-secondary-slate, #374151);
    display: flex;
    align-items: center;
    gap: 8px;
}

.yt-meta-divider {
    color: #CBD5E1;
}

/* Action Buttons (Xem trên YouTube & Chia sẻ) */
.yt-watch-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

.yt-btn-action {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    padding: 8px 18px !important;
    border-radius: 0 !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    min-height: 38px !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
}

/* YouTube Button: Elegant Official Red */
.yt-btn-yt {
    background: #CC0000 !important;
    color: #FFFFFF !important;
    border: 1px solid #B30000 !important;
}

.yt-btn-yt em {
    font-size: 15px !important;
    color: #FFFFFF !important;
}

.yt-btn-yt:hover {
    background: #AA0000 !important;
    color: #FFFFFF !important;
    box-shadow: 0 2px 8px rgba(204, 0, 0, 0.25) !important;
}

/* Share Button: Clean Neutral */
.yt-btn-share {
    background: var(--surface-ice-blue, #EBF3FA) !important;
    color: var(--text-secondary-slate, #374151) !important;
    border: 1px solid #CBD5E1 !important;
}

.yt-btn-share em {
    font-size: 13.5px !important;
    color: var(--brand-royal-blue, var(--hp-blue-link, #005781)) !important;
}

.yt-btn-share:hover {
    background: #E2E8F0 !important;
    color: var(--brand-navy-dark, var(--hp-blue-link, #005781)) !important;
    border-color: #94A3B8 !important;
}

/* Description Box */
.yt-watch-desc-box {
    background: var(--surface-ice-blue, #EBF3FA) !important;
    border: 1px solid #CBD5E1 !important;
    border-radius: 0 !important;
    padding: 20px 24px;
    margin-top: 15px;
}

.yt-desc-lead {
    font-size: 14.5px;
    color: var(--text-primary-black, #111827) !important;
    margin-bottom: 10px;
    line-height: 1.65;
    font-weight: 500;
}

.yt-desc-body {
    font-size: 14px;
    color: var(--text-secondary-slate, #374151) !important;
    line-height: 1.7;
}

/* 2. RELATED VIDEOS IN DETAIL PAGE */
.yt-related-section {
    margin-top: 40px;
    padding-top: 25px;
    border-top: 2px solid var(--brand-royal-blue, var(--hp-blue-primary, #0079B6));
}

.yt-related-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--brand-navy-dark, var(--hp-blue-link, #005781)) !important;
    text-transform: uppercase;
    margin: 0 0 22px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.yt-related-title em {
    color: var(--brand-royal-blue, var(--hp-blue-link, #005781));
}

/* 3. VIEWGRID - YOUTUBE CARDS GRID */
.yt-viewgrid-wrapper {
    position: relative;
    padding: 0 0 25px;
}

.yt-grid-row {
    margin-left: -10px;
    margin-right: -10px;
}

.yt-grid-col {
    padding-left: 10px;
    padding-right: 10px;
    margin-bottom: 25px;
}

.yt-grid-card {
    background: #FFFFFF;
    border-radius: 0 !important;
    overflow: hidden;
    border: 1px solid #E2E8F0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.yt-grid-card:hover {
    border-color: #94A3B8;
    box-shadow: 0 6px 16px rgba(10, 37, 64, 0.08);
}

.yt-card-thumb {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 ratio */
    background: var(--hp-blue-deep, #07263E);
    overflow: hidden;
    border-radius: 0 !important;
}

.yt-card-thumb a {
    position: absolute;
    inset: 0;
    display: block;
}

.yt-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    border-radius: 0 !important;
}

.yt-grid-card:hover .yt-card-thumb img {
    transform: scale(1.04);
}

.yt-card-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.75);
    color: #FFFFFF;
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 0 !important;
    letter-spacing: 0.5px;
}

.yt-card-play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 37, 64, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.yt-card-play-overlay em {
    width: 44px;
    height: 44px;
    background: #CC0000;
    color: #FFFFFF;
    border-radius: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    padding-left: 3px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.yt-grid-card:hover .yt-card-play-overlay {
    opacity: 1;
}

.yt-card-body {
    padding: 14px 16px;
    display: flex;
    gap: 12px;
    flex: 1;
}

.yt-card-channel-icon {
    width: 32px;
    height: 32px;
    border-radius: 0 !important;
    background: var(--surface-ice-blue, #EBF3FA);
    color: var(--brand-royal-blue, var(--hp-blue-link, #005781));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
    border: 1px solid #CBD5E1;
}

.yt-card-text {
    flex: 1;
    min-width: 0;
}

.yt-card-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 6px 0;
}

.yt-card-title a {
    color: var(--text-primary-black, #111827) !important;
    text-decoration: none;
    transition: color 0.15s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.yt-card-title a:hover {
    color: var(--brand-royal-blue, var(--hp-blue-link, #005781)) !important;
    text-decoration: none !important;
}

.yt-card-meta {
    font-size: 12px;
    color: var(--text-secondary-slate, #374151);
    display: flex;
    align-items: center;
    gap: 4px;
}

.yt-card-author {
    color: var(--text-secondary-slate, #374151);
}

.yt-card-verified {
    color: var(--brand-royal-blue, var(--hp-blue-link, #005781));
    font-size: 11px;
}

/* Mobile Adjustments */
@media (max-width: 767.98px) {
    .yt-watch-title {
        font-size: 19px;
    }
    .yt-watch-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .yt-watch-actions {
        width: 100%;
        justify-content: flex-start;
    }
    .yt-btn-action {
        flex: 1;
        text-align: center;
    }
}
