.country-card {
  position: absolute;
  top: 100px;
  right: 30px;
  background: white;
  border-radius: 8px;
  padding: 30px 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  max-height: 70vh;
  overflow-y: auto;
  width: 250px;
  transition: right 0.3s ease;
}

.country-card.show {
  right: 10px;
}

.country-card h5 {
  text-align: center;
  margin-bottom: 10px;
  color: #0077ff;
}

.country-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.country-card li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  transition: background 0.2s;
}

.country-card li:hover {
  background: #f0f8ff;
}

.country-card li span.flag {
  font-size: 1.3em;
}

.reset-btn {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 20px;
  background-color: #0077ff;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
  transition: background 0.3s;
  z-index: 1100;
}

.reset-btn:hover {
  background-color: #005fcc;
}

/* Mobile toggle button */
@media (max-width: 992px) {
  .country-card {
    right: -270px;
  }

  .country-card-toggle {
    position: absolute;
    top: 120px;
    right: 10px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    cursor: pointer;
    z-index: 1200;
    transition: background 0.3s, transform 0.3s, right 0.3s;
  }

  .country-card-toggle.open {
    background: rgba(0, 119, 255, 0.4);
    transform: rotate(180deg);
  }

  .country-card ul {
    max-height: calc(70vh - 50px);
    overflow-y: auto;
  }
}

.flag-icon {
  display: inline-block;
  vertical-align: middle;
  width: 22px;
  height: 16px;
  border-radius: 2px;
  box-shadow: 0 0 1px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}
