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

@property --color-rdg-table-title-bg {syntax: "<color>";inherits: true;initial-value: #0160ac;}
@property --color-rdg-table-title-border {syntax: "<color>";inherits: true;initial-value: #3a96e0;}
@property --color-rdg-table-body-bg {syntax: "<color>";inherits: true;initial-value: #f1f1f1;}
@property --color-rdg-table-value {syntax: "<color>";inherits: true;initial-value: #0160ac;}
@property --color-rdg-table-footer-bg {syntax: "<color>";inherits: true;initial-value: #0160ac;}
@property --color-rdg-table-footer-border {syntax: "<color>";inherits: true;initial-value: #3a96e0;}
@property --color-rdg-table-top-border {syntax: "<color>";inherits: true;initial-value: #ffffff;}
@property --color-rdg-table-header-bg {syntax: "<color>";inherits: true;initial-value: #0160ac;}
@property --color-rdg-table-header-border {syntax: "<color>";inherits: true;initial-value: #3a96e0;}
@property --color-rdg-table-header-body {syntax: "<color>";inherits: true;initial-value: #F1F1F1;}

.rdg-blocks .rdg-table {
    .preview-thumbs {
        background-image: url('../images/rdg-table-template-preview.jpg');
    }

    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 var(--color-rdg-table-top-border);

                &: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: var(--color-rdg-table-header-bg);
            border-bottom: .3rem solid var(--color-rdg-table-header-border);

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

        .body {
            background-color: var(--color-rdg-table-header-body);
        }

        .footer {
            background-color: var(--color-rdg-table-footer-bg);
            border-top: .3rem solid var(--color-rdg-table-footer-border);
        }
    }
}
