:root{
    --flexcare-vert: #3D6B6B;
    --flexcare-rose: #C65F86;
    --vert-clair: #E0F2F1;
    --texte-fonce: #2D3748;
    --texte-clair: #5F6B7B;
}

/* Base - NO SCROLLBARS HERE */
body{
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f5f5;
    color: var(--texte-fonce);
    /* NO overflow-x: hidden - let browser scroll naturally */
}

/* App layout - FILLS ENTIRE SCREEN. This is the app container which hold the whole screen. has two things - the video are to the right and then left side bar */
.app-container
{
    align-items: stretch;   /* IMPORTANT */
	display: grid;
    grid-template-columns: 2fr 3fr; /* adjust freely */
    width: 100%;
    max-width: 100%;
}

/* Main Content Area - NO SCROLLBAR. The main content are is the video player and the library below it */

.main-content-area {
    display: flex;
    flex-direction: column;

    padding-left: 30px;     /* ✅ ALIGN LEFT */
    padding-right: 30px;    /* optional symmetry */

    background: white;
    min-height: 100vh;
}

.top-row-container {
    padding-top: 30px;
    padding-bottom: 30px;
}


/*Video info table. these are the video that gets loaded when the filter is applied */
.video-content-area {
    padding: 30px;
    background: white;
}

.video-table-wrapper {
    max-height: 400px;
    overflow-y: scroll; /* ⬅ instead of auto */
    margin-top: 10px;
}

/* Optional: sticky table header */
.video-table thead th {
    position: sticky;
    top: 0;
    background: white;
    z-index: 2;
}

/* The css for video player ends here */

/* Custom video player styling */
/* Custom video player styling */
/* Custom video player styling */
.custom-video-player {
    position: relative;
    width: 100%;
    height: 100%;             /* 🔑 CRITICAL */
    background: #000;
    border-radius: 14px;
    overflow: hidden;
}


.custom-video-player video {
    width: 100%;
    height: 100%;             /* 🔑 CRITICAL */
    display: block;
    background: #000;

    object-fit: contain;      /* or cover */
}

/* Controls bar */
.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;

    display: flex;
    align-items: center;
    gap: 10px;

    padding: 12px;
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.75),
        rgba(0,0,0,0)
    );
}

.control-btn {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
}

/* ✅ ONLY hover gets red */
.control-btn:hover {
    background: rgba(255, 0, 0, 0.6);
}

/* ❌ REMOVE red from click */
.control-btn:active {
    background: none;
}

/* ❌ REMOVE red from focus (this is the main culprit) */
.control-btn:focus {
    outline: none;
    background: none;
}

/* ❌ ALSO remove focus-visible (keyboard focus) */
.control-btn:focus-visible {
    outline: none;
    background: none;
}


/* Seek bar */
#seek-bar {
    flex: 1;
    cursor: pointer;
}

/* Time */
#current-time,
#duration {
    font-size: 13px;
    color: #fff;
}

/* Custom video player styling ends */
/* Custom video player styling ends */
/* Custom video player styling ends */


/* Playlist sidebar - LEFT SIDE, NO SCROLLBAR */
/* Playlist sidebar - LEFT SIDE */
.playlist-sidebar {
    overflow: hidden;          /* ❌ no sidebar scroll */
    display: flex;
    flex-direction: column;
    padding: 30px;
    box-sizing: border-box;
    background: white;
    border-left: 1px solid var(--vert-clair);
}
/* Playlist sidebar - LEFT SIDE ends */


.playlist-header, .playlistHeader{
    font-size: 20px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--vert-clair);
    color: var(--flexcare-vert);
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.playlist-header .edit-icon{
    color: var(--texte-clair);
    cursor: pointer;
    font-size: 18px;
    transition: color 0.2s;
}

.playlist-header .edit-icon:hover{
    color: var(--flexcare-vert);
}
.playlistHeader span:first-child {
    margin: 0 auto;
}



/* ============== PLAYLIST ITEMS STYLING ============== */
.playlist-item{
    overflow: visible;
    margin-bottom: 15px;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid var(--vert-clair);
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 60px;
    padding: 10px;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}
.playlist-name-display {
    position: relative;
    overflow: visible; /* 🔥 allow tooltip to escape */
}

.playlist-item:hover{
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: var(--flexcare-vert);
}

/* Container for playlist name - takes most space */
.playlist-name-wrapper {
    flex: 1;
    min-width: 0; /* CRITICAL for text truncation */
    overflow: hidden;
    padding-right: 10px;
}

.playlist-name-display {
    postion: relative;
    z-index:2;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 500;
    color: var(--texte-fonce);
    line-height: 1.4;
}

/* Video count styling */
.playlist-item .video-count{
    background: var(--flexcare-vert);
    color: white;
    border-radius: 12px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 600;
    min-width: 28px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    flex-shrink: 0;
}

/* Playlist actions container */
.playlist-actions{
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

/* Playlist action buttons */
.playlist-actions .edit-btn,
.playlist-actions .delete-btn,
.playlist-actions .share-options-btn1{
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s ease-in-out;
    background: transparent;
    color: var(--texte-clair);
    flex-shrink: 0;
}

/* Edit button - with pencil icon */
.playlist-actions .edit-btn {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.1) !important;
    border: 1px solid rgba(251, 191, 36, 0.3) !important;
}

.playlist-actions .edit-btn:hover {
    background: rgba(251, 191, 36, 0.2) !important;
    transform: scale(1.1);
}

.playlist-actions .edit-btn::before {
    content: "✏️";
    font-size: 14px;
    line-height: 1;
}

/* Delete button - with bin icon */
.playlist-actions .delete-btn {
    color: var(--flexcare-rose);
    background: rgba(198, 95, 134, 0.1) !important;
    border: 1px solid rgba(198, 95, 134, 0.3) !important;
}

.playlist-actions .delete-btn:hover {
    background: rgba(198, 95, 134, 0.2) !important;
    transform: scale(1.1);
}

.playlist-actions .delete-btn::before {
    content: "🗑️";
    font-size: 14px;
    line-height: 1;
}

/* 🔥 FORCE ICONS TO RENDER INSIDE FLEX BUTTONS */
.playlist-actions .edit-btn::before,
.playlist-actions .delete-btn::before {
    display: block;
    width: 1em;
    height: 1em;
    text-align: center;
}

