/* styles the individual video and video info */

.thumbnail {
    width: 100%; /* image takes up 100% of the container (the column of the grid) */
}

.video-title {
    margin-top: 0;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    margin-bottom: 10px;
}

.video-info-grid {
    display: grid;
    grid-template-columns: 50px 1fr;
}


.profile-picture {
    width: 36px; 
    border-radius: 50px;
}

/* tooltip for profile pic */
.profile-picture-container {
    position: relative;
    display: inline-block;
}

.channel-tooltip {
    background-color: white;
    width: 200px;
    padding: 12px 12px;
    box-shadow: 2px 3px 10px rgba(0,0,0,0.3);
    border-radius: 6px;
    
    position: absolute;
    top: 40px;
    z-index: 300;

    opacity: 0;
    pointer-events: none;

    display: flex;
    align-items: center;
    transition: opacity 0.15s;
}

.profile-picture-container:hover .channel-tooltip {
    opacity: 1;
}

.channel-tooltip-picture {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 25px;
    margin-right: 8px;
}

.channel-tooltip-name {
    font-family: Roboto, Arial;
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 4px;
}

.channel-tooltip-stats {
    font-family: Roboto, Arial;
    color: rgb(96,96,96);
    font-size: 14px;
}

/* end of tooltip code */

.thumbnail-row {
    margin-bottom: 8px;

    position: relative; /* position relative acts normal. 
                        Then we can use positon absolute to get time on top of img */
}

.video-author, .video-stats {
    font-size: 12px;
    color: rgb(96, 96, 96);
}

.video-author {
    margin-bottom: 4px;
}

.video-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    column-gap: 16px;
    row-gap: 40px;
}

/* RESPONSIVE DESIGN */
/* css in the { } will activitate when screen size is 750px or less */
/* in this case, in { } when pixel <= 750, we're going to have 2 columns (of videos) */
@media (max-width: 750px) {
    .video-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* between 751px to 999px, screen display 3 columns */
@media (min-width: 751px) and (max-width: 990px) {
    .video-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

/* once screen size is 1000px, we will have 4 columns */
@media (min-width: 1000px) {
    .video-grid {
        grid-template-columns: 1fr 1fr 1fr 1fr;
        font-size: 14px;
    }

    .video-title {
        font-size: 16px;
        line-height: 24px;
    }
}

/* Responsive design code ends */


.video-time { /* this gets the time displayed on top of the img */
    font-size: 12px;
    font-weight: 500;
    padding: 4px;
    border-radius: 2px;
    background-color: black;
    color: white;
    position: absolute;
    bottom: 8px;
    right: 5px;
}