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

.rdg-blocks .rdg-bookie-selector {
    width: 100%;

    .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');
                        fill: var(--color-bookie-summary-stars);
                    }

                    &.star-half {
                        background-repeat: no-repeat;
                        background-position: center center;
                        background-image: url('../images/star-half.svg');
                        fill: var(--color-bookie-summary-stars);
                    }

                    &.star-empty {
                        background-repeat: no-repeat;
                        background-position: center center;
                        background-image: url('../images/star.svg');
                        fill: var(--color-bookie-summary-stars);
                    }
                }
            }

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

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

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

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

            .title {
                display: block;
                font-size: 1.1rem;
                font-weight: 600;
                margin-bottom: .5rem;
            }

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

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

        .content {
            a {
                text-decoration: none;
            }
        }
    }
}