/* Share button */
.share-options-btn1 {
    background-color: rgba(229, 231, 235, 0.8) !important;
    color: #4b5563;
    border: 1px solid #d1d5db !important;
    font-size: 12px !important;
    width: 32px !important;
    height: 32px !important;
}

.share-options-btn1:hover {
    transform: scale(1.05);
    background-color: #e5e7eb !important;
}



/* ============== SCROLLABLE PLAYLIST CONTAINERS ============== */
/* Container for BOTH user and admin playlists - WITH SCROLLBAR */
#db-playlists-container,
#db-playlists-container-admin {
    flex: 0 0 auto;          /* 🔑 DO NOT grow or shrink */
    max-height: 400px;       /* each gets its own scroll */
    overflow-y: auto;
    overflow-x: hidden;

    padding: 10px 5px;
    margin-top: 5px;
    width: 100%;
    box-sizing: border-box;

    transition:
        max-height 0.4s ease,
        padding 0.4s ease,
}



/* Custom scrollbar styling for BOTH containers */
#db-playlists-container::-webkit-scrollbar,
#db-playlists-container-admin::-webkit-scrollbar {
    width: 8px !important;
}

#db-playlists-container::-webkit-scrollbar-track,
#db-playlists-container-admin::-webkit-scrollbar-track {
    background: #f1f1f1 !important;
    border-radius: 4px !important;
}

#db-playlists-container::-webkit-scrollbar-thumb,
#db-playlists-container-admin::-webkit-scrollbar-thumb {
    background: #c1c1c1 !important;
    border-radius: 4px !important;
}

#db-playlists-container::-webkit-scrollbar-thumb:hover,
#db-playlists-container-admin::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8 !important;
}

/* For Firefox */
#db-playlists-container,
#db-playlists-container-admin {
    scrollbar-width: thin !important;
    scrollbar-color: #c1c1c1 #f1f1f1 !important;
}

#db-playlists-container.collapsed,
#db-playlists-container-admin.collapsed {
    max-height: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}




/* Buttons */
#create-playlist, #access-playlists-btn{
    background: var(--flexcare-vert);
    color: white;
    text-align: center;
    font-weight: bold;
    border: none;
    padding: 15px;
    border-radius: 6px;
    width: 100%;
    margin-bottom: 15px;
}

#create-playlist:hover, #access-playlists-btn:hover{
    background: var(--flexcare-rose);
    color: white;
}

/* Body Map Container - IN SIDEBAR */
.body-map-container{
    width: 100%;
    margin: 0 0 20px 0;
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid var(--vert-clair);
}

.body-map-header{
    font-size: 18px;
    color: var(--flexcare-vert);
    margin-bottom: 15px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Body view toggles */
.body-view-toggle
{
    display: flex;
    gap: 10px;
}

.body-view-toggle button{
    padding: 8px 15px;
    background: var(--vert-clair);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.body-view-toggle button.active{
    background: var(--flexcare-vert);
    color: white;
}

/* Current video info. Gives the title and the body part name */
.current-video-info
{
	text-align: center;
	
    padding: 15px;
    margin: 20px 0;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--vert-clair);
}

.current-video-title
{
	 font-size: 62px;      /* increase size */
    font-weight: 700;     /* make it stand out */
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 5px;
}

.current-video-details{
    font-size: 14px;
    color: var(--texte-clair);
}

/*Video Player - MOVE TO RIGHT, ADD SPACING */
.player-container{
    width: 100%;
    height: 580px;
    background: white;
    border: 2px solid var(--vert-clair);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-radius: 8px;
}

#main-video{
    width: 100%;
    height: 100%;
    background: #000;
    border-radius: 6px;
}

