/* ============================================================
   Phase 3: Video Detail Page — exact Figma wireframe match
   Colors from wireframe: label #141414, value #676f72,
   links blue, tags light blue pills
   ============================================================ */

.hs-video-detail {
    background: #f6f6f6;
    min-height: 60vh;
    padding-bottom: 30px;
}

/* --- Breadcrumbs --- */
.hs-vd-breadcrumbs {
    padding: 8px 40px;
    font-family: 'Gibson', Arial, sans-serif;
    font-size: 12px;
    color: #676f72;
    background: #f6f6f6;
}
.hs-vd-breadcrumbs a {
    color: #2f3f7e;
    text-decoration: none;
    cursor: pointer;
}
.hs-vd-breadcrumbs a:hover { text-decoration: underline; }
.hs-vd-breadcrumbs span { margin: 0 4px; color: #aeaeae; }
.hs-vd-bc-current { color: #141414 !important; }

/* --- Main: Thumbnail + Metadata --- */
.hs-vd-main {
    display: flex !important;
    gap: 24px;
    padding: 20px 40px;
    background: #f6f6f6;
    margin-bottom: 16px;
    align-items: flex-start;
}

/* --- Left: Thumbnail --- */
.hs-vd-thumbnail {
    flex: 0 0 50% !important;
    max-width: 50%;
}

.hs-vd-thumb-wrapper {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    background: #1e1e1e;
    line-height: 0;
}

.hs-vd-thumb-img {
    width: 100%;
    height: auto;
    display: block;
}

.hs-vd-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(21, 37, 108, 0.75);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
}
.hs-vd-play-btn:hover { background: rgba(21, 37, 108, 0.95); }
.hs-vd-play-btn .fa {
    color: #ffffff;
    font-size: 24px;
    margin-left: 4px;
}

/* --- Right: Metadata --- */
.hs-vd-metadata {
    flex: 1 !important;
    min-width: 0;
    font-family: 'Gibson', Arial, sans-serif;
}

.hs-vd-title {
    font-size: 26px;
    font-weight: 700;
    color: #15256c;
    margin: 0 0 10px 0 !important;
    padding: 0 !important;
    line-height: 1.25;
}

.hs-vd-category-links {
    margin-bottom: 20px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}
.hs-vd-category-links a {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 4px;
    background: #e1f4fd;
    font-size: 13px;
    font-weight: 500;
    color: #15256c;
    text-decoration: none;
    cursor: pointer;
}
.hs-vd-category-links a:hover { background: #c8eaf8; text-decoration: none; }

/* Info table */
.hs-vd-info-table {
    border-collapse: collapse;
    margin-bottom: 16px;
    width: 100%;
}

.hs-vd-info-table td {
    padding: 4px 0;
    vertical-align: top;
    font-size: 14px;
    line-height: 1.5;
}

.hs-vd-info-label {
    font-weight: 700;
    color: #141414;
    width: 130px;
    white-space: nowrap;
    padding-right: 12px !important;
}

.hs-vd-info-value {
    color: #676f72;
}

/* Tags */
.hs-vd-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.hs-vd-tag {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 4px;
    background: #e1f4fd;
    color: #15256c;
    font-size: 13px;
    font-weight: 500;
}

/* --- Related Content --- */
.hs-vd-related {
    padding: 0 20px;
}

.hs-vd-related-title {
    font-family: 'Gibson', Arial, sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: #15256c;
    margin: 0 0 8px 0 !important;
    padding: 0 !important;
}

/* Reuse homepage slick styles */
.hs-vd-related .hs-slick.slick-slider { margin: 0 -4px !important; }
.hs-vd-related .hs-slick .slick-slide { padding: 0 4px; }
.hs-vd-related .slick-track { padding: 0 !important; }
.hs-vd-related .slick-slider { margin: 0 !important; padding: 0 !important; }
.hs-vd-related .slick-list { padding: 0 !important; margin: 0 !important; }

/* --- Mobile --- */
@media (max-width: 767px) {
    .hs-vd-main {
        flex-direction: column !important;
        padding: 12px;
        gap: 16px;
    }
    .hs-vd-thumbnail { flex: none !important; max-width: 100%; width: 100%; }
    .hs-vd-title { font-size: 20px; }
    .hs-vd-info-label { width: auto; }
    .hs-vd-related { padding: 0 12px; }
    .hs-vd-breadcrumbs { padding: 8px 12px; }
}

/* Fix white bar above footer */
.hs-video-detail ~ .clearfix,
.hs-video-detail ~ .clearfix + div {
    background: #f6f6f6;
}

/* Override white ui-view background for video detail page */
div[ui-view].ng-scope:has(.hs-video-detail) {
    background: #f6f6f6 !important;
}

/* === Force 20px left alignment === */
.hs-video-detail > * {
    padding-left: 40px !important;
    padding-right: 40px !important;
    box-sizing: border-box;
}
.hs-video-detail > * > * {
    padding-left: 0 !important;
    padding-right: 0 !important;
}


/* ===== PLAYER MODE ===== */

.hs-vd-player-mode {
    padding: 0 10% 16px 10%;
}

.hs-vd-player-title {
    margin-top: 8px !important;
}

.hs-vd-player-container {
    position: relative;
    background: #000;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 16px;
}

.hs-vd-player-container .video-js {
    width: 100% !important;
    border-radius: 4px;
}

/* Custom PiP button in Video.js control bar */
.hs-vjs-pip-btn .vjs-icon-placeholder:before {
    font-family: FontAwesome;
    content: '\f08e';
    font-size: 14px;
}

/* Custom CC button in Video.js control bar */
.hs-vjs-cc-btn .vjs-icon-placeholder:before {
    content: 'CC';
    font-family: 'Gibson', Arial, sans-serif;
    font-size: 12px;
    font-weight: 700;
}
.hs-vjs-cc-btn.hs-vjs-cc-active .vjs-icon-placeholder:before {
    color: #ffb549;
}

/* CC tooltip */
.hs-vjs-cc-tooltip {
    position: absolute;
    bottom: 3em;
    right: 0;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    font-size: 11px;
    padding: 6px 12px;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    line-height: 1.5;
    animation: hsCcFade 5s forwards;
}
@keyframes hsCcFade {
    0%, 80% { opacity: 1; }
    100% { opacity: 0; }
}

/* PiP active notice */
.hs-vd-pip-notice {
    background: #e1f4fd;
    color: #15256c;
    padding: 10px 16px;
    border-radius: 4px;
    font-size: 13px;
    margin-bottom: 16px;
    border: 1px solid #b8dff0;
}
.hs-vd-pip-notice i { margin-right: 6px; }
.hs-vd-pip-notice a {
    margin-left: 12px;
    color: #15256c;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}

/* Metadata below player */
.hs-vd-player-meta {
    margin-top: 8px;
}

/* Hide native PiP toggle on video element (we use our own button) */
video::-webkit-media-controls-picture-in-picture-button { display: none !important; }

@media (max-width: 767px) {
    .hs-vd-player-mode {
        padding: 0 16px 16px 16px;
    }
}
