﻿

.video-thumb-wrap {
    position: relative;
    display: inline-block;
    width: 100%;
    line-height: 0;
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
}

    .video-thumb-wrap img {
        display: block;
        width: 100%;
        height: auto;
        border-radius: 12px;
        transition: transform 0.25s ease, filter 0.25s ease;
    }

/* Nút play ở giữa */
.play-badge {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: clamp(48px, 10vw, 64px);
    height: clamp(48px, 10vw, 64px);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    pointer-events: none;
}

    .play-badge::after {
        content: "";
        width: 0;
        height: 0;
        border-left: 18px solid white;
        border-top: 10px solid transparent;
        border-bottom: 10px solid transparent;
        margin-left: 4px;
    }

/* Khi video đang play */
.video-thumb-wrap.playing img,
.video-thumb-wrap.playing .play-badge {
    display: none;
}

.inline-video {
    width: 100%;
    height: auto;
    border-radius: 12px;
}

/* Nút tua 15s */
.video-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    z-index: 5;
    pointer-events: none; /* tránh che video */
}

    .video-controls button {
        pointer-events: all; /* ✅ cho phép click */
        width: 56px;
        height: 56px;
        border-radius: 50%;
        border: none;
        background: rgba(0,0,0,0.45);
        cursor: pointer;
        transition: all 0.2s ease;
        background-repeat: no-repeat;
        background-position: center;
        background-size: 40%;
    }

    .video-controls .rewind15 {
        margin-left: 12px;
        background-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'>\
<path fill='%23fff' d='M65 20 L30 50 L65 80 V60 H90 V40 H65Z'/>\
<text x='38' y='62' font-size='22' fill='%23fff'>15</text>\
</svg>");
    }

    .video-controls .forward15 {
        margin-right: 12px;
        background-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'>\
<path fill='%23fff' d='M35 20 L70 50 L35 80 V60 H10 V40 H35Z'/>\
<text x='40' y='62' font-size='22' fill='%23fff'>15</text>\
</svg>");
    }

    .video-controls button:hover {
        transform: scale(1.2);
        background: rgba(0,0,0,0.7);
    }
