/*
 * TABLET DEVICE RESPONSIVE CSS.
 */
@media only screen and (min-width: 600px) and (max-width: 1023px) {

    // blocks page css.
    #sp-real-admin-dashboard-wrapper {

        .sp-real-video-section-text h3 {
            margin-bottom: 15px;
        }

        .sp-real-all-block-list {
            grid-template-columns: repeat(2, 1fr);
            gap: 20px;
        }

        // getting page css.
        .sp-real-getting-start-page {
            flex-wrap: wrap;

            .sp-real-video-section {
                width: 100%;
                padding: 25px;
            }

            .sp-real-sidebar-section {
                width: 100%;
                gap: 20px;
                flex-direction: row;
                flex-wrap: wrap;

                .sp-real-sidebar-info-card {
                    width: calc(50% - 10px);
                    padding: 20px;
                }
            }

        }

        // modules page css.
        .sp-real-admin-dashboard-content {
            .sp-real-integrations-page-items-wrapper {
                grid-template-columns: repeat(2, 1fr);
            }
        }
    }
}

/*
 * MOBILE DEVICE RESPONSIVE CSS.
 */
@media only screen and (max-width: 599px) {

    #sp-real-admin-dashboard-wrapper {
        margin-left: -10px;

        .sp-real-admin-dashboard-header {
            margin-bottom: 30px;
        }

        .sp-real-admin-dashboard-nav {
            flex: 0 1 auto;
            justify-content: flex-start;
            min-width: 0;

            .sp-real-nav-mobile-toggle {
                display: inline-flex;
            }

            // the underline tracks a horizontal tab row; the dropdown has none.
            .sp-real-nav-sliding-indicator {
                display: none;
            }

            ul {
                display: none;
                position: absolute;
                top: calc(100% + 10px);
                left: -16px;
                z-index: 99;
                flex-direction: column;
                gap: 0;
                padding: 8px;
                background: #fff;
                border: 1px solid #E5E7EB;
                border-radius: 6px;
                box-shadow: 0 4px 16px 0 rgba(17, 17, 17, 0.12);
            }

            &.sp-real-nav-open ul {
                display: flex;
            }

            li {
                width: 100%;
                font-size: 14px;

                a {
                    width: 100%;
                    height: auto;
                    padding: 9px 12px;
                    border-radius: 4px;

                    &:hover {
                        background: #F3F4F6;
                    }

                    &.active {
                        background: #EAF1FA;
                    }

                    // badge sits inline instead of floating over the tab.
                    .sp-real-nav-badge {
                        position: static;
                        margin-left: auto;
                        padding-left: 8px;
                    }
                }
            }
        }

        // tighter row so logo + version + nav toggle + Get Help fit on small screens.
        .sp-real-admin-dashboard-header .sp-real-block-setting-header-wrapper {
            padding: 0 30px;
        }

        // the logo svg sits inside span.sp-real-dashboard-logo (not a direct
        // child), so target it there to shrink it.
        .sp-real-admin-dashboard-header-left {
            gap: 8px;
            min-width: 0;

            .sp-real-dashboard-logo>svg {
                width: 130px;
            }
        }

        // nav dropdown itself is handled by the header container query above.
        .sp-real-admin-dashboard-header-right {
            width: auto;
        }

        // getting start page.
        .sp-real-getting-start-page {
            flex-wrap: wrap;

            .sp-real-video-section {
                width: 100%;
                padding: 20px;
            }

            .sp-real-sidebar-section {
                width: 100%;
                gap: 20px;
                flex-direction: row;
                flex-wrap: wrap;

                .sp-real-sidebar-info-card {
                    width: 100%;
                    padding: 20px;
                }
            }

            // video section buttons.
            .sp-real-video-section-btn {
                ul {
                    flex-wrap: wrap;
                }

                li,
                a {
                    width: 100%;
                }

                a {
                    padding: 15px 20px;
                }
            }

        }

        // block visibility page.
        .sp-real-admin-dashboard-content {
            padding: 0 30px;
        }

        .sp-real-all-block-list {
            grid-template-columns: repeat(1, 1fr);
            gap: 15px;
        }

        // modules page css.
        .sp-real-admin-dashboard-content {
            .sp-real-integrations-page-items-wrapper {
                grid-template-columns: 1fr;
            }
        }

    }

    // integration api key settings modal.
    .sp-real-integrations__modal {
        width: 90%;
        height: fit-content;
        margin: 40px auto;
        border-radius: 8px;

        .components-modal__header-heading {
            font-size: 16px !important;
        }

        .components-modal__content {
            padding: 32px 20px !important;
        }

    }

    .sp-real-integrations__modal-content {

        .sp-real-integrations__modal-field {
            flex-direction: column;
            align-items: start;

            .sp-real-integrations__modal-field-wrapper {
                width: 100% !important;
            }

            .sp-real-integration-input-help-text {
                display: inline;

                a {
                    margin-left: 4px;
                }
            }

            // captcha key.
            .sp-real-integrations__modal-field-row {
                flex-direction: column;
                align-items: start;

                .sp-real-site-secret-key-wrapper {
                    width: 100%;
                }
            }
        }
    }
}