/* 虚拟列表国家选择器样式 */

.vcs-wrapper {
  position: relative;
  width: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.vcs-selected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 12px;
  background: linear-gradient(180deg, #319AF5 0%, #2465B9 100%);
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 40px;

}

.vcs-selected:hover {
  border-color: #999;
}

.vcs-selected:focus {
  outline: none;
  border-color: #4CAF50;
  box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.1);
}

.vcs-selected-text {
  display: flex;
  align-items: center;
  gap: 3px;
  flex: 1;
  color: #333;
  font-size: 14px;
  width: 70px;
}

.vcs-arrow {
  transition: transform 0.2s;
  flex-shrink: 0;
  color: #fff;
}

.vcs-wrapper.open .vcs-arrow {
  transform: rotate(180deg);
}

.vcs-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 999;
  overflow: hidden;
  width: 249px;
}

.vcs-search {
  padding: 8px;
  border-bottom: 1px solid #eee;
}

.vcs-search-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.vcs-search-input:focus {
  border-color: #4CAF50;
}

.vcs-list-wrapper {
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
}

.vcs-list-wrapper::-webkit-scrollbar {
  width: 8px;
}

.vcs-list-wrapper::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.vcs-list-wrapper::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}

.vcs-list-wrapper::-webkit-scrollbar-thumb:hover {
  background: #999;
}

.vcs-list-spacer {
  width: 100%;
}

.vcs-list {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.vcs-item {
  position: absolute;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  cursor: pointer;
  transition: background-color 0.15s;
  height: 40px;
  box-sizing: border-box;
}

.vcs-item:hover {
  background-color: #f5f5f5;
}

.vcs-item.selected {
  background-color: #e8f5e9;
  color: #4CAF50;
  font-weight: 500;
}

.vcs-flag {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
}

.vcs-name {
  flex: 1;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vcs-dial {
  font-size: 13px;
  color: #666;
  flex-shrink: 0;
}

.vcs-dial-small {
  font-size: 12px;
  color: #ffffff;
  margin-left: 4px;
}

/* 响应式 */
@media (max-width: 768px) {

  
  .vcs-item {
    padding: 12px;
    height: 44px;
  }
  
  .vcs-search-input {
    padding: 10px 12px;
    font-size: 16px; /* 防止iOS自动缩放 */
  }
}

/* 加载状态 */
.vcs-loading {
  text-align: center;
  padding: 20px;
  color: #999;
  font-size: 14px;
}

/* 无结果 */
.vcs-no-results {
  text-align: center;
  padding: 20px;
  color: #999;
  font-size: 14px;
}

/* 错误状态 */
.vcs-wrapper.error .vcs-selected {
  border-color: #f44336;
}

.vcs-wrapper.error .vcs-selected:focus {
  box-shadow: 0 0 0 2px rgba(244, 67, 54, 0.1);
}
