[data-audit-viewer] {
    position: relative;
    min-height: 150px;

    div.loader {
        display: none;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1;
        background-color: rgba(0, 0, 0, 0.2);

        span {
            margin-top: 20px;
            font-size: 0.8rem;
        }
    }

    &.loading {
        div.loader {
            display: flex;
        }

        div.empty {
            display: none;
        }
    }

    &:has(div.changes > label.card) {
        div.empty {
            display: none !important;
        }
    }

    div.changes {
        display: flex;
        flex-direction: column;
        gap: 20px;

        label.card {
            cursor: pointer;

            div.top {
                display: flex;
                justify-content: flex-start;
                align-items: center;
                gap: 10px;

                div.caret {
                    svg {
                        width: 20px;
                        height: 20px;
                    }
                }

                p.type {
                    font-weight: bold;
                    font-family: 'Consolas', monospace;
                    font-size: 1.2rem;
                }
            }

            input {
                display: none;
            }

            &:has(input:checked) {
                table.diffs {
                    display: table !important;
                }

                div.top {
                    div.caret {
                        svg {
                            transform: rotate(180deg);
                        }
                    }
                }
            }

            table.diffs {
                display: none;
                margin-top: 20px;
                background-color: rgb(230, 230, 230);

                tr, td {
                    background-color: rgb(230, 230, 230);
                }

                td.field {
                    font-weight: bold;
                    width: fit-content;
                }

                td.arrow {
                    width: fit-content;
                }

                td.new, td.old {
                    width: 50%;

                    &.old {
                        text-align: right;
                    }
                }
            }
        }
    }
}