@import url("https://fonts.cdnfonts.com/css/poppins");

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    background: none;
    border: none;
    outline: none;
    font-family: "Poppins", sans-serif;
    text-decoration: none;
    color: #000;
}

::-webkit-scrollbar {
    display: none;
}

body {
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
    background: #fff;
    padding: 20px 40px;
    display: grid;
    place-content: center;
    min-width: 300px;
    width: 100vw;
    min-height: 490px;
    height: 100vh;
    position: relative;
    background-color: #24242e;
    overflow: hidden;
    opacity: 0.8;
    background-image: radial-gradient(#54555b 0.5px, #d6d6e0 0.5px);
    background-size: 10px 10px;

    * {
        transition: 0.4s ease;
    }

    header {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    h1 {
        font-size: 4.6em;
        margin-bottom: -15px;
    }

    .container {
        display: flex;
        gap: 10px 40px;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        padding-block: 40px 0;
    }

    .input-group {
        border: 1px solid #ccc;
        padding: 10px 15px;
        width: 320px;
        border-radius: 12px;
        background: #060606;
        display: flex;
        box-shadow: rgba(50, 50, 93, 0.25) 0px 6px 12px -2px,
            rgba(0, 0, 0, 0.3) 0px 3px 7px -3px;

        ::placeholder {
            color: #bbb;
        }

        * {
            color: #fff;
        }

        input {
            flex: 1;
            font-size: 1em;
        }

        #uploadTrigger {
            width: 30px;
            height: 30px;
            display: grid;
            place-content: center;
            border-radius: 8px;
            cursor: pointer;
            background: rgba(255, 255, 255, 0.08);
        }

        #uploadTrigger:hover {
            background: rgba(255, 255, 255, 0.2);
        }

        #uploadTrigger:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        label {
            cursor: pointer;
        }
    }

    .upload-status {
        min-height: 18px;
        color: #fff;
        font-size: 0.82rem;
        text-align: center;
    }

    .upload-status.is-error {
        color: #ffd6d6;
    }

    @media (max-width: 330px) {
        .inputs {
            right: 10px;
        }
    }

    #qrcode {
        background-image: url("../src/bg.png");
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        width: 250px;
        height: 450px;
        display: flex;
        align-items: center;
        justify-content: center;
        transform: rotate(3deg);
        filter: drop-shadow(3px 3px 3px #6b6666);
    }

    #qr-container {
        cursor: pointer;
    }

    .upload-warning {
        margin-inline: 30px;
        font-size: 0.85rem;
        background: red;
        color: whitesmoke;
        border-radius: 15px;
        padding: 10px 16px;
        max-width: 500px;
        text-align: center;
        position: fixed;
        bottom: 120px;
        z-index: 999;
        transform: translateY(1000%);
        transition: transform .10s ease;
    }

    .footer-content {
        position: absolute;
        bottom: 0;
        left: 0;
        margin: 10px;
        display: flex;
        flex-wrap: wrap;
        z-index: 999;
        gap: 15px;
        border: 1px solid #ccc;
        padding: 10px 12px;
        border-radius: 14px;
        background: #060606;
        box-shadow: rgba(50, 50, 93, 0.25) 0px 6px 12px -2px,
            rgba(0, 0, 0, 0.3) 0px 3px 7px -3px;

        * {
            color: #fff;
            display: flex;
            align-items: center;
            gap: 7px;
            font-size: small;
            white-space: nowrap;
        }

        img {
            border-radius: 6px;
        }

        input,
        button {
            display: none;
        }

        label {
            cursor: pointer;
        }

        a:not(:first-of-type) {
            display: none;
        }

        input:checked~a,
        input:checked~button {
            display: flex;
            cursor: pointer;
        }
    }

    @media (max-width:600px) {

        main {
            margin-top: -40px;
        }

        .footer-content {
            bottom: 55px;
        }
    }
}

.drag-active::before {
    content: "Drag and drop your file here";
    color: #fff;
    z-index: 4;
    font-size: 4em;
    font-weight: bold;
    text-align: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 4px dashed #fff;
    border-radius: 12px;
    padding: 40px 60px;
    width: 70%;
    height: 70%;
    display: grid;
    place-content: center;
    background: #4e4e4e61;
    backdrop-filter: blur(4px);
}

.drag-active::after {
    content: "";
    position: absolute;
    z-index: 3;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #1111113f;
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
}

#uploadStatus {
    color: #212121;
}

.bottom-sheet-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 98;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bottom-sheet-backdrop.is-visible {
    display: block;
    opacity: 1;
}

.bottom-sheet {
    padding-top: 3px;
    position: fixed;
    left: 50%;
    transform: translateX(-50%) translateY(calc(100% - 58px));
    bottom: 0;
    z-index: 99;
    width: calc(100% - 20px);
    max-width: 420px;
    min-width: 300px;
    max-height: 90vh;
    border: 1px solid #ccc;
    border-bottom: none;
    border-radius: 20px 20px 0 0;
    background: #060606;
    box-shadow: rgba(50, 50, 93, 0.25) 0px 6px 12px -2px,
        rgba(0, 0, 0, 0.3) 0px 3px 7px -3px;
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
    display: flex;
    flex-direction: column;
}

.bottom-sheet.is-open {
    transform: translateX(-50%) translateY(0);
}

.bottom-sheet-handle {
    flex-shrink: 0;
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    -webkit-tap-highlight-color: transparent;
}

.bottom-sheet-drag-bar {
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.4);
}

.bottom-sheet-title {
    font-size: 0.95em;
    color: #fff;
    font-weight: 700;
}

.bottom-sheet-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 5px 12px 20px;
}

.history-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: static;
    bottom: auto;
    width: 100%;
    padding: 0;
}

.history-list .history-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    width: 100%;
    text-align: left;
}

.history-list .history-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.history-list .history-item img {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 7px;
    flex-shrink: 0;
}

.history-list .history-item .history-item-details {
    flex: 1;
    min-width: 0;
}

.history-list .history-item .history-item-details p {
    font-size: 0.9em;
    color: #fff;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.history-list .history-item .history-item-details p+p {
    font-size: 0.75em;
    color: rgba(255, 255, 255, 0.6);
}

.history-list .history-item .history-item-remove {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.history-list .history-item .history-item-remove:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.history-list .history-item .history-item-remove i {
    font-size: 1rem;
}

.history-empty {
    padding: 24px 16px;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9em;
}

.modal {
    display: none;
    position: fixed;
    inset: 0;
    justify-content: center;
    align-items: center;
    z-index: 1001;
}

.modal.is-open {
    display: flex;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transition: 0.2s;
    z-index: 1000;
}

.modal-backdrop.is-visible {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #fff;
    padding: 30px 40px 60px;
    max-height: 80vh;
    overflow-y: auto;
    border-radius: 8px;
    width: 90%;
    max-width: 700px;

    button {
        display: flex;
        align-self: end;
        margin-left: auto;
        cursor: pointer;
    }

    h2 {
        text-align: center;
    }

    .modal-body {
        text-align: justify;

        .left {
            display: flex;
            gap: 6px;
            justify-content: end;
            margin-block: 40px 15px;
        }

        h3,
        h4,
        ul {
            margin-block: 13px;
        }

        h4,
        h4+p,
        ul {
            margin-left: 25px;
        }
    }
}