/* Giao diện tổng thể của Playlist */
.svp-playlist-wrapper {
    max-width: 800px;
    margin: 20px auto;
    border: 1px solid #ddd;
    background-color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    position: relative;
    overflow: hidden;
}

.svp-video-player-area {
    width: 100%;
    background-color: #000;
    position: relative; 
}

.svp-video-player-area video {
    display: block;
    width: 100%;
    height: auto;
}

.svp-player-controls {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transform: translateY(-50%);
    padding: 0 20px;
    box-sizing: border-box;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.svp-video-player-area:hover .svp-player-controls {
    opacity: 1;
}

.svp-prev-button, .svp-next-button {
    pointer-events: all;
    background-color: rgba(0, 0, 0, 0.4);
    color: white;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 20px;
    line-height: 44px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.svp-prev-button:hover, .svp-next-button:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

/* Khu vực danh sách video */
.svp-video-list-area {
    max-height: 400px;
    overflow-y: auto;
    padding: 0;
}

/* Tiêu đề nhóm (Folder) */
.svp-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background-color: #f1f1f1;
    border-bottom: 1px solid #ddd;
    cursor: pointer;
    font-weight: bold;
    color: #333;
}

.svp-group-header:hover {
    background-color: #e9e9e9;
}

.svp-group-title {
    flex-grow: 1;
}

.svp-toggle-icon {
    font-size: 16px;
    font-weight: bold;
    font-style: normal;
    width: 20px;
    height: 20px;
    text-align: center;
    line-height: 20px;
    user-select: none;
}

/* Danh sách video bên trong nhóm, ẩn theo mặc định */
.svp-group-videos {
    list-style: none;
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #ddd;
    display: none; /* Ẩn theo mặc định */
}

/* Video không thuộc nhóm (standalone) thì luôn hiển thị */
.svp-group-videos.standalone {
    display: block;
}

.svp-video-list-area > .svp-group-videos:last-child {
    border-bottom: none;
}
.svp-video-list-area > .svp-group-header + .svp-group-videos {
     border-top: none; 
}


/* Wrapper cho mỗi item video */
.svp-video-list-area .svp-video-item-wrapper {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #eee;
}

.svp-video-list-area .svp-group-videos .svp-video-item-wrapper:last-child {
    border-bottom: none;
}

/* Link video */
.svp-video-list-area .svp-video-item {
    flex-grow: 1;
    padding: 12px 15px;
    text-decoration: none;
    color: #333;
    transition: background-color 0.2s;
    font-size: 14px;
}
/* Thụt lề cho video (nếu không phải là standalone) */
.svp-group-header + .svp-group-videos .svp-video-item {
    padding-left: 25px;
}


.svp-video-list-area .svp-video-item:hover {
    background-color: #f5f5f5;
}

/* Class active cho video đang phát */
.svp-video-list-area .svp-video-item-wrapper.active .svp-video-item {
    background-color: #e0e0e0;
    font-weight: 600;
    color: #000;
}

/* Nút chia sẻ */
.svp-share-button {
    flex-shrink: 0;
    margin-right: 15px;
    padding: 5px 10px;
    font-size: 12px;
    background-color: #0073aa;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.svp-share-button:hover {
    background-color: #005a87;
}

/* Thông báo "Đã sao chép link" */
.svp-notification {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 14px;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
}

.svp-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
}