.msr-social {
  --msr-accent: var(--color-accent, var(--wp--preset--color--primary, var(--wp--preset--color--vivid-cyan-blue, #2271b1)));
  --msr-hover: var(--msr-accent);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.msr-social__link {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.msr-social__link img,
.msr-social__link svg {
  width: 22px;
  height: 22px;
  display: block;
  object-fit: contain;
  transition: opacity 0.15s ease, color 0.15s ease;
}

/* Optical size balance (glyphs have different viewBox density) */
.msr-social__link--vk svg {
  width: 24px;
  height: 24px;
}

.msr-social__link--sferum svg {
  width: 22px;
  height: 22px;
}

.msr-social__link--rutube svg {
  width: 22px;
  height: 22px;
}

.msr-social__link--ok svg {
  width: 21px;
  height: 21px;
}

.msr-social__link:hover {
  text-decoration: none;
}

/* —— Mono: outline + muted glyph, accent on hover —— */
.msr-social--mono .msr-social__link {
  border: 1px solid rgba(0, 0, 0, 0.12);
  color: currentColor;
  background: transparent;
}

.msr-social--mono .msr-social__link img,
.msr-social--mono .msr-social__link svg {
  opacity: 0.75;
  fill: currentColor;
}

.msr-social--mono .msr-social__link svg *,
.msr-social--mono .msr-social__link svg path,
.msr-social--mono .msr-social__link svg circle {
  fill: currentColor;
}

.msr-social--mono .msr-social__link:hover {
  color: var(--msr-hover);
  border-color: var(--msr-hover);
}

.msr-social--mono .msr-social__link:hover img,
.msr-social--mono .msr-social__link:hover svg {
  opacity: 1;
}

.site-footer .msr-social--mono .msr-social__link,
.msr-social--on-dark.msr-social--mono .msr-social__link {
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.site-footer .msr-social--mono .msr-social__link img,
.site-footer .msr-social--mono .msr-social__link svg,
.msr-social--on-dark.msr-social--mono .msr-social__link img,
.msr-social--on-dark.msr-social--mono .msr-social__link svg {
  opacity: 0.55;
}

.site-footer .msr-social--mono .msr-social__link:hover,
.msr-social--on-dark.msr-social--mono .msr-social__link:hover {
  color: var(--msr-hover);
  border-color: var(--msr-hover);
  background: rgba(255, 255, 255, 0.06);
}

.site-footer .msr-social--mono .msr-social__link:hover img,
.site-footer .msr-social--mono .msr-social__link:hover svg,
.msr-social--on-dark.msr-social--mono .msr-social__link:hover img,
.msr-social--on-dark.msr-social--mono .msr-social__link:hover svg {
  opacity: 1;
}

/* —— Brand: official colored logos (no tint plate, full opacity) —— */
.msr-social--brand .msr-social__link {
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
}

.msr-social--brand .msr-social__link img,
.msr-social--brand .msr-social__link svg {
  opacity: 1;
}

/* Brand fills come from SVG / PHP. Multi-color marks keep their own paints. */
.msr-social--brand .msr-social__link--vk svg,
.msr-social--brand .msr-social__link--vk svg * {
  fill: #0077ff !important;
}

.msr-social--brand .msr-social__link--max svg,
.msr-social--brand .msr-social__link--max svg * {
  fill: #4b51ef !important;
}

.msr-social--brand .msr-social__link--telegram svg,
.msr-social--brand .msr-social__link--telegram svg * {
  fill: #2aabee !important;
}

.msr-social--brand .msr-social__link--ok svg,
.msr-social--brand .msr-social__link--ok svg * {
  fill: #ee8208 !important;
}

.msr-social--brand .msr-social__link--rutube svg,
.msr-social--brand .msr-social__link--rutube svg * {
  fill: #ff0000 !important;
}

.msr-social--brand .msr-social__link--custom svg,
.msr-social--brand .msr-social__link--custom svg * {
  fill: #1e293b !important;
}

.msr-social--brand .msr-social__link:hover {
  transform: translateY(-1px);
  background: rgba(0, 0, 0, 0.04);
  border-color: var(--msr-hover);
}

.site-footer .msr-social--brand .msr-social__link:hover,
.msr-social--on-dark.msr-social--brand .msr-social__link:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--msr-hover);
}

/* —— Plate: crisp white mono glyph on brand-colored disc —— */
.msr-social--plate .msr-social__link {
  border: 1px solid transparent;
  color: #fff !important;
  filter: none;
}

.msr-social--plate .msr-social__link img,
.msr-social--plate .msr-social__link svg {
  opacity: 1 !important;
  color: #fff !important;
  filter: none !important;
}

.msr-social--plate .msr-social__link svg,
.msr-social--plate .msr-social__link svg *,
.msr-social--plate .msr-social__link svg path,
.msr-social--plate .msr-social__link svg circle {
  fill: #fff !important;
  opacity: 1 !important;
  color: #fff !important;
}

.site-footer .msr-social--plate .msr-social__link,
.msr-social--on-dark.msr-social--plate .msr-social__link {
  color: #fff !important;
}

.site-footer .msr-social--plate .msr-social__link svg,
.site-footer .msr-social--plate .msr-social__link svg *,
.msr-social--on-dark.msr-social--plate .msr-social__link svg,
.msr-social--on-dark.msr-social--plate .msr-social__link svg * {
  fill: #fff !important;
  opacity: 1 !important;
}

.msr-social--plate .msr-social__link--vk {
  background: #0077ff;
}

.msr-social--plate .msr-social__link--max {
  background: #4b51ef;
}

.msr-social--plate .msr-social__link--sferum {
  background: #3549ff;
}

.msr-social--plate .msr-social__link--telegram {
  background: #2aabee;
}

.msr-social--plate .msr-social__link--ok {
  background: #ee8208;
}

.msr-social--plate .msr-social__link--rutube {
  background: #ff0000;
}

.msr-social--plate .msr-social__link--custom {
  background: #1e293b;
}

.msr-social--plate .msr-social__link:hover {
  filter: none;
  transform: translateY(-1px);
  border-color: var(--msr-hover);
}

/* —— Core Social Links —— */
body.msr-icons-mono .wp-block-social-links:not(.is-style-logos-only) .wp-social-link {
  background: transparent !important;
  color: inherit;
}

body.msr-icons-mono .wp-block-social-links .wp-social-link a {
  color: inherit;
}

body.msr-icons-mono .wp-block-social-links .wp-social-link:hover,
body.msr-icons-mono .wp-block-social-links .wp-social-link:hover a {
  color: var(--color-accent, var(--wp--preset--color--primary, var(--wp--preset--color--vivid-cyan-blue, #2271b1))) !important;
}

/* Brand: logos only — transparent plate, colored glyphs */
body.msr-icons-brand .wp-block-social-links .wp-social-link {
  background: transparent !important;
  color: inherit;
}

body.msr-icons-brand .wp-block-social-links .wp-block-social-link-anchor {
  background: transparent !important;
}

body.msr-icons-brand .wp-block-social-links .wp-social-link-vk svg,
body.msr-icons-brand .wp-block-social-links .wp-social-link-vk svg * {
  fill: #0077ff !important;
  opacity: 1 !important;
}

body.msr-icons-brand .wp-block-social-links .wp-social-link-max svg,
body.msr-icons-brand .wp-block-social-links .wp-social-link-max svg * {
  fill: #4b51ef !important;
  opacity: 1 !important;
}

body.msr-icons-brand .wp-block-social-links .wp-social-link-sferum svg,
body.msr-icons-brand .wp-block-social-links .wp-social-link-sferum svg * {
  opacity: 1 !important;
}

body.msr-icons-brand .wp-block-social-links .wp-social-link-telegram svg,
body.msr-icons-brand .wp-block-social-links .wp-social-link-telegram svg * {
  fill: #2aabee !important;
  opacity: 1 !important;
}

body.msr-icons-brand .wp-block-social-links .wp-social-link-ok svg,
body.msr-icons-brand .wp-block-social-links .wp-social-link-ok svg *,
body.msr-icons-brand .wp-block-social-links .wp-social-link-odnoklassniki svg,
body.msr-icons-brand .wp-block-social-links .wp-social-link-odnoklassniki svg * {
  fill: #ee8208 !important;
  opacity: 1 !important;
}

body.msr-icons-brand .wp-block-social-links .wp-social-link-rutube svg,
body.msr-icons-brand .wp-block-social-links .wp-social-link-rutube svg * {
  fill: #ff0000 !important;
  opacity: 1 !important;
}

body.msr-icons-brand .wp-block-social-links .wp-social-link:hover .wp-block-social-link-anchor {
  transform: translateY(-1px);
}

/* Plate: brand disc + white glyph */
body.msr-icons-plate .wp-block-social-links .wp-social-link-vk {
  background-color: #0077ff !important;
  color: #fff !important;
}

body.msr-icons-plate .wp-block-social-links .wp-social-link-max {
  background-color: #4b51ef !important;
  color: #fff !important;
}

body.msr-icons-plate .wp-block-social-links .wp-social-link-sferum {
  background-color: #3549ff !important;
  color: #fff !important;
}

body.msr-icons-plate .wp-block-social-links .wp-social-link-telegram {
  background-color: #2aabee !important;
  color: #fff !important;
}

body.msr-icons-plate .wp-block-social-links .wp-social-link-ok,
body.msr-icons-plate .wp-block-social-links .wp-social-link-odnoklassniki {
  background-color: #ee8208 !important;
  color: #fff !important;
}

body.msr-icons-plate .wp-block-social-links .wp-social-link-rutube {
  background-color: #ff0000 !important;
  color: #fff !important;
}

body.msr-icons-plate .wp-block-social-links .wp-social-link,
body.msr-icons-plate .wp-block-social-links .wp-block-social-link-anchor {
  color: #fff !important;
  background-clip: padding-box;
  filter: none !important;
}

body.msr-icons-plate .wp-block-social-links .wp-block-social-link-anchor {
  background: transparent !important;
}

body.msr-icons-plate .wp-block-social-links .wp-block-social-link-anchor svg,
body.msr-icons-plate .wp-block-social-links .wp-block-social-link-anchor svg *,
body.msr-icons-plate .wp-block-social-links .wp-block-social-link-anchor svg path,
body.msr-icons-plate .wp-block-social-links .wp-block-social-link-anchor svg circle {
  fill: #fff !important;
  color: #fff !important;
  opacity: 1 !important;
  filter: none !important;
}

body.msr-icons-plate .wp-block-social-links .wp-social-link:hover,
body.msr-icons-plate .wp-block-social-links .wp-social-link:hover .wp-block-social-link-anchor {
  filter: none !important;
  transform: translateY(-1px);
}
