/* Android-specific external-platform artwork. Canonical shared chrome owns icon box sizing. */
.external-platform-link {
  gap: .5rem;
}

.external-platform-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: currentColor;
}

.external-platform-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.external-platform-icon--monogram {
  border: 1px solid currentColor;
  font-size: .8rem;
  font-weight: 900;
  line-height: 1;
  clip-path: polygon(0 4px, 4px 0, calc(100% - 4px) 0, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 0 calc(100% - 4px));
}

.external-platform-icon--nexus.external-platform-icon--monogram {
  border: 0;
  background: transparent url("https://kamui2040.github.io/assets/icons/k2040-nexus.webp") center / 118% no-repeat;
  font-size: 0;
  clip-path: none;
}

/* APKPure mark adapted from Arcticons' APKPure icon (CC BY-SA 4.0). */
.external-platform-icon--apkpure.external-platform-icon--monogram {
  border: 0;
  background: currentColor;
  font-size: 0;
  clip-path: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2048%2048%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpolygon%20points%3D%2219.1%204.5%204.73%2033.8%209.49%2043.5%2028.61%204.5%2019.1%204.5%22%2F%3E%3Cpolygon%20points%3D%2243.27%2033.2%2038.22%2043.5%2033.17%2033.2%2043.27%2033.2%22%2F%3E%3Cpolygon%20points%3D%2228.61%204.5%2037.93%2023.5%2033.17%2033.2%2023.86%2014.2%2028.61%204.5%22%2F%3E%3Cline%20x1%3D%2219.05%22%20y1%3D%2224%22%20x2%3D%2228.66%22%20y2%3D%2224%22%2F%3E%3Cline%20x1%3D%2214.54%22%20y1%3D%2233.21%22%20x2%3D%2233.17%22%20y2%3D%2233.21%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2048%2048%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpolygon%20points%3D%2219.1%204.5%204.73%2033.8%209.49%2043.5%2028.61%204.5%2019.1%204.5%22%2F%3E%3Cpolygon%20points%3D%2243.27%2033.2%2038.22%2043.5%2033.17%2033.2%2043.27%2033.2%22%2F%3E%3Cpolygon%20points%3D%2228.61%204.5%2037.93%2023.5%2033.17%2033.2%2023.86%2014.2%2028.61%204.5%22%2F%3E%3Cline%20x1%3D%2219.05%22%20y1%3D%2224%22%20x2%3D%2228.66%22%20y2%3D%2224%22%2F%3E%3Cline%20x1%3D%2214.54%22%20y1%3D%2233.21%22%20x2%3D%2233.17%22%20y2%3D%2233.21%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") center / contain no-repeat;
}

/* Custom AppGallery-inspired cue. Original K2040 vector; not an official HUAWEI logo. */
.external-platform-icon--appgallery.external-platform-icon--monogram {
  border: 0;
  background: currentColor;
  font-size: 0;
  clip-path: none;
  -webkit-mask: url("/K2040-Android-Releases/assets/appgallery-cue.svg") center / contain no-repeat;
  mask: url("/K2040-Android-Releases/assets/appgallery-cue.svg") center / contain no-repeat;
}

/* Official Uptodown App Store icon, displayed unchanged from Uptodown's CDN. */
.external-platform-icon--uptodown.external-platform-icon--monogram {
  border: 0;
  background: transparent url("https://img.utdstc.com/icon/f66/dd0/f66dd06c25088f96b64eb440bcc90a2994cc645680cb27840b30fbf996902804") center / contain no-repeat;
  font-size: 0;
  clip-path: none;
}

/* Shared ONE store cue. */
.external-platform-icon--onestore.external-platform-icon--monogram {
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: .28rem;
  background: #f43a59;
  color: #fff;
  font-size: 0;
  clip-path: none;
}

.external-platform-icon--onestore.external-platform-icon--monogram::before {
  content: "1";
  font-size: 1rem;
  font-weight: 950;
  line-height: 1;
  transform: translateY(-.02rem);
}

/* Official OpenAPK mark from the project's CC0-licensed public repository. */
.external-platform-icon--openapk.external-platform-icon--monogram {
  border: 0;
  background: transparent url("/K2040-Android-Releases/assets/openapk.svg") center / 112% no-repeat;
  font-size: 0;
  clip-path: none;
}

.external-platform-label {
  min-width: 0;
}

@media (max-width: 760px) {
  .external-platform-link--icon-only-mobile {
    position: relative;
    width: 44px;
    min-width: 44px;
    padding-right: .5rem !important;
    padding-left: .5rem !important;
    gap: 0;
  }

  .external-platform-link--icon-only-mobile .external-platform-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    border: 0;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}
