@import url("https://fonts.cdnfonts.com/css/cascadia-code");

body {
    background-color: #202020;
    color: #e4e4e4;
    margin: 0;
    width: 100%;
    font-family: Consolas, "Cascadia Mono", monospace;

    display: flex;
    flex-direction: column;
    align-items: center;
}

body:has(#overlay-container.active) {
    overflow: hidden;
}

#overlay-container {
    background-color: rgba(0, 0, 0, 0.5);
    position: fixed;

    width: 100vw;
    height: 100dvh;

    display: none;
    align-items: center;
    justify-content: center;
}

#overlay-container.active {
    display: flex;
}

.overlay {
    background-color: #202020;
    border-radius: 16px;

    width: clamp(280px, 20vw, 480px);
    
    padding: 16px 64px;

    display: none;
    flex-direction: column;
    align-items: center;   
}

.overlay.active {
    display: flex;
}

.settings-field {
    text-align: center;
    margin-bottom: 32px;
}

.settings-field .field-name {
    font-size: 1.3em;
}

.settings-field .field-description {
    color: #808080;
}

.settings-field p {
    margin: 4px 0;
}

.settings-field input {
    background-color: #303030;
    color: #E0E0E0;
    padding: 4px 8px;
    text-align: center; 
    outline: none;
    border: 1px solid #505050;
    border-radius: 8px;

    font-size: 2em;
    margin-top: 16px;
}

.settings-field input[type=number] {
    width: 2em;
}

.settings-field input[type=password] {
    width: 6em;
}

.settings-field input[type=number]::-webkit-inner-spin-button {
    appearance: none;
}

.overlay #button-done {
    background-color: #E0E0E0;
    color: #202020;
    border-radius: 8px;
    padding: 4px 16px;
    font-size: 1.5em;
    text-align: center;
    margin-bottom: 16px;
    cursor: pointer;

    transition: background-color 0.2s;
}

.overlay #button-done:hover {
    background-color: #BEBEBE;
}

#overlay-content {
    display: none;
}

#overlay-content.active {
    display: block;
}

#title {
    margin-top: 15vh;
    margin-bottom: 8px;
    font-size: 3em;
}

#subtitle {
    margin-top: 8px;
    font-size: 1.2em;
}

#file-dropzone {
    background-color: #252525;
    color: #8b8b8b;
    width: 50vw;
    height: 30vh;
    min-height: 160px;
    cursor: pointer;
    border: 2px dashed #3c3c3c;
    border-radius: 16px;
    box-sizing: border-box;
    padding: 12px 12px;
    margin-top: 64px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

#file-dropzone p {
    margin: 4px 0;
}

#file-dropzone.dragover {
    background-color: #303030;
}

#settings-btn {
    display: flex;
    align-items: center;
    border-radius: 6px;
    padding: 6px 6px;
    cursor: pointer;

    user-select: none;

    transition: background-color 0.2s;
}

#settings-btn:hover {
    background-color: #303030;
}

#settings-btn img {
    width: 22px;
    height: auto;
    margin-right: 4px;
}

#settings-btn p {
    margin: 0;
}

#total-info-container {
    color: #8b8b8b;
    width: 50vw;

    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-top: 32px;
}

#file-list {
    display: flex;
    flex-direction: column;
    margin: 24px 0;
    border-radius: 16px;
    overflow: hidden;
    width: 50vw;
}

#upload-btn {
    display: none;
    flex-direction: row;
    align-items: center;

    background-color: #E0E0E0;
    color: #000;
    cursor: pointer;
    
    font-size: 1.5em;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 32px;

    transition: background-color 0.2s;
}

#upload-btn:hover {
    background-color: #BEBEBE;
}

#upload-btn p {
    margin: 0;
}

#upload-btn img {
    margin-right: 8px;
    width: 32px;
    height: auto;
}

#upload-btn.active {
    display: flex;
}

.file {
    display: flex;
    align-items: center;
    justify-content: center;

    width: inherit;
    height: auto;
    min-height: 64px;
    background-color: #303030;
}

.file span {
    margin-left: 24px;
    flex: 1;

    word-break: break-word;
    overflow-wrap: break-word;
}

.file button {
    margin-right: 24px;
    margin-left: 16px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 1.05em;
    font-family: Arial;

    background-color: #ff3838;
    color: #FFF;
    outline: none;
    border: none;
    border-radius: 8px;
    flex-shrink: 0;

    transition: background-color 0.2s;
}

.file button:hover {
    background-color: #d02e2e;
}

/* Mobile */
@media (max-width: 768px) {
    #title {
        margin-top: 6vh;
        font-size: 2em;
    }

    #subtitle {
        font-size: 0.9em;
        text-align: center;
        padding: 0 16px;
    }

    #file-dropzone {
        width: 92vw;
        margin-top: 28px;
        font-size: 0.8em;
    }

    #total-info-container {
        width: 92vw;
        font-size: 0.85em;
        margin-top: 20px;
    }

    #file-list {
        width: 92vw;
    }

    .file span {
        font-size: 0.85em;
        margin-left: 14px;
    }

    .file-button {
        margin-right: 14px;
        font-size: 0.9em;
        padding: 6px 8px;
    }
}

#upload-done-overlay {
    text-align: center;
}

a {
    min-width: 0;
    word-break: break-word;
}