[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) {
                div.diffs {
                    display: flex;
                }

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

            div.diffs {
                display: none;
                flex-direction: column;
                gap: 10px;
                margin-top: 20px;

                div.diff {
                    border: solid 1px var(--taurusNetworkDarkBlue);
                    display: flex;
                    align-items: center;
                    gap: 5px;
                    padding: 10px;
                    background-color: rgb(230, 230, 230);

                    p.field {
                        font-weight: bold;
                        width: 100px;
                    }

                    p.old, p.new {
                        flex: 1;
                        width: 100%;
                        font-family: 'Consolas', monospace;
                    }

                    &.header {
                        font-weight: bold;
                        border: none;
                    }

                    @media (max-width: 600px) {
                        flex-direction: column;
                        align-items: center;
                        text-align: center;

                        &.header {
                            display: none;
                        }
                    }
                }
            }
        }
    }
}