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

@property --color-rdg-handicappers-filter-header {syntax: "<color>";inherits: true;initial-value: #03467d;}
@property --color-rdg-handicappers-filter-header-hover {syntax: "<color>";inherits: true;initial-value: #e11414;}
@property --color-rdg-handicappers-filter-bg {syntax: "<color>";inherits: true;initial-value: #ffffff;}
@property --color-rdg-handicappers-filter-border {syntax: "<color>";inherits: true;initial-value: #EEF4FC;}
@property --color-rdg-handicappers-filter-shadow {syntax: "<color>";inherits: true;initial-value: #F3F3F3;}
@property --color-rdg-handicappers-filter-line {syntax: "<color>";inherits: true;initial-value: #67748e66;}
@property --color-rdg-handicappers-filter-stats {syntax: "<color>";inherits: true;initial-value: #878787;}
@property --color-rdg-handicappers-filter-btn {syntax: "<color>";inherits: true;initial-value: #03467d;}
@property --color-rdg-handicappers-filter-btn-hover {syntax: "<color>";inherits: true;initial-value: #3a96e0;}
@property --color-rdg-handicappers-filter-btn-default {syntax: "<color>";inherits: true;initial-value: #E9ECEF;}

.rdg-blocks .rdg-handicappers-filter {
    width: calc(var(--vw, 1vw) * 100);
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    max-width: 99.55vw;

        .container.content {
        width: 100%;
        display: flex;
        padding: 0 20px;
        flex-direction: column;

        .rdg-no-data-message {
            padding: 24px;
            text-align: center;
            color: var(--color-rdg-handicappers-filter-stats);
            margin: 0;
        }

        @include title;
        --gap: 20px;

        .handicappers-body {
            display: flex;
            flex-direction: column;
            position: relative;
            border-radius: 16px;
            container-type: inline-size;
            background-color: var(--color-rdg-handicappers-filter-bg);
            border: 1px solid var(--color-rdg-handicappers-filter-border);
            box-shadow: 0px 20px 50px 0px var(--color-rdg-handicappers-filter-shadow);

            .handicappers {
                display: grid;
                grid-template-columns: repeat(4, 1fr);
                padding: 20px;
                gap: var(--gap);
                grid-auto-rows: 1fr;

                @container (max-width: 1280px) {
                    grid-template-columns: repeat(3, 1fr);
                }

                @container (max-width: 950px) {
                    grid-template-columns: repeat(2, 1fr);
                }

                @container (max-width: 600px) {
                    grid-template-columns: 1fr;
                }

                .handicapper {
                    display: flex;
                    border-radius: 1rem;
                    flex-direction: column;
                    min-height: 0;
                    background-color: var(--color-rdg-handicappers-filter-bg);
                    border: 1px solid var(--color-rdg-handicappers-filter-border);
                    box-shadow: 0px 20px 50px 0px var(--color-rdg-handicappers-filter-shadow);

                    .handicapper-header {
                        display: flex;
                        flex-shrink: 0;
                        padding: 1rem;
                        gap: .9rem;
                        align-items: center;
                        border-bottom: 2px solid var(--color-rdg-handicappers-filter-line);

                        @container (max-width: 720px) {
                            & {
                                align-items: center;
                                flex-direction: column;
                            }
                        }

                        .header-image {
                            display: flex;
                            width: 60px;
                            height: 60px;
                            min-width: 60px;
                            min-height: 60px;
                            flex-shrink: 0;

                            @container (max-width: 720px) {
                                & {
                                    width: 100px;
                                    height: 100px;
                                    min-width: 100px;
                                    min-height: 100px;
                                }
                            }

                            img {
                                border-radius: 50%;
                                object-fit: cover;
                            }
                        }

                        .header-content {
                            color: var(--color-rdg-handicappers-filter-header);

                            @container (max-width: 720px) {
                                & {
                                    text-align: center;
                                    min-height: 3.6rem;
                                }
                            }

                            .header-name {
                                font-weight: bold;
                                
                                a {
                                    &:hover {
                                        color: var(--color-rdg-handicappers-filter-header-hover);
                                    }
                                }
                            }

                            .header-package {
                                a {
                                    &:hover {
                                        color: var(--color-rdg-handicappers-filter-header-hover);
                                    }
                                }
                            }

                            .header-stats {
                                color: var(--color-rdg-handicappers-filter-stats);

                                .success,
                                .danger {
                                    display: block;
                                }

                                .success {
                                    color: var(--color-success);
                                }

                                .danger {
                                    color: var(--color-danger);
                                }
                            }
                        }
                    }

                    .handicapper-body {
                        flex: 1;
                        min-height: 7rem;
                        padding: 1rem;
                        border-bottom: 1px solid var(--color-rdg-handicappers-filter-line);
                        display: flex;
                        flex-direction: column;

                        .body-content {
                            overflow: hidden;
                            display: -webkit-box;
                            -webkit-line-clamp: 3;
                            line-clamp: 3;
                            -webkit-box-orient: vertical;
                        }
                    }

                    .handicapper-footer {
                        flex-shrink: 0;
                        display: flex;
                        min-height: 4.5rem;
                        padding: 1rem;
                        align-items: center;

                        .footer-content {
                            width: 100%;
                            display: flex;
                            flex-direction: column;
                            gap: 1rem;

                            .footer-button {
                                display: flex;
                                flex-direction: column;
                                justify-content: center;
                                align-items: center;
                                padding: .3rem 1rem;
                                border-radius: .5rem;
                                color: var(--color-rdg-handicappers-filter-btn);
                                background-color: var(--color-rdg-handicappers-filter-bg);
                                border: 1px solid var(--color-rdg-handicappers-filter-btn-default);

                                .button-picks {
                                    font-size: 1.2rem;
                                    margin: 10px 0;
                                }

                                &:hover {
                                    background-color: var(--color-rdg-handicappers-filter-btn-default);
                                }

                                &.primary {
                                    display: flex;
                                    justify-content: center;
                                    align-items: center;
                                    padding: .7rem 1rem;
                                    border-radius: .5rem;
                                    color: var(--color-rdg-handicappers-filter-bg);
                                    background-color: var(--color-rdg-handicappers-filter-btn);

                                    &:hover {
                                        background-color: var(--color-rdg-handicappers-filter-btn-hover);
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}

.acf-block-preview {
    .rdg-handicappers-filter {
        width: 100%;
        left: 0;
        right: 0;
        margin-left: 0;
        margin-right: 0;
    }
}
