/* MYKADRI Last Viewed v1.0.13 */

.media-section[data-home-section="lastview"] {
    display: none;
}

.media-section[data-home-section="lastview"].mk-lastview-ready {
    display: block;
}

.media-section[data-home-section="lastview"] .mk-lastview-row {
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    padding-bottom: 2px;
}

.media-section[data-home-section="lastview"] .mk-lastview-row::-webkit-scrollbar {
    display: none;
}

.media-section[data-home-section="lastview"] .mk-lastview-card {
    position: relative;
    text-decoration: none;
    color: inherit;
    scroll-snap-align: start;
    outline: none;
}

/*
 * Card sizing comes from the site's existing .card.landscape-card and
 * .card-media rules, exactly like sections/lastviewed.tpl.
 * The plugin only adds the progress/title overlay.
 */
.media-section[data-home-section="lastview"] .mk-lastview-media {
    position: relative;
    overflow: hidden;
}

.media-section[data-home-section="lastview"] .mk-lastview-picture {
    display: block;
    width: 100%;
    height: 100%;
}

.media-section[data-home-section="lastview"] .mk-lastview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 180ms ease, filter 180ms ease;
}

.media-section[data-home-section="lastview"] .mk-lastview-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(3, 5, 8, 0.94) 0%, rgba(3, 5, 8, 0.56) 34%, rgba(3, 5, 8, 0.03) 67%);
    pointer-events: none;
}

.media-section[data-home-section="lastview"] .mk-lastview-body {
    position: absolute;
    left: 12px;
    right: 118px;
    bottom: 16px;
    min-width: 0;
    z-index: 2;
}

.media-section[data-home-section="lastview"] .mk-lastview-title {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font: inherit;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.25;
    color: inherit;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

.media-section[data-home-section="lastview"] .mk-lastview-subtitle {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    margin-top: 4px;
    font: inherit;
    font-size: 12px;
    line-height: 1.2;
    color: rgba(255, 255, 255, 0.72);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

.media-section[data-home-section="lastview"] .mk-lastview-time {
    position: absolute;
    right: 10px;
    bottom: 17px;
    z-index: 2;
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
    white-space: nowrap;
}

.media-section[data-home-section="lastview"] .mk-lastview-progress {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 7px;
    z-index: 3;
    height: 4px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.24);
}

.media-section[data-home-section="lastview"] .mk-lastview-progress > span {
    display: block;
    height: 100%;
    min-width: 2px;
    border-radius: inherit;
    background: var(--mk-lastview-accent, var(--theme-accent, var(--accent-color, var(--primary-color, #31c6f5))));
}

@media (hover: hover) and (pointer: fine) {
    .media-section[data-home-section="lastview"] .mk-lastview-card:hover .mk-lastview-image {
        transform: scale(1.025);
        filter: brightness(1.04);
    }
}

@media (max-width: 700px) {
    .media-section[data-home-section="lastview"] .mk-lastview-body {
        left: 10px;
        right: 105px;
        bottom: 15px;
    }

    .media-section[data-home-section="lastview"] .mk-lastview-title {
        font-size: 13px;
    }

    .media-section[data-home-section="lastview"] .mk-lastview-subtitle {
        font-size: 11px;
    }

    .media-section[data-home-section="lastview"] .mk-lastview-time {
        right: 9px;
        bottom: 16px;
        font-size: 10px;
    }
}


/* Last Viewed has dynamic cards, so the old static slider dots are not reliable. */
.media-section[data-home-section="lastview"] .dots {
    display: none !important;
}

/* Hide only the navigation arrow that cannot currently scroll anywhere. */
.media-section[data-home-section="lastview"] .row-arrow.mk-lastview-nav-hidden {
    display: none !important;
}

