﻿.daily-knowledge-video {
    position: fixed;
    right: 28px;
    top: 50%;
    transform: translateY(-50%);
    width: 290px;
    background: #fff;
    border-radius: 18px;
    padding: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.16);
    z-index: 9999;
    overflow: hidden;
    animation: dailyKnowledgeIn 0.6s ease both;
}


/* =========================================
   ENTRY ANIMATION
========================================= */

@keyframes dailyKnowledgeIn {

    from {
        opacity: 0;
        transform: translate(30px, -50%);
    }

    to {
        opacity: 1;
        transform: translate(0, -50%);
    }
}


/* =========================================
   TOP PROGRESS BAR
========================================= */

.daily-knowledge-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(0, 0, 0, 0.12);
    z-index: 10;
    overflow: hidden;
}


.daily-knowledge-progress-bar {
    width: 100%;
    height: 100%;
    transform-origin: left center;
    /* Visible progress colour */
    background: #a85a6a;
    animation: dailyKnowledgeProgress 5s linear forwards;
}


@keyframes dailyKnowledgeProgress {

    from {
        transform: scaleX(1);
    }

    to {
        transform: scaleX(0);
    }
}


/* =========================================
   CLOSE BUTTON
========================================= */

.daily-knowledge-close {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 27px;
    height: 27px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 19px;
    line-height: 1;
    cursor: pointer;
    z-index: 5;
}


/* =========================================
   HEADER
========================================= */

.daily-knowledge-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}


.daily-knowledge-eyebrow {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.3px;
}


.daily-knowledge-day {
    font-size: 10px;
    font-weight: 600;
    opacity: 0.5;
}


/* =========================================
   THUMBNAIL
========================================= */

.daily-knowledge-thumbnail {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
}


    .daily-knowledge-thumbnail img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform 0.4s ease;
    }


    .daily-knowledge-thumbnail:hover img {
        transform: scale(1.04);
    }


/* =========================================
   OVERLAY
========================================= */

.daily-knowledge-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient( to bottom, transparent 45%, rgba(0, 0, 0, 0.55) );
}


/* =========================================
   PLAY BUTTON
========================================= */

.daily-knowledge-play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a85a6a;
}


    .daily-knowledge-play span {
        margin-left: 3px;
        font-size: 17px;
    }


/* =========================================
   DURATION
========================================= */

.daily-knowledge-duration {
    position: absolute;
    right: 8px;
    bottom: 7px;
    padding: 3px 6px;
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
}


/* =========================================
   CONTENT
========================================= */

.daily-knowledge-content {
    padding: 11px 2px 2px;
}


    .daily-knowledge-content h3 {
        margin: 0;
        font-size: 15px;
        line-height: 1.35;
    }


    .daily-knowledge-content p {
        margin: 5px 0 9px;
        font-size: 12px;
        opacity: 0.65;
    }


.daily-knowledge-watch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}


/* =========================================
   CLOSING
========================================= */

.daily-knowledge-video.closing {
    animation: dailyKnowledgeOut 0.3s ease forwards;
}


@keyframes dailyKnowledgeOut {

    from {
        opacity: 1;
        transform: translate(0, -50%);
    }

    to {
        opacity: 0;
        transform: translate(30px, -50%);
    }
}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 600px) {

    .daily-knowledge-video {
        right: 12px;
        left: 12px;
        bottom: 18px;
        top: auto;
        transform: none;
        width: auto;
        max-width: 360px;
        margin-left: auto;
        margin-right: auto;
        padding: 11px;
    }


    @keyframes dailyKnowledgeIn {

        from {
            opacity: 0;
            transform: translateY(30px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }


    .daily-knowledge-video.closing {
        animation: dailyKnowledgeOutMobile 0.3s ease forwards;
    }


    @keyframes dailyKnowledgeOutMobile {

        from {
            opacity: 1;
            transform: translateY(0);
        }

        to {
            opacity: 0;
            transform: translateY(30px);
        }
    }
}
