/* CSS-painted circular flag chips (used as a lightweight alternative to <img>) */
.flag {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
}

/* AU */
.flag-au { background: #00247d; position: relative; }
.flag-au::before {
  content: ""; position: absolute; inset: 25%;
  background:
    linear-gradient(45deg, transparent 45%, #fff 45% 55%, transparent 55%),
    linear-gradient(-45deg, transparent 45%, #fff 45% 55%, transparent 55%);
}
/* US */
.flag-us { background:
  linear-gradient(#b22234 50%, #fff 50%);
  background-size: 100% 14.28%;
}
.flag-us::before {
  content: ""; position: absolute; inset: 0 55% 50% 0;
  background: #3c3b6e;
}
/* GB */
.flag-gb { background: #012169; position: relative; overflow: hidden; }
.flag-gb::before, .flag-gb::after {
  content: ""; position: absolute; inset: 0;
}
.flag-gb::before {
  background:
    linear-gradient(45deg, transparent 47%, #fff 47% 53%, transparent 53%),
    linear-gradient(-45deg, transparent 47%, #fff 47% 53%, transparent 53%);
}
.flag-gb::after {
  background:
    linear-gradient(45deg, transparent 47%, #c8102e 47% 53%, transparent 53%),
    linear-gradient(-45deg, transparent 47%, #c8102e 47% 53%, transparent 53%);
}
/* CA */
.flag-ca { background: #fff; position: relative; }
.flag-ca::before {
  content: ""; position: absolute; left: 15%; top: 25%; width: 25%; height: 50%;
  background: #d52b1e; clip-path: polygon(50% 0, 65% 30%, 100% 30%, 72% 55%, 85% 100%, 50% 75%, 15% 100%, 28% 55%, 0 30%, 35% 30%);
}
/* EU */
.flag-eu { background: #003399; position: relative; }
.flag-eu::before {
  content: "★"; position: absolute; inset: 0;
  display: grid; place-items: center;
  color: #ffcc00; font-size: 1.1rem; line-height: 1;
}
/* MY */
.flag-my {
  background:
    linear-gradient(to bottom, #cc0001 0 7%, #fff 7% 14%, #cc0001 14% 21%, #fff 21% 28%, #cc0001 28% 35%, #fff 35% 42%, #cc0001 42% 49%, #fff 49% 56%, #cc0001 56% 63%, #fff 63% 70%, #cc0001 70% 77%, #fff 77% 84%, #cc0001 84% 91%, #fff 91% 100%);
  position: relative;
}
.flag-my::before {
  content: ""; position: absolute; left: 0; top: 0; width: 50%; height: 56%;
  background: #010066;
}
/* KR */
.flag-kr { background: #fff; position: relative; }
.flag-kr::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 50%; height: 50%;
  background: #cd2e3a; border-radius: 50%;
  transform: translate(-50%, -50%);
}
.flag-kr::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 25%; height: 25%;
  background: #0047a0; border-radius: 50%;
  transform: translate(-100%, -50%);
}
/* JP */
.flag-jp { background: #fff; position: relative; }
.flag-jp::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 40%; height: 40%;
  background: #bc002d; border-radius: 50%;
  transform: translate(-50%, -50%);
}
