/*
 *  Theme Name: CUPE GeneratePress
 *  Theme URI:  https://generatepress.com/
 *  Description:  CUPE overrides for GeneratePress theme
 *  Template: generatepress
 *  Version: 1.0
 */

/**
 * Footer "CUPE on Facebook" widget — Simple Like Page Plugin (SFP) overflow fix.
 *
 * The SFP widget renders Facebook's Page Plugin as a FIXED-WIDTH iframe based on the
 * widget's "Width" setting (commonly 500px). The plugin only shrinks to its parent
 * if that parent is narrower *at page load*; in the multi-column footer it often
 * measures the full-width widget area (not the ~300px column), so it keeps 500px and
 * overflows into the neighbouring "CUPE on Twitter" column.
 *
 * These rules constrain the embed to its column. `overflow: hidden` is a safety net
 * so any residual bleed is clipped rather than overlapping the next column.
 *
 * NOTE: Facebook renders the iframe *content* at the requested px width, so CSS alone
 * only clips it. For the content to actually fit, also set the widget "Width" to the
 * footer column width (min 180). The `.widget_sfp_page_plugin_widget` class is output
 * by the Simple Like Page Plugin. (This widget is also masked in the VRT suite — see
 * vrt/input/convert.js DEFAULT_IGNORE_SELECTORS — but that only hides it from tests;
 * this rule is the real front-end fix.)
 */
.widget_sfp_page_plugin_widget {
    max-width: 100%;
    overflow: hidden;
}

.widget_sfp_page_plugin_widget .fb-page,
.widget_sfp_page_plugin_widget .fb-page > span,
.widget_sfp_page_plugin_widget .fb-page iframe {
    max-width: 100% !important;
}
