.history-parent {
    background-color: #0000004d;
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    height: 100vh;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 100000;

    .history-area {
        width: 100%;
        height: 100%;
        max-width: 720px;
        min-height: 424px;
        height: fit-content;
        max-height: 424px;
        background-color: #fff;
        border-radius: 16px;
        overflow: hidden;
        position: relative;

        &:has(.load-more-area:not(.d-none)) {
            padding-bottom: 64px;
        }

        &:has(.history-header.single-item-header) {
            padding-bottom: 0px;
        }

        .history-header {
            width: 100%;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 16px 20px 15px 20px;
            border-bottom: 1px solid #edeff2;

            span:first-child {

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

                p {
                    font-weight: 700;
                    font-size: 16px;
                    line-height: 24px;
                    color: #1c385c;
                }

                .go-back {
                    height: 20px;
                    width: 20px;
                    cursor: pointer;
                    transform: rotate(90deg);
                }
            }



            .history-file-info {
                display: flex;
                align-items: center;
                gap: 8px;

                .go-back {
                    height: 20px;
                    width: 20px;
                    cursor: pointer;
                    transform: rotate(90deg);
                    margin-right: 8px;
                }

                .history-item-image {
                    height: 32px;
                    width: 32px;
                    object-fit: cover;
                    border-radius: 6px;
                    border: none;
                }

                .history-file-name {
                    font-weight: 700;
                    font-size: 16px;
                    line-height: 24px;
                    color: #1C385C;
                }

                .converted-mode-tag {
                    padding: 2px 4px;
                    background-color: #edeff2;
                    font-weight: 700;
                    font-size: 10px;
                    line-height: 14px;
                    color: #49607d;
                    border-radius: 4px;
                }
            }


            .header-action-area {

                display: flex;
                justify-content: center;
                align-items: center;
                gap: 8px;


                .historyDownloadButton,
                .copyHistoryButton {
                    cursor: pointer;
                    padding: 4px 10px;
                    border-radius: 6px;
                    box-shadow: 0 0 0 1px #dde1e7;
                    font-weight: 600;
                    font-size: 14px;
                    line-height: 20px;
                    text-align: center;
                    color: #1c385c;
                    border: none;
                    background-color: transparent;
                    transition: 0.2s ease-in-out;
                    display: flex;
                    justify-content: center;
                    align-items: center;
                    gap: 4px;
                    position: relative;
                    user-select: none;

                    >img {
                        display: none;
                    }

                    &:hover {
                        background-color: #edeff2;
                    }

                    &:has(.history-download-dropdown:hover) {
                        background-color: #fff;
                    }

                    /* .download_dropdown_icon {
                        transition: 0.2s ease-in-out;

                        &.rotate-image {
                            transform: rotate(180deg);
                        }
                    } */

                    /* .history-download-dropdown {
                        position: absolute;
                        display: flex;
                        flex-direction: column;
                        align-items: center;
                        justify-content: center;
                        top: 32px;
                        box-shadow: 0px 2px 25px 0px #0000001F;
                        border-radius: 8px;
                        padding: 6px;
                        z-index: 1;
                        width: 100%;
                        background-color: #fff;

                        button {
                            background-color: #fff;
                            padding: 8px;
                            border: none;
                            width: 100%;
                            font-weight: 600;
                            font-size: 12px;
                            line-height: 14px;
                            color: #1C385C;
                            text-align: left;
                            transition: 0.2s ease-in-out;
                            cursor: pointer;

                            &:hover {
                                background-color: #F7F8FA;
                            }
                        }
                    } */
                }
            }



            .close-history {
                height: 20px;
                width: 20px;
                display: flex;
                justify-content: center;
                align-items: center;
                background-color: transparent;
                border: transparent;
                cursor: pointer;
                margin-left: 8px;
                opacity: 0.5;
                transition: 0.2s ease-in-out;

                &:hover {
                    opacity: 1;
                }
            }
        }


        .history-body {
            width: 100%;
            height: 100%;
            min-height: 360px;
            max-height: 360px;
            overflow: auto;

            &:has(.load-more-area:not(.d-none)) {
                min-height: 296px;
                max-height: 296px;
            }

            &.single-file-body {

                .history_result_text {

                    h1 {
                        font-size: 28px !important;
                        margin: 0px !important;
                    }

                    ul {
                        padding-left: 20px !important;
                    }
                }

            }

            .user-convert-history {
                table {
                    height: fit-content;
                    width: 100%;
                    border-collapse: collapse;

                    thead {
                        position: sticky;
                        top: 0;
                        background: #fff;
                        box-shadow: 0 1px 0 0 #edeff2;

                        tr {
                            th {
                                text-align: left;
                                font-weight: 700;
                                font-size: 12px;
                                line-height: 16px;
                                color: #8e9bae;
                                padding: 12px 0 !important;

                                &:first-child {
                                    padding-left: 20px !important;
                                    width: 45%;
                                }

                                &:last-child {
                                    padding-right: 20px !important;
                                }
                            }
                        }
                    }

                    tbody {
                        tr {
                            box-shadow: 0 1px 0 0 #edeff2;
                            transition: 0.2s ease-in-out;

                            &:hover {
                                background-color: #fafafa;
                                cursor: pointer;
                            }

                            td:first-child {
                                display: flex;
                                align-items: center;
                                gap: 8px;

                                p {
                                    font-weight: 600;
                                    font-size: 12px;
                                    line-height: 16px;
                                    color: #1c385c;
                                }
                            }

                            td {
                                font-weight: 600;
                                font-size: 12px;
                                line-height: 16px;
                                color: #49607D;
                                padding: 16px 0 !important;
                                text-align: left;

                                &:first-child {
                                    padding-left: 20px !important;
                                }

                                &:last-child {
                                    padding-right: 20px !important;
                                }
                            }
                        }
                    }
                }

                .listOf-converted-items {
                    height: fit-content;
                    width: 100%;
                    display: flex;
                    flex-direction: column;

                    .converted-item {
                        display: flex;
                        justify-content: space-between;
                        align-items: center;
                        width: 100%;
                        padding: 16px 20px;
                        box-shadow: 0 1px 0 0 #edeff2;

                        .converted-image-info-area {
                            display: flex;
                            gap: 8px;
                            align-items: center;

                            img {
                                height: 32px;
                                width: 32px;
                                object-fit: cover;
                                border-radius: 6px;
                            }

                            .converted-image-details {
                                display: flex;
                                gap: 8px;
                                align-items: center;

                                p {
                                    font-weight: 500;
                                    font-size: 14px;
                                    line-height: 20px;
                                    color: #1c385c;
                                }

                                span {
                                    padding: 2px 4px;
                                    background-color: #edeff2;
                                    font-weight: 700;
                                    font-size: 10px;
                                    line-height: 14px;
                                    color: #49607d;
                                    border-radius: 4px;
                                }
                            }
                        }

                        .viewItemDetails {
                            cursor: pointer;
                            padding: 4px 8px;
                            border-radius: 6px;
                            box-shadow: 0 0 0 1px #dde1e7;
                            font-weight: 600;
                            font-size: 12px;
                            line-height: 18px;
                            text-align: center;
                            color: #1c385c;
                            border: none;
                            background-color: transparent;
                            transition: 0.2s ease-in-out;

                            &:hover {
                                background-color: #edeff2;
                            }
                        }

                        &:hover {
                            background-color: #fafafa;
                            box-shadow: 0 0px 0 1px #edeff2;

                        }
                    }
                }

                .load-more-area {
                    border-top: 1px solid #dde1e7;
                    background-color: #fff;
                    position: absolute;
                    bottom: 0;
                    width: 100%;
                    padding: 17px 20px 18px 20px;
                    display: flex;
                    justify-content: center;
                    align-items: center;

                    button {
                        box-shadow: 0 0 0 1px #dde1e7;
                        padding: 4px 10px;
                        border-radius: 6px;
                        display: flex;
                        justify-content: center;
                        align-items: center;
                        gap: 4px;
                        font-weight: 600;
                        font-size: 14px;
                        line-height: 20px;
                        text-align: center;
                        color: #1c385c;
                        background-color: transparent;
                        border: none;
                        cursor: pointer;
                        transition: 0.2s ease-in-out;

                        &:hover {
                            background-color: #edeff2;
                        }

                        img {
                            height: 20px;
                            width: 20px;
                        }
                    }
                }
            }

            .no-history-found {
                width: 100%;
                height: 360px;
                display: flex;
                flex-direction: column;
                justify-content: center;
                align-items: center;
                gap: 12px;

                img {
                    width: 97px;
                    height: auto;
                }

                span {
                    display: flex;
                    flex-direction: column;
                    justify-content: center;
                    align-items: center;
                    gap: 4px;

                    .history-null {
                        font-weight: 700;
                        font-size: 16px !important;
                        line-height: 24px;
                        text-align: center;
                        color: #1c385c;
                    }

                    p {
                        font-weight: 500;
                        font-size: 12px;
                        line-height: 16px;
                        color: #49607d;
                    }
                }

                &.upgrade-for-history {
                    gap: 16px;

                    img {
                        width: 40px;
                        height: 40px;
                    }

                    a {
                        border-radius: 8px;
                        padding: 6px 12px;
                        font-weight: 600;
                        font-size: 14px;
                        line-height: 20px;
                        text-align: center;
                        background-color: #1C385C;
                        color: #fff;
                        transition: 0.2s ease-in-out;
                        min-width: 128px;
                        width: fit-content;

                        &:hover {
                            background-color: #2A4F82;
                        }

                    }
                }
            }
        }

        .loading-overlay {
            background-color: #dde1e78c;
            height: 100%;
            width: 100%;
            position: absolute;
            top: 0;
            z-index: 100;
            display: flex;
            justify-content: center;
            align-items: center;
            user-select: none;
        }

        .history_result_text {
            font-weight: 500;
            font-size: 16px;
            line-height: 24px;
            letter-spacing: 0%;
            color: #1C385C;
            padding: 20px;
            text-align: left;


            * {
                font-size: revert;
                font-weight: revert;
            }
            table {
                border-spacing: 0 !important;
                box-shadow: 0 0 0 .5px #f1eded;

                * {
                    white-space: nowrap !important
                }

                tr td,
                tr th {
                    box-shadow: 0 0 0 .5px #f1eded;
                    padding: 8px
                }
            }
        }

        @media(max-width: 748px) {
            width: calc(100% - 27px);

            .history-file-info {
                .go-back {
                    margin-right: 0px !important;
                }
            }
        }

        @media(max-width: 600px) {
            .header-action-area {

                .copyHistoryButton,
                .historyDownloadButton {

                    padding: 4px !important;
                    border-radius: 0px !important;
                    border: none !important;
                    box-shadow: none !important;

                    >img {
                        display: block !important;
                    }

                    >span {
                        display: none !important;
                    }

                    &:hover {
                        background-color: transparent !important;
                    }
                }

                .close-history {
                    padding: 4px !important;
                    border-radius: 0px !important;
                    border: none !important;
                    box-shadow: none !important;
                    height: 28px;
                    width: 28px;
                    margin: 0;
                }
            }
        }
    }
}