/*
 * Divi 5 social-icon CSS shim — wp-mcp-helper plugin.
 *
 * Workaround for two Divi 5 frontend-CSS gaps in
 * divi/social-media-follow / divi/social-media-follow-network:
 *
 *   1. The bundled per-page CSS does NOT apply
 *      `font-family: ETmodules` to the `a.icon::before` pseudo, so the
 *      glyph characters render in the body font and appear as blank
 *      squares.
 *
 *   2. Divi 5's bundled stylesheet only ships `content: "\eXXX"` rules
 *      for facebook, twitter, instagram, and rss. Every other network
 *      slug (linkedin, pinterest, youtube, tumblr, vimeo, etc.) has no
 *      glyph rule, so the icon container renders with no character at
 *      all even after the font-family is corrected.
 *
 * This shim fills both gaps. It is enqueued ONLY when the page
 * (including any Theme Builder header/body/footer layout) contains a
 * `divi/social-media-follow-network` block — see
 * `wpmcp_enqueue_divi5_social_icons_shim()` in wp-mcp-helper.php.
 *
 * Glyph codepoints come from Divi's ETmodules font (same font Divi
 * itself enqueues for these icons). When Divi upstream ships these
 * rules, our rules become harmless duplicates — same selector, same
 * value, no conflict. Remove this file (and the enqueue hook) when the
 * upstream gap is closed.
 */

/* (1) Always: force ETmodules on the icon pseudo. Divi's own
 *     equivalent rule uses the same font-family, so our `!important`
 *     overrides only the gap (no rule from Divi), not a correct rule. */
.et_pb_social_media_follow .et_pb_social_icon a.icon::before,
.et_pb_social_media_follow_network li.et_pb_social_icon a.icon::before {
  font-family: 'ETmodules' !important;
  speak: none;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* (2) Per-network glyph rules. ETmodules codepoints from Divi's own
 *     theme stylesheet (`/themes/Divi/style.css`, `.et-pb-icon`
 *     declarations). NO `!important` here — if Divi ships a content
 *     rule with a different codepoint we want Divi's to win on
 *     cascade. We supply the rule only when Divi omits it.
 *
 *     Networks known to ship correctly in Divi 5 (rules NOT included
 *     here): facebook (\e093), twitter (\e094), instagram (\e09a),
 *     rss (\e09e). */

/* Confirmed missing in Divi 5 (per last-session report): */
.et_pb_social_media_follow_network li.et_pb_social_icon.et_pb_social_network_linkedin a.icon::before {
  content: "\e09d";
}
.et_pb_social_media_follow_network li.et_pb_social_icon.et_pb_social_network_pinterest a.icon::before {
  content: "\e095";
}

/* Likely missing (Divi 5 ships an incomplete subset of the D4 social
 * networks; codepoints below are the canonical ETmodules values from
 * the Divi 4 theme CSS). If a future Divi 5 release adds a rule for
 * one of these, the rule wins on cascade (same selector, no
 * `!important`) — our rule below has no effect at that point. */
.et_pb_social_media_follow_network li.et_pb_social_icon.et_pb_social_network_tumblr a.icon::before {
  content: "\e09f";
}
.et_pb_social_media_follow_network li.et_pb_social_icon.et_pb_social_network_vimeo a.icon::before {
  content: "\e0a7";
}
.et_pb_social_media_follow_network li.et_pb_social_icon.et_pb_social_network_youtube a.icon::before {
  content: "\e0a8";
}
.et_pb_social_media_follow_network li.et_pb_social_icon.et_pb_social_network_skype a.icon::before {
  content: "\e0a3";
}
.et_pb_social_media_follow_network li.et_pb_social_icon.et_pb_social_network_flickr a.icon::before {
  content: "\e0a4";
}
.et_pb_social_media_follow_network li.et_pb_social_icon.et_pb_social_network_myspace a.icon::before {
  content: "\e0a5";
}
.et_pb_social_media_follow_network li.et_pb_social_icon.et_pb_social_network_dribbble a.icon::before {
  content: "\e0a6";
}

/* Mirror rules for the legacy markup variant (some Divi builds use
 * `.et_pb_social_media_follow` without `_network`). Same codepoints,
 * same selectors at the `li` level. */
.et_pb_social_media_follow li.et_pb_social_icon.et_pb_social_network_linkedin a.icon::before { content: "\e09d"; }
.et_pb_social_media_follow li.et_pb_social_icon.et_pb_social_network_pinterest a.icon::before { content: "\e095"; }
.et_pb_social_media_follow li.et_pb_social_icon.et_pb_social_network_tumblr a.icon::before { content: "\e09f"; }
.et_pb_social_media_follow li.et_pb_social_icon.et_pb_social_network_vimeo a.icon::before { content: "\e0a7"; }
.et_pb_social_media_follow li.et_pb_social_icon.et_pb_social_network_youtube a.icon::before { content: "\e0a8"; }
.et_pb_social_media_follow li.et_pb_social_icon.et_pb_social_network_skype a.icon::before { content: "\e0a3"; }
.et_pb_social_media_follow li.et_pb_social_icon.et_pb_social_network_flickr a.icon::before { content: "\e0a4"; }
.et_pb_social_media_follow li.et_pb_social_icon.et_pb_social_network_myspace a.icon::before { content: "\e0a5"; }
.et_pb_social_media_follow li.et_pb_social_icon.et_pb_social_network_dribbble a.icon::before { content: "\e0a6"; }
