/* GoalGrid logo system: open team crests, readable competition marks. */
.team-avatar:not(.is-flag),
.tm-crest:not(.is-fallback) {
  overflow: visible !important;
  border-color: rgba(255, 255, 255, .055) !important;
  background: rgba(255, 255, 255, .025) !important;
  box-shadow: none !important;
}

.team-avatar:not(.is-flag) img,
.team-avatar:not(.is-flag) img.is-loaded,
.team-avatar:not(.is-flag) img[data-loaded="1"],
.tm-crest:not(.is-fallback) > img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  display: block !important;
  aspect-ratio: 1 / 1 !important;
  padding: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
  box-sizing: border-box !important;
  object-fit: contain !important;
  object-position: center !important;
  box-shadow: none !important;
  transform: none !important;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .32));
}

/* Team crests used by league pages share a different component. Keep those
   wrappers open too; league-logo-badge below remains the competition style. */
.gg-team-logo-wrap:has(> .gg-team-logo) {
  overflow: visible !important;
  background: transparent !important;
  box-shadow: none !important;
}

.gg-team-logo-wrap > .gg-team-logo {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  display: block !important;
  aspect-ratio: 1 / 1 !important;
  padding: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
  box-sizing: border-box !important;
  object-fit: contain !important;
  object-position: center !important;
  box-shadow: none !important;
  transform: none !important;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .32));
}

.league-logo-badge {
  overflow: hidden !important;
  border-color: rgba(255, 255, 255, .58) !important;
  background: rgba(255, 255, 255, .96) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .18) !important;
}

.league-logo-badge > img,
.league-logo-badge > .league-logo-badge-img,
.league-logo-badge > img.is-loaded,
.league-logo-badge > .league-logo-badge-img.is-loaded,
.league-logo-badge > img[data-loaded="1"],
.league-logo-badge > .league-logo-badge-img[data-loaded="1"] {
  padding: 2px !important;
  background: rgba(255, 255, 255, .96) !important;
  box-shadow: none !important;
  transform: scale(1.02) !important;
  filter: none !important;
}

.league-logo-badge > img.is-landscape,
.league-logo-badge > .league-logo-badge-img.is-landscape {
  padding: 4px 2px !important;
  background: rgba(255, 255, 255, .96) !important;
  transform: none !important;
}

.search-result-icon--image {
  border-color: rgba(255, 255, 255, .055) !important;
  background: rgba(255, 255, 255, .025) !important;
  box-shadow: none !important;
}

.search-mini-logo,
.search-result-meta-logo {
  overflow: hidden !important;
  border-color: rgba(255, 255, 255, .58) !important;
  background: rgba(255, 255, 255, .96) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .16) !important;
}

.search-result-icon--image img {
  padding: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
  transform: none !important;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .3));
}

.search-mini-logo img,
.search-result-meta-logo img {
  padding: 1px !important;
  background: transparent !important;
  transform: none;
  filter: none;
}

body[data-page="team"] .slv-competition-switch > summary > img,
body[data-page="team"] .slv-competition-menu a > img,
body[data-page="team"] .slv-fixture-league-logo {
  overflow: hidden !important;
  border-color: rgba(255, 255, 255, .58) !important;
  background: rgba(255, 255, 255, .96) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .18) !important;
}

body[data-page="team"] .slv-competition-switch > summary > img,
body[data-page="team"] .slv-competition-menu a > img,
body[data-page="team"] .slv-fixture-league-logo > img {
  padding: 2px !important;
  background: rgba(255, 255, 255, .96) !important;
  transform: scale(1.02);
  filter: none !important;
}

body[data-page="team"] .slv-fixture-teams .tm-crest {
  --tm-crest-size: 40px !important;
}

@media (max-width: 760px) {
  body[data-page="team"] .slv-fixture-teams .tm-crest {
    --tm-crest-size: 34px !important;
  }
}
