﻿/*:root {
    --bg-dark: #f3f3f3;
    --bg-darker: #eaeaea;
    --fg-dark: rgba(0, 0, 0, 0.5);
}

body {
    display: flex;
    flex-direction: column;
    font-size: 13px;
    font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
    height: calc(100vh - 20px);
    margin: 10px;
}
*/
.button,
input[type=button] {
    cursor: pointer;
    display: inline-flex;
    /*height: 32px;*/
    /*background-color: var(--bg-darker);*/
    border: none;
    outline: none;
    min-width: 100px;
    font-size: 13px;
    margin-left: 4px;
    text-align: center;
    justify-content: center;
}

    input[type=button]:disabled {
        color: #a0a0a0;
        text-shadow: 1px 1px #fcffff;
    }

input[type=number] {
    width: 30px;
    background-color: var(--bg-darker);
    border: none;
    outline: none;
    font-size: 11px;
    padding: 10px;
}

input[type=file] {
    display: none;
}

label {
    user-select: none;
    display: flex;
    align-items: center;
}

audio {
    height: 30px;
    outline: none;
}

#entries-container {
    display: flex;
    flex: 1;
   /* height: 64px;*/
    border: solid 1px var(--bg-darker);
}

#entries {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1;
    overflow: auto;
    height: 100%;
}

    #entries:empty {
        align-items: center;
        justify-content: center;
        background-color: var(--bg-dark);
    }

        #entries:empty::before {
            content: 'Bấm "Thêm tệp" hoặc kéo thả tệp của bạn vào đây. Bạn có thể sắp xếp lại thứ tự của các tệp nếu cần thiết. Bấm nút "Ghép tệp" để thực hiện ghép các tệp của bạn.';
            text-align: center;
            color: var(--fg-dark);
            padding: 10px;
        }

.entry {
    display: grid;
    column-gap: 5px;
    grid-template-columns: 20px 1fr minmax(min-content, 80px) 20px;
    grid-template-rows: auto;
    grid-template-areas:
        "drag name audio close"
        "drag name audio close";
    width: 100%;
    white-space: nowrap;
    margin-bottom: 2px;
}

    .entry [data-id="close"] {
        grid-area: close;
        user-select: none;
    }

    .entry [data-id="drag"] {
        grid-area: drag;
        user-select: none;
    }

    .entry > :nth-child(2),
    .entry > :nth-child(3) {
        display: flex;
        align-items: center;
    }

    .entry > :nth-child(2) {
        grid-area: name;
        overflow: hidden;
    }

        .entry > :nth-child(2) [data-id="name"] {
            text-overflow: ellipsis;
            overflow: hidden;
            padding: 5px 0;
        }

    .entry > :nth-child(3) {
        grid-area: audio;
        display: flex;
        justify-content: flex-end;
    }

    .entry [data-id="drag"],
    .entry [data-id="close"] {
        background-color: var(--bg-dark);
        cursor: pointer;
        font-size: 140%;
        height: 100%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .entry [data-id="msg"]:not(:empty) ~ [data-id="name"] {
        display: none;
    }

@media screen and (max-width: 600px) {
    .entry {
        grid-template-areas:
            "drag name name close"
            "drag audio audio close";
    }

    audio {
        width: 100%;
    }

    #pause {
        display: none;
    }
}

.entry.disabled {
    opacity: 0.8;
}

.entry [data-id="warning"] {
    color: #f33;
}

fieldset {
    min-width: 100px;
    white-space: nowrap;
    background-color: var(--bg-dark);
    border: solid 1px var(--bg-darker);
    margin: 0;
}

    fieldset.hidden {
        display: none;
    }

    fieldset > div:first-of-type {
        margin-bottom: 5px;
        display: flex;
        align-items: center;
    }

legend {
    padding: 5px;
}

.download {
    display: flex;
    margin-bottom: 2px;
}

    .download audio {
        flex: 1;
    }

    .download input {
        background: url(../imgs/download.svg) no-repeat center center;
        border: none;
        margin: 0 20px;
        cursor: pointer;
        outline: none;
    }

        .download input:active {
            transform: translateY(2px);
        }
