.country-dropdown-wrapper {
  position: relative;
  width: 100%;
}

.country-dropdown-button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1rem 1rem 3.5rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  font-size: 1rem;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  text-align: left;
}

.country-dropdown-button:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.4);
}

.country-dropdown-button:focus {
  outline: none;
  border-color: #1DB954;
  box-shadow: 0 0 0 3px rgba(29, 185, 84, 0.15);
}

.country-dropdown-button.open {
  border-color: #1DB954;
  box-shadow: 0 0 0 3px rgba(29, 185, 84, 0.15);
  background: rgba(0, 0, 0, 0.5);
}

.country-dropdown-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.5);
}

.country-dropdown-value {
  flex: 1;
}

.country-dropdown-placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.country-dropdown-chevron {
  color: rgba(255, 255, 255, 0.5);
  transition: transform 0.2s ease;
}

.country-dropdown-button.open .country-dropdown-chevron {
  transform: rotate(180deg);
  color: #fff;
}

.country-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  background: #1e1e1e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  z-index: 50;
  overflow: hidden;
  max-height: 20rem;
  display: flex;
  flex-direction: column;
}

.country-dropdown-search {
  padding: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: #1e1e1e;
}

.country-dropdown-search-input {
  width: 100%;
  padding: 0.5rem 0.75rem 0.5rem 2.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  font-size: 0.875rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
  outline: none;
  transition: all 0.2s ease;
}

.country-dropdown-search-input:focus {
  border-color: #1DB954;
  box-shadow: 0 0 0 2px rgba(29, 185, 84, 0.15);
  background: rgba(0, 0, 0, 0.4);
}

.country-dropdown-list {
  max-height: min(15rem, 45vh);
  overflow-y: auto;
  background: #1e1e1e;
}

.country-dropdown-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.9);
}

.country-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.country-dropdown-item.selected {
  background: rgba(29, 185, 84, 0.15);
  color: #1DB954;
  font-weight: 600;
}

.country-dropdown-code {
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
}

.country-dropdown-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
}

.country-dropdown-list::-webkit-scrollbar {
  width: 8px;
}

.country-dropdown-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.country-dropdown-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.country-dropdown-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

@media (max-width: 640px) {
  .country-dropdown-button {
    min-height: 52px;
    padding: 0.875rem 0.875rem 0.875rem 3rem;
  }

  .country-dropdown-icon {
    left: 0.875rem;
  }

  .country-dropdown-menu {
    max-height: 60vh;
  }

  .country-dropdown-item {
    min-height: 46px;
    padding: 0.75rem 0.875rem;
  }
}
