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

@property --color-bookie-summary-sidebar-url {syntax: "<color>";inherits: true;initial-value: #111111;}
@property --color-bookie-summary-sidebar-since {syntax: "<color>";inherits: true;initial-value: #7F8C8D;}
@property --color-bookie-summary-sidebar-description {syntax: "<color>";inherits: true;initial-value: #111111;}

.rdg-blocks .rdg-bookie-summary-sidebar {
    width: 100%;
    .preview-thumbs {
        background-image: url('../images/rdg-bookie-summary-sidebar-template-preview.jpg');
    }
    .content {
        width: 100%;
        display: flex;
        flex-direction: column;
        padding: 1rem;
        border-radius: .8rem;

        hr {
            display: block;
            background-color: var(--separator-color);
            border: 0;
            height: var(--separator-border);
            margin-top: var(--separator-margin);
            margin-bottom: var(--separator-margin);
        }

        .buttons {
            display: flex;
            flex-direction: column;
            gap: .6rem;

            hr {
                margin: .5rem 0;
            }

            .item-button {
                display: flex;
                flex-direction: column;

                &.image-type {
                    .body {
                        width: 100%;
                        display: flex;
                        flex-direction: row;
                        padding-top: .5rem;
                        padding-bottom: .5rem;
                        padding-left: var(--body-padding);
                        padding-right: var(--body-padding);
                        background-color: var(--body-bg);
                        border-radius: .6rem;
                        justify-content: center;
                        align-items: center;

                        @media (max-width: 1000px) {
                            & {
                                flex-direction: column;
                            }
                        }
    
                        @media (max-width: $breakpoint-md) {
                            & {
                                flex-direction: row;
                            }
                        }
    
                        @media (max-width: 360px) {
                            & {
                                flex-direction: column;
                            }
                        }

                        .image {
                            display: flex;
                            justify-content: start;
                            align-items: center;
                            max-width: 4rem;
                            margin-right: .5rem;

                            @media (max-width: 1000px) {
                                & {
                                    width: 100%;
                                    max-width: initial;
                                    justify-content: center;
                                    margin-right: 0;
                                    margin-bottom: .5rem;
                                }
                            }

                            @media (max-width: $breakpoint-md) {
                                & {
                                    width: 100%;
                                    max-width: 4rem;
                                    margin-right: .5rem;
                                    margin-bottom: 0;
                                }
                            }

                            @media (max-width: 360px) {
                                & {
                                    width: 100%;
                                    max-width: initial;
                                    margin-right: 0;
                                }
                            }
                        }

                        .texts {
                            display: flex;
                            flex-direction: column;
                            align-items: center;

                            span {
                                font-size: var(--text-size);
                                font-weight: var(--text-weight);
                                color: var(--text-color);
                                padding-bottom: var(--text-padding);
                                text-align: center;
                            }
                        }
                    }
                }

                &.basic-type {
                    width: 100%;
                    padding-top: .5rem;
                    padding-bottom: .5rem;
                    padding-left: var(--button-padding);
                    padding-right: var(--button-padding);
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    border-radius: .6rem;
                    transition: all .2s;
                    font-size: var(--button-size);
                    font-weight: var(--button-weight);

                    color: var(--button-color);
                    border-top: 2px solid var(--button-border);
                    background-color: var(--button-bg);

                    &:hover {
                        background-color: var(--button-hover);
                    }

                    span {
                        text-align: center;
                    }

                    @include color-buttons;
                }
            }
        }

        .header {
            .logo {
                display: flex;
                justify-content: center;
                align-items:flex-start;

                img {
                    max-width: 18rem;
                    max-height: 4rem;

                    @media (max-width: $breakpoint-xl) {
                        & {
                            width: 80%;
                        }
                    }
                }
            }
        }

        .bookie {
            .stars {
                display: flex;
                margin-left: .5rem;
                margin-bottom: .5rem;
                justify-content: center;
                align-items: center;
                gap: .2rem;

                &.ml-0 {
                    margin-left: 0;
                }

                .star {
                    width: 22px;
                    height: 22px;

                    &.star-fill {
                        background-repeat: no-repeat;
                        background-position: center center;
                        background-image: url('../images/star-fill.svg');
                    }

                    &.star-half {
                        background-repeat: no-repeat;
                        background-position: center center;
                        background-image: url('../images/star-half.svg');
                    }

                    &.star-empty {
                        background-repeat: no-repeat;
                        background-position: center center;
                        background-image: url('../images/star.svg');
                    }
                }
            }

            .site {
                display: flex;
                flex-direction: column;
                
                .url {
                    color:var(--color-bookie-summary-sidebar-url);
                }

                .since {
                    color:var(--color-bookie-summary-sidebar-since);
                    margin-bottom: .3rem;
                }

                .description {
                    text-align: justify;
                    padding-bottom: .8rem;
                    color:var(--color-bookie-summary-sidebar-description);
                }
            }
        }

        .methods {
            hr {
                margin-bottom: .5rem;
            }

            .title {
                display: block;
                margin-bottom: .5rem;
            }

            .logos {
                img {
                    max-width: 3.2rem;
                }
            }
        }
    }

    @include message;
}

.acf-block-preview {
    .rdg-bookie-summary-sidebar {
        width: 100%;
        left: 0;
        right: 0;
        margin-left: 0;
        margin-right: 0;
    }
}
