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

@property --color-shr-recaps-links-primary {syntax: "<color>";inherits: true;initial-value: #0160ac;}
@property --color-shr-recaps-links-gray {syntax: "<color>";inherits: true;initial-value: #dedede;}

.shr-blocks {
    &.sticky {
        position: sticky;
        top: 0;
        z-index: 1000;
    }

    .sh-recap-links {
        width: calc(var(--vw, 1vw) * 100);
        position: relative;
        left: 50%;
        right: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
        max-width: 100vw;

        background: linear-gradient(
            to right,
            var(--color-shr-recaps-links-primary) 0%,
            var(--color-shr-recaps-links-primary) 50%,
            var(--color-shr-recaps-links-gray) 50%,
            var(--color-shr-recaps-links-gray) 100%
        );
    
        @media (max-width: $breakpoint-md) {
            & {
                background: none;
                background-color: var(--color-shr-recaps-links-gray);
            }
        }
    
        .container.content {
            padding-left: 20px;
            padding-right: 20px;
    
            .links-body {
                width: 100%;
                display: flex;
                background-color: var(--color-shr-recaps-links-gray);
    
                @media (max-width: $breakpoint-md) {
                    & {
                        flex-direction: column;
                    }
                }
    
                .primary {
                    width: 20%;
                    display: flex;
                    border-top-right-radius: .7rem;
                    border-bottom-right-radius: .7rem;
                    padding-right: .5rem;
                    text-align: center;
                    color: var(--color-white);
                    background-color: var(--color-shr-recaps-links-primary);

                    @media (max-width: $breakpoint-md) {
                        & {
                            width: 100%;
                            padding: .7rem;
                            border-radius: .7rem;
                        }
                    }

                    span {
                        width: 100%;
                        display: flex;
                        justify-content: center;
                        align-items: center;
                    }
                }

                .default {
                    width: 80%;
                    display: flex;
                    flex-wrap: wrap;
                    gap: 0 1rem;
                    padding-left: .5rem;
                    justify-content: space-around;
                    background-color: var(--color-shr-recaps-links-gray);

                    .link {
                        display: flex;
                        justify-content: center;
                        align-items: center;
                        padding-top: 1rem;
                        padding-bottom: 1rem;
                        text-align: center;

                        a {
                            display: flex;
                            align-items: center;
                            color: var(--color-black);
                            text-decoration: none;
                            
                            &:hover {
                                color: var(--color-shr-recaps-links-primary);
                            }

                            img {
                                margin-right: .3rem;
                            }
                        }
                    }

                    @media (max-width: $breakpoint-md) {
                        & {
                            width: 100%;
                            padding-left: 0;
                        }
                    }
                }
            }
        }
    }
}

.acf-block-preview {
    .sh-recap-links {
        width: 100%;
        left: 0;
        right: 0;
        margin-left: 0;
        margin-right: 0;

        .default {
            .link {
                a {
                    text-decoration: none;
                }
            }
        }
    }
}
