.country-tag {
  position: relative;
  background-color: white;
  color: black;
  text-decoration: none;
  padding: 3px 7px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 16px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.country-tag img {
  width: 24px;
  height: 16px;
}

.country-tag[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 10px;
  background-color: rgba(0, 0, 0, 0.9);
  color: white;
  border-radius: 4px;
  font-size: 14px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  margin-bottom: 5px;
}

.country-tag[data-tooltip]::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: rgba(0, 0, 0, 0.9) transparent transparent transparent;
  opacity: 0;
  transition: opacity 0.2s ease;
  margin-bottom: -5px;
}

.country-tag[data-tooltip]:hover::after,
.country-tag[data-tooltip]:hover::before {
  opacity: 1;
}

.country-tag--with-link:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

@media (prefers-color-scheme: dark) {
  .country-tag {
    background-color: #343a40;
    color: #dee2e6;
  }

  .country-tag--with-hover:hover {
    background-color: #495057;
  }
}