/* Table */
.video-table{
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.video-table th{
    text-align: left;
    padding: 15px;
    background: var(--vert-clair);
    color: var(--flexcare-vert);
    font-weight: 600;
    border-bottom: 2px solid var(--flexcare-vert);
}

.video-table td{
    padding: 15px;
    border-bottom: 1px solid var(--vert-clair);
    position: relative;
}

.video-table tr{
    transition: background 0.2s;
}

.video-table tr:hover{
    background: rgba(61,107,107,0.05);
}

.video-table tr.selected{
    background: rgba(61,107,107,0.1);
    border-left: 3px solid var(--flexcare-vert);
}

.video-rating{
    color: gold;
    letter-spacing: 2px;
}

/* Play button */
.play-button-container{
    display: flex;
    align-items: center;
}

.play-button{
    width: 28px;
    height: 28px;
    background: var(--flexcare-vert);
    border-radius: 50%;
    border: none;
    margin-right: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    padding-left: 2px;
    transition: all 0.3s;
}

.play-button:hover{
    background: var(--flexcare-rose);
    transform: scale(1.1);
}

.play-button::after{
    content: "▶";
}

/* Modals & overlays */
.modal-overlay{
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

.playlist-modal, .create-playlist-modal, .my-playlists-modal, .edit-playlist-modal, .bvm-popup{
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border: 1px solid var(--vert-clair);
    border-radius: 10px;
    z-index: 1000;
    width: 400px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    padding: 0;
}

.playlist-modal-header, .cpm-modal-header, .bvm-popup__header{
    padding: 20px;
    font-size: 20px;
    border-bottom: 1px solid var(--vert-clair);
    background: var(--vert-clair);
    color: var(--flexcare-vert);
    font-weight: 600;
}

/* Create playlist content */
.create-playlist-modal {
    text-align: center;
    padding: 30px;
}

.create-playlist-modal h3{
    margin: 0 0 20px 0;
    color: var(--flexcare-vert);
    font-size: 24px;
    font-weight: 600;
}

.create-playlist-modal input{
    width: 100%;
    padding: 14px 18px;
    margin: 20px 0;
    background: white;
    border: 2px solid var(--vert-clair);
    color: var(--texte-fonce);
    border-radius: 10px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.create-playlist-modal input:focus{
    outline: none;
    border-color: var(--flexcare-vert);
}

.create-playlist-modal input::placeholder{
    color: #999;
}

.create-playlist-modal > div{
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 25px;
}

.create-playlist-modal button{
    background: var(--flexcare-vert);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s;
    min-width: 120px;
}

.create-playlist-modal button:hover{
    background: #2d5555;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(61, 107, 107, 0.3);
}

.create-playlist-modal button.cancel{
    background: #e0e0e0;
    color: var(--texte-fonce);
}

.create-playlist-modal button.cancel:hover{
    background: #d0d0d0;
    transform: translateY(-2px);
}

/* Context menu */
.context-menu{
    display: none;
    position: absolute;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 1002;
    width: 250px;
    overflow: hidden;
    font-size: 14px;
}

.context-menu-item{
    padding: 12px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.context-menu-item:hover{
    background: #f0f8f7;
}

.context-menu-item .icon{
    margin-right: 12px;
    width: 20px;
    text-align: center;
    font-weight: bold;
}

.context-menu-item.add-library .icon,
.context-menu-item.add-playlist .icon {
    color: var(--flexcare-vert);
}

.context-menu-item.remove-playlist .icon {
    color: var(--flexcare-rose);
}

/* Context submenu (right side) */
.context-submenu{
    display: none;
    position: absolute;
    left: 100%;
    top: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    width: 250px;
    z-index: 1003;
}

/* Body part link */
.bodypart-link{
    cursor: pointer;
    transition: all 0.3s;
}

.bodypart-link:hover{
    opacity: 0.8;
    transform: scale(1.02);
}

.bodypart-link.active{
    filter: drop-shadow(0 0 5px var(--flexcare-rose));
}

/* Responsive */
@media (max-width: 1200px){
    .app-container{
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
    }
    
    .playlist-sidebar{
        border-right: none;
        border-left: none; /* ADD THIS LINE */
        border-bottom: 1px solid var(--vert-clair);
    }
    
    .player-container {
        width: 100%;
    }
    
    /* Adjust scrollbar containers for mobile */
    #db-playlists-container,
    #db-playlists-container-admin {
        max-height: 300px !important;
    }
}

/* darkened screen background (BVM) */
.bvm-overlay{
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 9998;
}

.bvm-popup{
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    background: white;
    border-radius: 10px;
    z-index: 9999;
    width: 80%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.bvm-popup__header{
    padding: 20px;
    border-bottom: 1px solid var(--vert-clair);
    background: var(--vert-clair);
    color: var(--flexcare-vert);
    display:flex;
    justify-content:space-between;
    align-items:center;
}

.bvm-popup__header h3{
    margin: 0;
    font-size: 20px;
}

.bvm-close{
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--texte-clair);
}

/* BVM video list grid */
.bvm-video-list {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    justify-items: center; /* horizontal */
    align-items: center;   /* vertical */
}


/* Playlist/new playlist rows */
.bvm-playlist, .bvm-new-playlist{
    padding: 15px 20px;
    border-top: 1px solid var(--vert-clair);
}

.bvm-playlist select, .bvm-new-playlist input{
    width:100%;
    padding:10px;
    margin-bottom:10px;
    border:1px solid var(--vert-clair);
    border-radius:4px;
}

/* Buttons in bvm */
.bvm-playlist button, .bvm-new-playlist button{
    background:var(--flexcare-vert);
    color:white;
    border:none;
    padding:10px 15px;
    border-radius:4px;
    cursor:pointer;
}

.bvm-playlist button:hover, .bvm-new-playlist button:hover{
    background:var(--flexcare-rose);
}

/* Body view containers */
.body-view-container{
    display: none;
    width: 100%;
}

.body-view-container.active{
    display: block;
}

/* Folder/album */
.folder-organization{
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.folder-header{
    font-size:20px;
    margin-bottom:20px;
    color: var(--flexcare-vert);
    font-weight:600;
    padding-bottom:10px;
    border-bottom:1px solid var(--vert-clair);
    display:flex;
    justify-content:flex-start;
    align-items:center;
}

/* Filters */
.folder-filters{
    display:flex;
    gap:15px;
    margin-bottom:20px;
}

.filter-group{
    flex:1;
    width:50%;
}

.filter-label{
    display:block;
    margin-bottom:8px;
    font-weight:600;
    color:var(--texte-fonce);
    font-size:14px;
}

.filter-select{
    width:100%;
    padding:10px 15px;
    border:1px solid var(--vert-clair);
    border-radius:8px;
    background:white;
    color:var(--texte-fonce);
    font-size:14px;
    cursor:pointer;
    transition:all 0.3s;
}

.filter-select:focus{
    outline:none;
    border-color:var(--flexcare-vert);
    box-shadow:0 0 0 2px rgba(61,107,107,0.2);
}

/* filter layout row */
.filter-options-row{
    display:flex;
    justify-content:space-between;
    gap:20px;
    padding:10px 0;
}

.filter-group{
    width:50%;
}

/* helper hidden classes */
.is-hidden, .is-menu-hidden{
    display:none !important;
}

/* video actions / menu */
.video-actions{
    position: relative;
    display:inline-block;
}



.menu-item{
    padding:10px 15px;
    cursor:pointer;
    white-space:nowrap;
    border-bottom:1px solid #eee;
}

.menu-item:hover{
    background:#f0f0f0;
}

.arrow-right{
    float:right;
    font-size:10px;
    line-height:1.5;
}

/* submenu */
.playlist-submenu
{
    display:none;
    position:absolute;
    top:0;
    right:100%;
    background:#fff;
    border:1px solid #ccc;
    box-shadow:0 4px 8px rgba(0,0,0,0.1);
    z-index:1010;
    min-width:200px;
}

.submenu-header{
    font-weight:bold;
    padding:10px 15px;
    border-bottom:2px solid #376e73;
}

/* video-playlist-menus unified */


.video-playlist-menus .playlist-submenu .submenu-item:hover{
    background:#f0f0f0;
}

.add-to-playlist-option, .relative{
    position: relative;
}

/* small tweaks for IDs with JS toggles */
#playlist-submenu1{
    display:none;
    left:-10px;
}

#show-user{
    display:none;
}

/* create-playlist modal variant for #show-user. filtering pop-up */
.create-playlist-modal#show-user {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    background: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 20px;

    width: 90%;
    max-width: 450px;

    /* 🔥 THIS FIXES IT */
    max-height: 80vh;
    overflow-y: auto;

    z-index: 10000;
}

.create-playlist-modal#show-user h3{
    font-size:1.4em;
    color:#333;
    padding-bottom:10px;
    margin:0 0 15px 0;
}

/* user list with scrollable area */
.create-playlist-modal#show-user {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    background: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;

    width: 90%;
    max-width: 450px;

    /* ✅ THIS IS THE FIX */
    max-height: 80vh;
    overflow-y: auto;

    padding: 20px;
    box-sizing: border-box;

    z-index: 10000;
}

