.riplay-language-selector {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem;
  border: 1px solid rgb(255 255 255 / 0.14);
  border-radius: 999px;
  background: rgb(255 255 255 / 0.05);
}

.riplay-language-selector__link {
  display: inline-flex;
  min-width: 2.25rem;
  min-height: 2.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #d7ded9;
  font: 700 0.75rem/1 system-ui, sans-serif;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease;
}

.riplay-language-selector__link:hover,
.riplay-language-selector__link:focus-visible,
.riplay-language-selector__link.is-active {
  background: #00e676;
  color: #07110b;
  outline: none;
}

.riplay-symbol {
  --symbol-size: 40px;
  display: inline-flex;
  position: relative;
  width: var(--symbol-size);
  height: var(--symbol-size);
}

.riplay-symbol--small {
  --symbol-size: 30px;
}

.riplay-symbol--large {
  --symbol-size: 60px;
}

.riplay-symbol__link,
.riplay-symbol__grid {
  display: grid;
  width: 100%;
  height: 100%;
}

.riplay-symbol__link {
  position: relative;
  place-items: center;
  color: inherit;
  text-decoration: none;
}

.riplay-symbol__grid {
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 2px;
  padding: 3px;
  border: 1px solid rgb(255 255 255 / 0.62);
  border-radius: 8px;
  background: #121212;
  box-shadow: inset 0 0 0 1px rgb(0 230 118 / 0.12);
  transition: border-color 160ms ease, transform 180ms ease;
}

.riplay-symbol__cell {
  border-radius: 2px;
  background: #18241d;
}

.riplay-symbol__cell:nth-child(1),
.riplay-symbol__cell:nth-child(3),
.riplay-symbol__cell:nth-child(5),
.riplay-symbol__cell:nth-child(7),
.riplay-symbol__cell:nth-child(9) {
  background: #00e676;
}

.riplay-symbol__scan {
  position: absolute;
  left: 4px;
  right: 4px;
  top: 6px;
  height: 2px;
  border-radius: 999px;
  background: #00e676;
  box-shadow: 0 0 10px rgb(0 230 118 / 0.82);
  animation: riplay-symbol-scan 2s ease-in-out infinite alternate;
  pointer-events: none;
}

.riplay-symbol__link:hover .riplay-symbol__grid {
  border-color: #00e676;
  transform: translateY(-1px);
}

@keyframes riplay-symbol-scan {
  from {
    top: 6px;
    opacity: 0.52;
  }

  to {
    top: calc(100% - 8px);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .riplay-symbol__scan {
    animation: none;
  }
}
