.block-patterns-for-food-bloggers__modal {
    .components-modal__content {
        flex: 1; /* Will likely not be needed in WP 5.9 */
        overflow: auto;
        padding: 0;

        &:before {
            margin-bottom: 0;
        }
    }
}

.block-patterns-for-food-bloggers {
    align-items: stretch;
    display: flex;
    height: 100%;

    &.is-error {
        display: block;
        margin: 24px 32px;
    }

    .components-notice {
        margin: 0;

        .components-notice__content {
            margin-top: 8px;
            margin-bottom: 8px;
        }

        &.is-error {
            background-color: #f8ebea;
        }

        p {
            margin: 12px 0 0;

            &:first-child {
                margin-top: 0;
            }
        }
    }

    .block-patterns-for-food-bloggers__preview {
        display: flex;
        flex-direction: column;
        flex-shrink: 0;
        overflow: auto;
        padding: 32px 32px 100px;
        width: calc(100% - 281px);

        .block-editor-inserter__no-results {
            align-items: center;
            display: flex;
            height: 100%;
            justify-content: center;
        }
    }

    .block-patterns-for-food-bloggers__preview-header {
        align-items: center;
        display: inline-flex;
        justify-content: space-between;
        margin-bottom: 2rem;

        &__search-results {
            display: inline-flex;

            .components-spinner {
                margin: 0 12px 0 0;
            }
        }

        &__controls {
            display: inline-flex;

            .viewport-toggle {
                margin-right: 6px;
            }

            &>button {
                margin-left: 6px;
            }
        }

        /* Temp fix for DropdownMenu component. */
        .components-popover__content {
           margin-top: -50px;
           margin-right: 48px !important;
        }
    }

    .block-patterns-for-food-bloggers__preview-pattern-list {
        width: 100%;

        &>div {
            margin-bottom: 2rem;
        }

        &.preview-tablet {
            &>div {
                max-width: 790px;
                margin: 0 auto 4rem;
            }
        }

        &.preview-mobile {
            &>div {
                max-width: 358px;
                margin: 0 auto 4rem;
            }
        }

        &.is-grid {
            display: grid;
            grid-gap: 32px;
            grid-template: inherit;
            grid-template-columns: repeat(1,1fr);

            @media (min-width: 1080px) {
                grid-template-columns: repeat(2,1fr);
            }

            @media ( min-width: 1440px ) {
                grid-template-columns: repeat(3,1fr);
            }

            &>div {
                margin-bottom: 0;
            }

            &.preview-tablet,
            &.preview-mobile {
                &>div {
                    margin: 0;
                }
            }

            .block-editor-block-preview__container {
                max-height: 400px;
                overflow: scroll;
            }
        }

        &.no-results {
            align-items: center;
            display: flex;
            height: 100%;
            justify-content: center;
        }

        &__item {
            border: 1px solid #dddddd;
            border-radius: 2px;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            position: relative;
            transition: all .05s ease-in-out;
            width: 100%;

            &:hover {
                border-color: var(--wp-admin-theme-color);
            }

            &-preview {
                align-items: center;
                background: #f0f0f0;
                cursor: pointer;
                display: flex;
                flex-grow: 1;
                min-height: 200px;

                img {
                    width: 100%;
                }
            }

            &-actions {
                align-items: center;
                background: #fff;
                border-top: 1px solid #ddd;
                display: flex;
                justify-content: space-between;
                padding: 10px;
            }

            &-title {
                font-size: 12px;
                padding: 6px;
                text-align: center;
            }
        }
    }

    .block-patterns-for-food-bloggers__preview-loading {
        display: flex;
        justify-content: center;
        margin: 64px 0;
        width: 100%;
    }

    .block-patterns-for-food-bloggers__sidebar {
        border-right: 1px solid #ddd;
        display: flex;
        flex-direction: column;
        flex-shrink: 0;
        overflow-y: scroll;
        padding: 32px;
        width: 280px;

        &__search {
            margin-bottom: 16px;

            .components-base-control__field {
                margin-bottom: 0;
            }
        }

        &__category-type {
            &__title {
                color: #757575;
                font-size: 11px;
                font-weight: 500;
                margin: 0;
                padding: 16px 12px 0;
                text-transform: uppercase;
            }

            &__categories {
                padding: 16px 0;
            }
        }
    }
}