.user-list#members-show {
    display: block;          /* 🔥 IMPORTANT */
    max-height: 250px;
    overflow-y: auto;
    padding: 8px 10px;
}

.user-list#members-show .member-item-row{
    display:flex;
    align-items:center;
    padding:5px 0;
    border-bottom:1px dotted #eee;
}

.user-list#members-show .member-item-row:last-child{
    border-bottom:none;
}

.user-list#members-show .member-item-row input[type="checkbox"]{
    margin-right:8px;
    width:16px;
    height:16px;
}

.user-list#members-show .member-item-row label{
    font-size:0.9em;
    color:#444;
}

#select-all-wrapper {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #fff;
    padding-bottom: 6px;
}
#select-all-wrapper .select-all-container {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-bottom: 1px solid #ddd;
    background: #fcfcfc;
}

.member-item-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px dotted #eee;
}

.member-item-row:last-child {
    border-bottom: none;
}


/* toast */
#toast-notification{
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translate(-50%,-100%);
    z-index: 5000;
    background-color: #ef4444;
    color: white;
    padding: 8px 15px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    opacity: 0;
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
    width: fit-content;
    max-width: 400px;
}

#toast-notification.show{
    opacity: 1;
    transform: translate(-50%, 0);
}

/* select-all container style */
.select-all-container{
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    margin-bottom: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fcfcfc;
}


.select-all-container {
    background: rgba(255,0,0,0.05);
}

.select-all-container input[type="checkbox"]{
    margin-right:10px;
    width:16px;
    height:16px;
}


/* admin header collapsible */
.playlist-header.admin-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    user-select:none;
    color:#333;
    cursor:pointer;
    font-weight:600;
    border-radius:8px;
    margin-top:30px;
}



/* remove-playlist-video hidden by default */
#remove-playlist-video{
    display:none;
}

/* submenu body */
.submenu-body{
    height:200px;
    width:200px;
    overflow-y:auto;
    scrollbar-gutter: stable both-edges;
}

.submenu-body .playlist-item{
    border-radius:0;
    border-left-width:0;
    padding-left:10px;
}

/* Body part link styling */
.bodypart-link{
    cursor: pointer;
    transition: all 0.3s;
}

.bodypart-link:hover{
    opacity: 0.8;
    transform: scale(1.02);
}

.bodypart-link.active{
    filter: drop-shadow(0 0 5px var(--flexcare-rose));
}




/*Added new styles below */

/* Make video player smaller */
/* .player-container {
    height: 350px; 
    max-width: 90%; 
    margin-left: 40px; 
} */
		

/* Reduce table area size */
.video-content-area {
    max-width: 95%;
    margin-left: 20px; /* Move table right too */
}

/* Make sure body map has breathing room */
.body-map-container {
    margin-right: 10px; /* Give space on right */
}
		

/* ===============================
   FILTER POPUP — FINAL CLEAN CSS
   =============================== */

/* ===============================
   FILTER POPUP — FINAL CLEAN CSS
   =============================== */

/* Overlay */
.modal-overlay {
    background: rgba(0,0,0,0.65);
    display: none; /* Ensure it starts hidden */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999;
}

/* Modal container. background behind the dropdowns */
#filter-playlist-modal {
    display: none; /* ❌ NOT "block" - start hidden */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    max-height: 80vh;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.45);
    z-index: 1000; /* ✅ Make sure this is HIGHER than overlay (999) */
    overflow: hidden;
}

/* FIX: Ensure modal shows when JavaScript sets display:block */
#filter-playlist-modal[style*="display: block"] {
    display: block !important;
}

/* Header. background of the choose from the following options*/
#filter-playlist-modal .cpm-modal-header {
    background: var(--flexcare-vert);
    color: #ffffff;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    padding: 23px 20px;
    margin: 0;
    border-bottom: 1px solid rgba(19,78,74,0.15);
}

/* Content layout */
#filter-playlist-modal .filter-options-row {
    display: flex;
    gap: 20px;
    padding: 24px;
}

/* Each filter block */
#filter-playlist-modal .filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 50%;
}

/* Labels (Type de soins / Type de clientèle) */
#filter-playlist-modal label {
    color: #134e4a;
    font-size: 14px;
    font-weight: 500;
}

/* Dropdowns */
#filter-playlist-modal select.cpm-select {
    background: #ffffff;
    color: #134e4a;
    border: 1px solid #99d5ce;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    cursor: pointer;
}

#filter-playlist-modal select.cpm-select:focus {
    outline: none;
    border-color: #5eead4;
    box-shadow: 0 0 0 2px rgba(94,234,212,0.35);
}

/* Buttons container */
#filter-playlist-modal .modal-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding: 20px;
    background: #ffffff;
}

/* Buttons base */
#filter-playlist-modal .cpm-btn {
    min-width: 120px;
    padding: 12px 22px;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
}

/* Primary action — Terminer */
#filter-playlist-modal .terminer-btn {
    background: var(--flexcare-vert);
    color: #ffffff;
}

#filter-playlist-modal .terminer-btn:hover {
    background: #2d5555;
}

/* Secondary action — Annuler */
#filter-playlist-modal .annuler-btn {
    background: #e0e0e0;
    color: var(--texte-fonce);
}

#filter-playlist-modal .annuler-btn:hover {
    background: #d0d0d0;
}


/* ============== UPDATED PLAYLIST ITEM LAYOUT ============== */
/* This ensures everything is visible and properly spaced */
.playlist-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
}

.playlist-item > * {
    flex-shrink: 0;
}

.playlist-item > .playlist-name-display {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 12px;
}

.playlist-item > .video-count {
    margin-right: 12px;
    margin-left: auto;
}

/* Ensure all content is visible */


/* Added code */

.elementor-editor-active .bvm-overlay,
.elementor-editor-active .modal-overlay,
.elementor-editor-active .context-menu {
    display: none !important;
}
/* Force shortcode container to be full width */
.elementor-widget-shortcode > .elementor-widget-container {
    max-width: none !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}


/* Universal cancel button hover - pink color */
/* FORCE pink ON the cancel button itself */
.create-playlist-modal button.cancel:hover,
#filter-playlist-modal button.cancel:hover {
    background-color: var(--flexcare-rose) !important;
    color: #ffffff !important;
    border-color: var(--flexcare-rose) !important;
}


.playlist-header.admin-header {
    cursor: default;   /* 🔴 IMPORTANT */
}


