/* Keep the GeneratePress logo and site title inside narrow mobile viewports. */
@media (max-width: 468px) {
    .site-header .site-branding-container {
        width: calc(100% + 30px);
        min-width: 0;
    }

    .site-header .site-branding-container .site-logo {
        flex-shrink: 0;
    }

    .site-header .site-branding-container .site-branding {
        min-width: 0;
    }

    .site-header .site-branding .main-title {
        overflow-wrap: anywhere;
    }
}

/* Keep WPConsent compact and accessible on phones. */
@media (max-width: 767px) {
    #wpconsent-container::part(wpconsent-banner) {
        padding: 8px 12px;
        gap: 6px;
    }

    #wpconsent-container::part(wpconsent-banner-body) {
        --wpconsent-line-height: 1.35;
        margin: 0;
        padding: 0;
        max-height: none;
        font-size: 14px;
    }

    #wpconsent-container::part(wpconsent-banner-footer) {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }

    #wpconsent-container::part(wpconsent-button-preferences),
    #wpconsent-container::part(wpconsent-button-cancel),
    #wpconsent-container::part(wpconsent-button-accept) {
        box-sizing: border-box;
        min-height: 44px;
        height: auto;
        padding: 8px 5px;
        white-space: normal;
        font-size: 13px;
        line-height: 1.2;
    }

    .site-info .inside-site-info {
        box-sizing: border-box;
        min-height: calc(68px + env(safe-area-inset-bottom));
        padding-right: calc(72px + env(safe-area-inset-right));
    }

    #wpconsent-container {
        position: relative;
        height: 0;
    }

    #wpconsent-container::part(wpconsent-settings-button) {
        position: absolute;
        left: auto;
        right: 12px;
        right: max(12px, env(safe-area-inset-right));
        bottom: 12px;
        bottom: max(12px, env(safe-area-inset-bottom));
        min-width: 44px;
        min-height: 44px;
    }
}

/* Keep the homepage hero actions separated after CSS optimization. */
body.page-id-14466 #post-14466 .entry-content > .wp-block-group:first-of-type .wp-block-buttons {
    display: flex !important;
    flex-flow: row wrap !important;
    align-items: center !important;
    gap: 12px !important;
    margin: 0 !important;
}

body.page-id-14466 #post-14466 .entry-content > .wp-block-group:first-of-type .wp-block-button {
    flex: 0 0 auto !important;
    margin: 0 !important;
    position: static !important;
}

body.page-id-14466 #post-14466 .entry-content > .wp-block-group:first-of-type .wp-block-button__link {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    position: static !important;
    transform: none !important;
}

@media (max-width: 600px) {
    body.page-id-14466 #post-14466 .entry-content > .wp-block-group:first-of-type .wp-block-buttons {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    body.page-id-14466 #post-14466 .entry-content > .wp-block-group:first-of-type .wp-block-button,
    body.page-id-14466 #post-14466 .entry-content > .wp-block-group:first-of-type .wp-block-button__link {
        box-sizing: border-box !important;
        width: 100% !important;
    }
}