@import '../../../../assets/scss/abstracts/variables';
@import '../../../../assets/scss/abstracts/mixins';

.rdg-blocks .rdg-table {
    width: 100%;

    .header {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        border-top-left-radius: 1rem;
        border-top-right-radius: 1rem;
        border-bottom: .3rem solid;
        background-color: var(--color-rdg-table-title-bg);
        border-color: var(--color-rdg-table-title-border);

        .title {
            width: 100%;
            padding: .5rem;
            display: flex;
            align-items: center;
            justify-content: center;
            

            h1, h2, h3, span {
                margin-bottom: 0;
            }
        }
    }

    .body {
        padding: .5rem 1rem;
        background-color: var(--color-rdg-table-body-bg);

        .tops {
            .top {
                padding-bottom: .3rem;
                border-bottom: 1px solid $color-white;

                &:last-of-type {
                    margin-bottom: 0;
                    border-bottom: none;
                }

                .separator {
                    width: 100%;
                    display: flex;
                    justify-content: space-between;
                    padding: .3rem;

                    .name {
                        display: flex;
                        text-align: center;
                        align-items: center;
                        justify-content: center;
                    }
        
                    .value {
                        display: flex;
                        text-align: center;
                        align-items: center;
                        justify-content: center;
                        color: var(--color-rdg-table-value);
                    }
                }
            }
        }
    }

    .footer {
        padding: .5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        border-bottom-left-radius: 1rem;
        border-bottom-right-radius: 1rem;
        border-top: .3rem solid;
        background-color: var(--color-rdg-table-footer-bg);
        border-color: var(--color-rdg-table-title-border);

        @include link-style('light');
    }
}

.acf-block-preview {
    .rdg-table {
        width: 100%;
        left: 0;
        right: 0;
        margin-left: 0;
        margin-right: 0;
        
        .header {
            background-color: $color-primary-dark-light;
            border-bottom: .3rem solid $color-primary;

            .title {
                h1, h2, h3, span {
                    color:inherit;
                }
            }
        }

        .body {
            background-color: $color-gray;
        }

        .footer {
            background-color: $color-primary-dark-light;
            border-top: .3rem solid $color-primary;
        }
    }
}