/* 🔥 FORCE VISIBILITY FOR SELECT ALL */
.select-all-container {
    display: flex !important;
    align-items: center !important;
    gap: 10px;
    padding: 8px 10px;
    min-height: 32px;

    color: #2D3748 !important;   /* 🔴 FORCE TEXT COLOR */
    background: #fcfcfc;
    font-size: 14px;
    line-height: 1.4;
}

/* Force checkbox visibility */
.select-all-container input[type="checkbox"] {
    appearance: auto !important;
    -webkit-appearance: checkbox !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: inline-block !important;
    width: 16px;
    height: 16px;
}

/* Force label text visibility */
.select-all-container label {
    color: #2D3748 !important;
    font-size: 14px !important;
    font-weight: 600;
    visibility: visible !important;
}



/* Global modal header (green bar) */
.cpm-modal-header 
{
    background: var(--flexcare-vert);
    color: white;

    padding: 18px 20px;
    font-size: 18px;
    font-weight: 600;

    border-radius: 10px 10px 0 0;
    margin-bottom: 15px;
}

.cpm-modal-header,
.cpm-modal-header * {
    color: #ffffff !important;
}
.cpm-modal-header h3 {
    margin: 0;
    font-size: inherit;
    font-weight: inherit;
}



/* Create New Playlist button */
#create-playlist {
    background: var(--flexcare-vert);
    color: #ffffff;
    border: 1px solid var(--flexcare-vert);
    font-weight: 600;
}

/* Text inside */
#create-playlist div {
    color: #ffffff;
}

/* Hover state */
#create-playlist:hover {
    background: var(--flexcare-rose);
    border-color: var(--flexcare-rose);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}
/* ============================================
   🌟 PROFESSIONAL CONTEXT MENU (FINAL)
   ============================================ */

/* Keyframes should be at top level */
@keyframes menuFadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ============================================
   FIXED MENU POSITIONING - UPDATED
   ============================================ */

.video-playlist-menus {
    position: fixed;          /* ✅ THIS IS THE FIX */
    z-index: 100000;

    background: #ffffff;
    border-radius: 12px;
    min-width: 220px;

    padding: 6px 0;
    display: none;

    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.18),
        0 2px 6px rgba(0, 0, 0, 0.08);

    animation: menuFadeIn 0.15s ease-out;
}



/* Ensure submenus are positioned correctly */
.video-playlist-menus {
    position: fixed;          /* ✅ THIS IS THE FIX */
    z-index: 100000;

    background: #ffffff;
    border-radius: 12px;
    min-width: 220px;

    padding: 6px 0;
    display: none;

    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.18),
        0 2px 6px rgba(0, 0, 0, 0.08);

    animation: menuFadeIn 0.15s ease-out;
}


/* When submenu would go off-screen, show it on the other side */
/* 🔁 FLIP TO LEFT WHEN NEEDED */
.video-playlist-menus .playlist-submenu.flip-left {
    left: auto;
    right: 100%;
    margin-left: 0;
    margin-right: 6px;
}

/* Menu item styling */
.video-playlist-menus .menu-item {
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition:
        background 0.15s ease,
        color 0.15s ease;
}

.video-playlist-menus .menu-item:hover {
    background: #f0fdfa;
    color: #134e4a;
}

.video-playlist-menus .remove-from-playlist {
    border-top: 1px solid #e5e7eb;
    margin-top: 6px;
    padding-top: 12px;
    color: #b91c1c;
}

.video-playlist-menus .remove-from-playlist:hover {
    background: #fee2e2;
    color: #7f1d1d;
}

.video-playlist-menus .submenu-header {
    font-weight: 600;
    font-size: 13px;
    padding: 10px 16px;
    color: #134e4a;
    border-bottom: 1px solid #e5e7eb;
    background: #f0fdfa;
}
/* ===============================
   TABLE HEADER — SAFE STYLING
   =============================== */

.video-table thead {
    position: sticky;   /* optional: keeps header visible while scrolling */
    top: 0;
    z-index: 2;         /* lower than menus, higher than rows */
}

.video-table thead th {
    background: #e0f2f1;           /* same soft green */
    color: #134e4a;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 12px;
    font-weight: 600;

    padding: 14px 16px;
    border-bottom: 1px solid rgba(19, 78, 74, 0.2);

    /* important: NO position, NO overflow */
}

/* Optional rounded corners for first & last header cells */
.video-table thead th:first-child {
    border-top-left-radius: 10px;
}

.video-table thead th:last-child {
    border-top-right-radius: 10px;
}


/* ===============================
   🎬 CURRENT VIDEO INFO — WORLD CLASS
   =============================== */

.current-video-info {
    display: flex;
    flex-direction: column;
    gap: 6px;

    padding: 18px 22px;
    margin-bottom: 18px;

    background: linear-gradient(
        135deg,
        #f0fdfa,
        #ffffff
    );

    border-radius: 14px;
    border: 1px solid rgba(19, 78, 74, 0.12);

    box-shadow:
        0 8px 22px rgba(19, 78, 74, 0.08),
        inset 0 1px 0 rgba(255,255,255,0.6);
}

/* Title — HERO ELEMENT */
.current-video-title {
    font-size: 20px;
    font-weight: 700;
    color: #134e4a;
    line-height: 1.25;

    letter-spacing: 0.01em;
}



/* Dot separator polish */
.current-video-details::before {
    content: "●";
    color: #5eead4;
    font-size: 10px;
}
.current-video-details {
    display: flex;
    justify-content: center;   /* 🔑 centers the whole line */
    align-items: center;
    gap: 10px;

    font-size: 13px;
    font-weight: 500;
    color: #5f6b7b;
}



/* 🔒 FORCE Create Playlist colors */
#create-playlist {
    background-color: var(--flexcare-vert) !important;
    color: #ffffff !important;
    border-color: var(--flexcare-vert) !important;
    box-shadow: none;
    transform: none;
}

/* Hover = ROSE */
#create-playlist:hover {
    background-color: var(--flexcare-rose) !important;
    border-color: var(--flexcare-rose) !important;
    color: #ffffff !important;
}

/* Click / active = ROSE (prevents light flash) */
#create-playlist:active {
    background-color: var(--flexcare-rose) !important;
    border-color: var(--flexcare-rose) !important;
}

/* Focus (keyboard / click) */
#create-playlist:focus,
#create-playlist:focus-visible {
    outline: none;
    background-color: var(--flexcare-vert) !important;
}
.custom-video-player.fake-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 99999;
    width: 100vw;
    height: 100vh;
    border-radius: 0;
}

