
:root {
    --item-width: 150px;
    --body-BG: #232323;
    --box-color: #c8c8c8;
    --box-title: #ffffff;
    --box-BG: #181818;
    --box-border: #333333;
    --box-sel-BG: #000000;
    --box-sel-border: #454545;

    --dialog-bg: #0b0f14;
    --dialog-border: #1f2937;
    --dialog-shadow: 0 10px 30px rgba(0,0,0,.55);
    --dialog-radius: 16px;
    --backdrop-bg: #131a2ba3;

    --text: #9aa3af;
    --text-high: #e5e7eb;

    --bt-cancel: #5d5d5d;
    --bt-ok: #ef4444;
    --bt-ok-sel:#dc2626;
    --bt-border: #1f2937;
}

body {
    background-color: var(--body-BG);
    font: 16px/1.5 system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
}

.VideoList {
	display: flex;
	flex-wrap: wrap;
    margin: 14px 4px;
    gap: 8px;
}

.VideoArea {
    position: relative;
    cursor: grab;
    user-select: none;
}
.VideoArea:active {
    cursor: grabbing;
}
.VideoArea.is-dragging {
    opacity: 0.6;
    transform: scale(0.98);
}

.VideoBox {
    display: inline-block;
    text-decoration: none;
    text-align: center;
    font-family:'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
    width: var(--item-width);
    height: 194px;
    color: var(--box-color);
    padding: 6px;
    background-color: var(--box-BG);
    border: 1px solid var(--box-border);
    border-radius: 6px;
    cursor: default;
}
.VideoBox:hover {
    background-color: var(--box-sel-BG);
    border: 1px solid var(--box-sel-border);
}
.VideoBox:hover + .BtDelete{
    display: block;
}

.VideoBox span {
    display: block;
    margin-bottom: 6px;
    text-align: left;
    text-transform: uppercase;
    width: var(--item-width);
    font-size: 11pt;

    overflow:hidden;
    white-space:nowrap;

    text-overflow: ellipsis;
    -webkit-user-drag: none;
}

.VideoBox img {
    display: block;
    width: var(--item-width);
    margin-bottom: 6px;
    -webkit-user-drag: none;
}

.VideoBox div {
    display: block;
    font-weight: bold;
    text-align: left;
    margin: 12px 0 5px 0;
    height: 70px;
    color: var(--box-title);
    font-size: 11pt;

    display: -webkit-box;
    max-width: var(--item-width);
    line-clamp: 3;
    -webkit-line-clamp: 3;
    box-orient: vertical;
    -webkit-box-orient: vertical;
    overflow: hidden;
    -webkit-user-drag: none;
}

.BtDelete {
    display: none;
	margin: 0px;
	font-size: 19px;
	background-color: transparent;
	color: var(--text);
	border: none;
	padding: 0px;
	cursor: default;
	z-index: 100;
	position: absolute;
    top: 8px;
	right: 7px;
}

.BtDelete:hover{
    display: block;
	color: var(--bt-ok);
}


/**********************************************************************************/

.sort-placeholder {
    position: relative;
    width: var(--item-width);
    border: 2px dashed var(--box-border);
    border-radius: 6px;
    background: repeating-linear-gradient( 45deg, transparent 0 6px, #0000000a 6px 12px );
}

.sorting * {
    pointer-events: none;
}
.sorting .VideoBox.is-dragging,
.sorting .VideoList,
.sorting .VideoList * {
    pointer-events: auto;
}

/**********************************************************************************/

.modal{
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    z-index: 1000;
}
.modal[hidden]{ display: none; }

.backdrop{
    position: absolute;
    inset: 0;
    background-color: var(--backdrop-bg);
    backdrop-filter: blur(2px) saturate(120%);
    -webkit-backdrop-filter: blur(6px) saturate(120%);
    width: 100%;
    height: 100%;
}

.dialog{
    position: relative;
    width: min(560px, 100%);
    background-color: var(--dialog-bg);
    border: 1px solid var(--dialog-border);
    border-radius: var(--dialog-radius);
    box-shadow: var(--dialog-shadow);
    padding: 22px;
    transform: translateY(8px) scale(.98);
    transition: transform .22s ease, opacity .22s ease;
}

.dialog header{
    display: block;
    align-items: start;
    user-select: none;
}

.dialog h2{
    margin: 0;
    font-size: 18px;
    line-height: 1.2;
    color: var(--text-high);
}

.dialog div {
    margin-top: 15px;
    font-size: 16px;
    font-style: italic;
    color: var(--text-high);
}

.dialog p{
    margin: 12px 0 0;
    color: var(--text);
}

.dialog footer{
    margin-top: 18px;
    display: flex;
    gap: 10px;
    justify-content: end;
}


.BtDefault{
    appearance: none;
    border: 1px solid var(--bt-border);
    background-color: transparent;
    color: var(--text-high);
    padding: 10px 14px;
    border-radius: 12px;
    font-weight: 600;
    user-select: none;
    cursor: default;
    transition: transform .04s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}

.BtDefault:hover{ transform: translateY(-1px); }
.BtDefault:active{ transform: translateY(0); }

.BtCancel{
    background-color: var(--bt-cancel);
}

.BtConfirm{
    background-color: var(--bt-ok);
    color: #fff;
    border-color: var(--bt-ok);
}
.BtConfirm:hover{
    background-color: var(--bt-ok-sel);
    border-color: var(--bt-ok-sel);
}