.custom-video-player.fake-fullscreen video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

body.fake-fullscreen-active {
    overflow: hidden;
}
.playlist-submenu,
.submenu-body {
    max-height: 260px;
    overflow-y: auto;
}
/* ============================================
   🌟 UNIVERSAL TOOLTIP SYSTEM (FIXED)
   ============================================ */
   
   
   /* Playlist name tooltip – optimized */
.playlist-name-display[data-tooltip]::after {
    content: attr(data-tooltip);

    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    transform: translateY(4px);

    background: rgba(15, 23, 42, 0.95);
    color: #ffffff;

    padding: 8px 12px;
    border-radius: 6px;

    font-size: 13px;
    font-weight: 500;
    white-space: normal;
    max-width: 320px;
    line-height: 1.4;

    opacity: 0;
    pointer-events: none;

    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 999999;
}

.playlist-name-display[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateY(0);
}

/* playlist name info styling */
/* ===============================
   🎵 CURRENT PLAYLIST HEADER — WORLD CLASS
   =============================== */

.current-playlist-info {
    display: flex;
    justify-content: center;
    margin: 12px 0 18px 0;
}

/* The pill container */
.current-playlist-title {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    padding: 10px 18px;
    border-radius: 999px;

    background: linear-gradient(
        135deg,
        rgba(61, 107, 107, 0.12),
        rgba(61, 107, 107, 0.05)
    );

    border: 1px solid rgba(61, 107, 107, 0.25);

    color: var(--flexcare-vert);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;

    box-shadow:
        0 4px 14px rgba(19, 78, 74, 0.12),
        inset 0 1px 0 rgba(255,255,255,0.6);

    max-width: 80%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Optional icon before text */
.current-playlist-title::before {
    content: "🎬";
    font-size: 14px;
    opacity: 0.85;
}


/* ✅ ACTIVE PLAYLIST HIGHLIGHT */
.playlist-item.is-active {
    border-color: var(--flexcare-vert);
    background: rgba(61, 107, 107, 0.08);
    box-shadow: 0 6px 18px rgba(61, 107, 107, 0.25);
    transform: translateY(-2px);
}

/* Make text stronger */
.playlist-item.is-active .playlist-name-display {
    font-weight: 700;
    color: var(--flexcare-vert);
}


/* =====================================================
   🌟 MODAL REDESIGN OVERRIDES (SAFE TO REMOVE / EDIT)
   Added on: 2025-12-22
   ===================================================== */

/* =====================================================
   🌟 FINAL MODAL POLISH — CENTERED & PREMIUM
   ===================================================== */
/* =====================================================
   🌟 FINAL SAFE MODAL STYLING (NO JS BREAKS)
   ===================================================== */

/* ---------- OVERLAY ---------- */
.modal-overlay {
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(6px);
}

/* ---------- MODAL BASE (DO NOT TOUCH DISPLAY) ---------- */
.create-playlist-modal,
.edit-playlist-modal,
#filter-playlist-modal,
#show-user {
    border: none !important;
    padding: 0 !important;
    background: #ffffff !important;
    border-radius: 18px !important;
    overflow: hidden !important;

    box-shadow:
        0 40px 120px rgba(0, 0, 0, 0.35),
        0 10px 40px rgba(0, 0, 0, 0.15) !important;
}

/* ---------- HEADER ---------- */
.cpm-modal-header {
    margin: 0 !important;
    padding: 22px 26px !important;

    background: linear-gradient(
        135deg,
        var(--flexcare-vert),
        #244f4f
    ) !important;

    color: #ffffff !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    text-align: center;

    border-radius: 18px 18px 0 0 !important;
}

.cpm-modal-header h3 {
    margin: 0 !important;
}

/* ---------- BODY WRAPPER (CENTER CONTENT SAFELY) ---------- */
.create-playlist-modal > input,
.create-playlist-modal > div:not(.cpm-modal-header),
#show-user > input,
#show-user > div:not(.cpm-modal-header) {
    margin-left: auto !important;
    margin-right: auto !important;
}

/* ---------- INPUTS (CENTER BOX ITSELF) ---------- */
.create-playlist-modal input,
#show-user input {
    width: 85% !important;
    max-width: 360px;
    margin: 20px auto !important;
    text-align: center;

    border: none !important;
    border-radius: 12px !important;
    padding: 14px 16px !important;

    background: #f8fafc !important;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.create-playlist-modal input:focus {
    box-shadow:
        inset 0 0 0 2px var(--flexcare-vert),
        0 0 0 4px rgba(61, 107, 107, 0.15);
}

/* ---------- BUTTON CONTAINER (CENTERED) ---------- */
.create-playlist-modal > div:last-child,
#filter-playlist-modal .modal-actions,
#show-user > div:last-child {
    display: flex !important;
    justify-content: center !important;
    gap: 18px;
    padding: 20px 0 26px !important;
}

/* ---------- BUTTON BASE ---------- */
.create-playlist-modal button,
#filter-playlist-modal button {
    min-width: 140px;
    padding: 12px 26px !important;
    border-radius: 999px !important;
    font-weight: 600;
    transition: all 0.25s ease;
}

/* ---------- PRIMARY (CREATE / CONFIRM) ---------- */
.create-playlist-modal button:not(.cancel),
#filter-playlist-modal .terminer-btn {
    background: var(--flexcare-vert) !important;
    color: #ffffff !important;
    box-shadow: 0 10px 24px rgba(61, 107, 107, 0.35);
}

.create-playlist-modal button:not(.cancel):hover,
#filter-playlist-modal .terminer-btn:hover {
    background: var(--flexcare-rose) !important;
    box-shadow: 0 16px 36px rgba(198, 95, 134, 0.45);
    transform: translateY(-2px);
}

/* ---------- CANCEL ---------- */
.create-playlist-modal button.cancel,
#filter-playlist-modal .annuler-btn {
    background: #f1f5f9 !important;
    color: #475569 !important;
}

.create-playlist-modal button.cancel:hover,
#filter-playlist-modal .annuler-btn:hover {
    background: var(--flexcare-rose) !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(198, 95, 134, 0.4);
}
/* =====================================================
   🎯 MODAL SPACING & BUTTON REFINEMENT (TIGHT VERSION)
   ===================================================== */

/* ---------- INPUT SPACING (VERY TIGHT) ---------- */
.create-playlist-modal input,
#show-user input {
    margin: 10px auto 6px auto !important;   /* ⬅ reduced top & bottom */
}

/* ---------- BUTTON CONTAINER (CLOSER TO INPUT) ---------- */
.create-playlist-modal > div:last-child,
#filter-playlist-modal .modal-actions,
#show-user > div:last-child {
    padding: 6px 0 14px !important;          /* ⬅ major reduction */
}

/* ---------- BUTTON SHAPE (SOFT RECTANGLE) ---------- */
.create-playlist-modal button,
#filter-playlist-modal button {
    border-radius: 10px !important;
}

/* ---------- CREATE / CONFIRM BUTTON ---------- */
.create-playlist-modal button:not(.cancel),
#filter-playlist-modal .terminer-btn {
    background: var(--flexcare-vert) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(61, 107, 107, 0.32);
}

/* Hover = deeper green (NOT rose) */
.create-playlist-modal button:not(.cancel):hover,
#filter-playlist-modal .terminer-btn:hover {
    background: #2f5f5f !important;
    box-shadow: 0 8px 20px rgba(61, 107, 107, 0.42);
    transform: translateY(-1px);
}

/* ---------- CANCEL BUTTON ---------- */
.create-playlist-modal button.cancel,
#filter-playlist-modal .annuler-btn {
    background: #f1f5f9 !important;
    color: #475569 !important;
}

/* Hover = ROSE (ONLY CANCEL) */
.create-playlist-modal button.cancel:hover,
#filter-playlist-modal .annuler-btn:hover {
    background: var(--flexcare-rose) !important;
    color: #ffffff !important;
    box-shadow: 0 8px 22px rgba(198, 95, 134, 0.45);
    transform: translateY(-1px);
}

/* ============================================
   🔧 FIX SHARE MODAL USER LIST LAYOUT
   ============================================ */
   
   /* ============================================
   🚑 SHARE MODAL — TRUE ROOT FIX
   ============================================ */

/* ❌ Disable modal-wide centering ONLY for Share modal */
#create-playlist-modal#show-user > div,
#show-user > div {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* User list container — add left breathing room */
#show-user #members-show {
    padding-left: 20px !important;  /* ✅ THIS is the space you want */
    padding-right: 12px !important;
}

/* Each row = normal left-aligned flex */
#show-user .member-item-row {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;

    width: 100% !important;
    box-sizing: border-box !important;

    padding: 6px 0 !important;
    margin: 0 !important;

    gap: 10px !important;
}

/* Checkbox = fixed left item */
#show-user .member-item-row input[type="checkbox"] {
    flex: 0 0 16px !important;
    width: 16px !important;
    height: 16px !important;

    margin: 0 !important;
    padding: 0 !important;

    display: inline-block !important;
}

/* Label flows immediately after checkbox */
#show-user .member-item-row label {
    flex: 1 !important;
    margin: 0 !important;

    font-size: 14px !important;
    color: #2d3748 !important;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* ============================================
   ✅ SHARE MODAL — FORCE LEFT TEXT (FINAL)
   ============================================ */

/* Kill inherited text centering inside Share modal */
#show-user,
#show-user * {
    text-align: left !important;
}

/* Ensure label text starts immediately after checkbox */
#show-user .member-item-row label {
    text-align: left !important;
}

/* =====================================================
   🌟 FINAL SAFE MODAL STYLING (NO JS BREAKS)
   ===================================================== */

/* ---------- OVERLAY ---------- */
.modal-overlay {
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(6px);
}

/* ---------- MODAL BASE (DO NOT TOUCH DISPLAY) ---------- */
.create-playlist-modal,
.edit-playlist-modal,
#filter-playlist-modal,
#show-user {
    border: none !important;
    padding: 0 !important;
    background: #ffffff !important;
    border-radius: 18px !important;
    overflow: hidden !important;

    box-shadow:
        0 40px 120px rgba(0, 0, 0, 0.35),
        0 10px 40px rgba(0, 0, 0, 0.15) !important;
}

/* ---------- HEADER ---------- */
.cpm-modal-header {
    margin: 0 !important;
    padding: 22px 26px !important;

    background: linear-gradient(
        135deg,
        var(--flexcare-vert),
        #244f4f
    ) !important;

    color: #ffffff !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    text-align: center;

    border-radius: 18px 18px 0 0 !important;
}

.cpm-modal-header h3 {
    margin: 0 !important;
}

/* ---------- BODY WRAPPER (CENTER CONTENT SAFELY) ---------- */
.create-playlist-modal > input,
.create-playlist-modal > div:not(.cpm-modal-header),
#show-user > input,
#show-user > div:not(.cpm-modal-header) {
    margin-left: auto !important;
    margin-right: auto !important;
}

/* ---------- INPUTS (CENTER BOX ITSELF) ---------- */
.create-playlist-modal input,
#show-user input {
    width: 85% !important;
    max-width: 360px;
    margin: 20px auto !important;
    text-align: center;

    border: none !important;
    border-radius: 12px !important;
    padding: 14px 16px !important;

    background: #f8fafc !important;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.create-playlist-modal input:focus {
    box-shadow:
        inset 0 0 0 2px var(--flexcare-vert),
        0 0 0 4px rgba(61, 107, 107, 0.15);
}

/* ---------- BUTTON CONTAINER (CENTERED) ---------- */
.create-playlist-modal > div:last-child,
#filter-playlist-modal .modal-actions,
#show-user > div:last-child {
    display: flex !important;
    justify-content: center !important;
    gap: 18px;
    padding: 20px 0 26px !important;
}

/* ---------- BUTTON BASE ---------- */
.create-playlist-modal button,
#filter-playlist-modal button {
    min-width: 140px;
    padding: 12px 26px !important;
    border-radius: 999px !important;
    font-weight: 600;
    transition: all 0.25s ease;
}

/* ---------- PRIMARY (CREATE / CONFIRM) ---------- */
.create-playlist-modal button:not(.cancel),
#filter-playlist-modal .terminer-btn {
    background: var(--flexcare-vert) !important;
    color: #ffffff !important;
    box-shadow: 0 10px 24px rgba(61, 107, 107, 0.35);
}

.create-playlist-modal button:not(.cancel):hover,
#filter-playlist-modal .terminer-btn:hover {
    background: var(--flexcare-rose) !important;
    box-shadow: 0 16px 36px rgba(198, 95, 134, 0.45);
    transform: translateY(-2px);
}

/* ---------- CANCEL ---------- */
.create-playlist-modal button.cancel,
#filter-playlist-modal .annuler-btn {
    background: #f1f5f9 !important;
    color: #475569 !important;
}

.create-playlist-modal button.cancel:hover,
#filter-playlist-modal .annuler-btn:hover {
    background: var(--flexcare-rose) !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(198, 95, 134, 0.4);
}
/* =====================================================
   🎯 MODAL SPACING & BUTTON REFINEMENT (TIGHT VERSION)
   ===================================================== */

/* ---------- INPUT SPACING (VERY TIGHT) ---------- */
.create-playlist-modal input,
#show-user input {
    margin: 10px auto 6px auto !important;   /* ⬅ reduced top & bottom */
}

/* ---------- BUTTON CONTAINER (CLOSER TO INPUT) ---------- */
.create-playlist-modal > div:last-child,
#filter-playlist-modal .modal-actions,
#show-user > div:last-child {
    padding: 6px 0 14px !important;          /* ⬅ major reduction */
}

/* ---------- BUTTON SHAPE (SOFT RECTANGLE) ---------- */
.create-playlist-modal button,
#filter-playlist-modal button {
    border-radius: 10px !important;
}

/* ---------- CREATE / CONFIRM BUTTON ---------- */
.create-playlist-modal button:not(.cancel),
#filter-playlist-modal .terminer-btn {
    background: var(--flexcare-vert) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(61, 107, 107, 0.32);
}

/* Hover = deeper green (NOT rose) */
.create-playlist-modal button:not(.cancel):hover,
#filter-playlist-modal .terminer-btn:hover {
    background: #2f5f5f !important;
    box-shadow: 0 8px 20px rgba(61, 107, 107, 0.42);
    transform: translateY(-1px);
}

/* ---------- CANCEL BUTTON ---------- */
.create-playlist-modal button.cancel,
#filter-playlist-modal .annuler-btn {
    background: #f1f5f9 !important;
    color: #475569 !important;
}

/* Hover = ROSE (ONLY CANCEL) */
.create-playlist-modal button.cancel:hover,
#filter-playlist-modal .annuler-btn:hover {
    background: var(--flexcare-rose) !important;
    color: #ffffff !important;
    box-shadow: 0 8px 22px rgba(198, 95, 134, 0.45);
    transform: translateY(-1px);
}

/* ============================================
   🔧 FIX SHARE MODAL USER LIST LAYOUT
   ============================================ */
   
   /* ============================================
   🚑 SHARE MODAL — TRUE ROOT FIX
   ============================================ */

/* ❌ Disable modal-wide centering ONLY for Share modal */
#create-playlist-modal#show-user > div,
#show-user > div {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* User list container — add left breathing room */
#show-user #members-show {
    padding-left: 20px !important;  /* ✅ THIS is the space you want */
    padding-right: 12px !important;
}

/* Each row = normal left-aligned flex */
#show-user .member-item-row {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;

    width: 100% !important;
    box-sizing: border-box !important;

    padding: 6px 0 !important;
    margin: 0 !important;

    gap: 10px !important;
}

/* Checkbox = fixed left item */
#show-user .member-item-row input[type="checkbox"] {
    flex: 0 0 16px !important;
    width: 16px !important;
    height: 16px !important;

    margin: 0 !important;
    padding: 0 !important;

    display: inline-block !important;
}

/* Label flows immediately after checkbox */
#show-user .member-item-row label {
    flex: 1 !important;
    margin: 0 !important;

    font-size: 14px !important;
    color: #2d3748 !important;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* ============================================
   ✅ SHARE MODAL — FORCE LEFT TEXT (FINAL)
   ============================================ */

/* Kill inherited text centering inside Share modal */
/* LEFT align ONLY the member list */
#show-user #members-show,
#show-user .member-item-row,
#show-user .member-item-row label {
    text-align: left;
}

/* Ensure label text starts immediately after checkbox */
#show-user .member-item-row label {
    text-align: left !important;
}
/* Button container stays centered */
#show-user > div:last-child {
    display: flex;
    justify-content: center;
    text-align: center;
}

/* Buttons themselves */
#show-user button {
    text-align: center;
}

/* ============================================
   ✏️ INPUT TEXT ALIGNMENT — LEFT (ALL MODALS)
   ============================================ */

.create-playlist-modal input,
.edit-playlist-modal input,
#filter-playlist-modal input,
#show-user input,
.create-playlist-modal textarea,
.edit-playlist-modal textarea,
#filter-playlist-modal textarea,
#show-user textarea {
    text-align: left !important;
}






.playlist-helper-text {
    display: none;
    margin: 8px 0 12px 0;
    padding: 10px 14px;

    background: rgba(61, 107, 107, 0.06);
    border-left: 4px solid var(--flexcare-vert);

    font-size: 13px;
    color: var(--texte-clair);
    border-radius: 6px;
}

/* 🔒 FORCE CENTER TEXT INSIDE CREATE / ANNULER BUTTONS */
#show-user button,
#create-playlist-modal button,
#filter-playlist-modal button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
}

#volume-btn {
    flex-shrink: 0;
}

.custom-video-player {
    display: flex;
    flex-direction: column;
}

.custom-video-player video {
    flex: 1;
    width: 100%;
    object-fit: cover;
}

.video-controls {
    height: 48px;
}


/* ===============================
   PLAYLIST TOGGLE — SINGLE SOURCE
   =============================== */

.toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 26px;
    height: 26px;
    cursor: pointer;

    background-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'>\
<path fill='%233D6B6B' d='M4 8l8 8 8-8z'/>\
</svg>");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 70%;

    transform: rotate(-90deg); /* CLOSED */
    transition: transform 0.25s ease;
}

.toggle-icon.open {
    transform: rotate(0deg); /* OPEN */
}


.playlist-helper-text {
    display: none;
}
.playlist-helper-text {
    display: none;
}

/* ===== FINAL PLAYLIST ACCORDION FIX ===== */

#db-playlists-container:not(.collapsed),
#db-playlists-container-admin:not(.collapsed) {
    max-height: 400px !important;
    opacity: 1 !important;
    padding-top: 10px;
    padding-bottom: 10px;
    overflow-y: auto;
}

/* Arrow default = closed (points right) */
.toggle-icon {
    transform: rotate(-90deg);
    transition: transform 0.25s ease;
}

/* Arrow open = down */
.toggle-icon.open {
    transform: rotate(0deg);
}

