.field-area-picker-wrapper {
  width: 100%;
}
.field-area-picker-wrapper.has-error .area-picker-trigger {
  box-shadow: 0 0 0 1px var(--el-color-danger) inset !important;
}
.area-picker-trigger {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 32px;
  height: 32px;
  padding: 0 12px 0 8px;
  box-sizing: border-box;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 0 0 1px #edf0f2 inset;
  cursor: pointer;
  transition: box-shadow 0.2s;
}
.area-picker-trigger.has-tags {
  height: auto;
  min-height: 32px;
  padding: 3px 12px 3px 8px;
}
.area-picker-trigger.is-focus {
  box-shadow: 0 0 0 1px var(--el-color-primary, #1a5eff) inset;
}
.area-picker-trigger.is-disabled {
  cursor: not-allowed;
  background: var(--el-fill-color-light, #f5f7fa);
}
.area-picker-trigger-tags {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 1px 0;
}
.area-picker-tag {
  max-width: 100%;
}
.area-picker-tag .el-tag__content {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.area-picker-collapse-tag {
  cursor: default;
}
.area-picker-trigger-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  color: #16181a;
}
.area-picker-trigger-placeholder {
  flex: 1;
  font-size: 14px;
  color: rgba(9, 9, 10, 0.24);
}
.area-picker-trigger-suffix {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  margin-left: 8px;
}
.area-picker-clear {
  font-size: 16px;
  color: rgba(22, 24, 26, 0.2);
}
.area-picker-clear:hover {
  color: rgba(22, 24, 26, 0.5);
}
.area-picker-arrow {
  font-size: 14px;
  color: rgba(22, 24, 26, 0.4);
  transition: transform 0.2s;
}
.area-picker-arrow.is-reverse {
  transform: rotate(180deg);
}
.field-area-picker-error {
  font-size: 12px;
  color: var(--el-color-danger, #f56c6c);
  line-height: 1.2;
  padding-top: 2px;
}
.area-readonly-text {
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  min-width: 0;
  vertical-align: bottom;
}
/* 面板内样式（popover 内容在组件内，scoped 可生效） */
.area-picker-panel {
  overflow: hidden;
}
.area-picker-region-tabs {
  display: flex;
  height: 48px;
}
.area-picker-region-tab {
  flex: 0 0 126px;
  height: 48px;
  border: none;
  background: #eff0f1;
  font-size: 16px;
  font-weight: 600;
  color: rgba(22, 24, 26, 0.9);
  cursor: pointer;
  padding: 0;
}
.area-picker-region-tab.is-active {
  background: #fff;
}
.area-picker-region-tab:first-child.is-active {
  border-radius: 4px 0 0 0;
}
.area-picker-region-tab-fill {
  flex: 1;
  background: #eff0f1;
  border-radius: 0 4px 0 0;
}
.area-picker-search {
  padding: 12px 16px;
}
.area-picker-search .el-input__wrapper {
  min-height: 32px;
  height: 32px;
  padding: 0 12px;
  border-radius: 4px;
  box-shadow: 0 0 0 1px #edf0f2 inset !important;
}
.area-picker-search .el-input__wrapper.is-focus {
  box-shadow: 0 0 0 1px var(--el-color-primary, #1a5eff) inset !important;
}
.area-picker-search .el-input__inner {
  font-size: 14px;
  color: #16181a;
}
.area-picker-search .el-input__inner::placeholder {
  color: rgba(9, 9, 10, 0.24);
}
.area-picker-search .el-input__prefix {
  color: rgba(9, 9, 10, 0.24);
}
.area-picker-sub-tabs {
  display: flex;
  position: relative;
  padding: 0 16px;
  border-bottom: 1px solid #f0f0f0;
}
.area-picker-sub-tabs::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 16px;
  height: 4px;
  width: 34px;
  background: var(--el-color-primary, #1a5eff);
  transition: transform 0.2s;
  transform: translateX(46px);
}
.area-picker-sub-tabs.is-single::after {
  transform: translateX(46px);
}
.area-picker-sub-tabs:has(.area-picker-sub-tab:first-child.is-active)::after {
  --active-index: 0;
  transform: translateX(46px);
}
.area-picker-sub-tabs:has(.area-picker-sub-tab:nth-child(2).is-active)::after {
  --active-index: 1;
  transform: translateX(calc(172px));
}
.area-picker-sub-tab {
  flex: 0 0 126px;
  height: 40px;
  border: none;
  background: transparent;
  font-size: 16px;
  font-weight: 400;
  color: rgba(22, 24, 26, 0.5);
  cursor: pointer;
  padding: 8px 0;
}
.area-picker-sub-tab.is-active {
  color: #16181a;
  font-weight: 500;
}
.area-picker-path-tabs {
  display: flex;
  position: relative;
  padding: 0 16px;
  border-bottom: 1px solid #f0f0f0;
  min-height: 45px;
}
.area-picker-path-tab {
  flex: 0 0 126px;
  height: 40px;
  border: none;
  background: transparent;
  font-size: 16px;
  font-weight: 400;
  color: rgba(22, 24, 26, 0.5);
  cursor: pointer;
  padding: 8px 4px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  box-sizing: border-box;
}
.area-picker-path-tab.is-active:not(.is-placeholder) {
  color: #16181a;
  font-weight: 500;
}
.area-picker-path-tab.is-active:not(.is-placeholder)::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 34px;
  height: 4px;
  background: var(--el-color-primary, #1a5eff);
}
.area-picker-path-tab.is-selected:not(.is-active):not(.is-placeholder) {
  color: var(--el-color-primary, #1a5eff);
  font-weight: 500;
}
.area-picker-path-tab.is-placeholder {
  cursor: default;
  color: rgba(22, 24, 26, 0.5);
}
.area-picker-path-tab-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.area-picker-path-tab-close {
  flex-shrink: 0;
  font-size: 12px;
  color: rgba(22, 24, 26, 0.28);
}
.area-picker-path-tab-close:hover {
  color: rgba(22, 24, 26, 0.6);
}
.area-picker-grid-wrap {
  max-height: 280px;
  overflow-y: auto;
  padding: 12px 16px 16px;
}
.area-picker-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}
.area-picker-grid-item {
  height: 36px;
  border: none;
  background: transparent;
  font-size: 14px;
  color: rgba(0, 0, 0, 0.8);
  cursor: pointer;
  padding: 8px 6px;
  text-align: center;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
}
.area-picker-grid-item:hover,
.area-picker-grid-item.is-active {
  background: var(--el-color-primary, #1a5eff);
  color: #fff;
}
.area-picker-grid-item.is-active .area-picker-grid-item-close,
.area-picker-grid-item:hover .area-picker-grid-item-close {
  color: rgba(255, 255, 255, 0.85);
}
.area-picker-grid-item.is-active .area-picker-grid-item-close:hover,
.area-picker-grid-item:hover .area-picker-grid-item-close:hover {
  color: #fff;
}
.area-picker-grid-item-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.area-picker-grid-item-close {
  flex-shrink: 0;
  font-size: 12px;
  color: rgba(22, 24, 26, 0.35);
}
.area-picker-grid-item-close:hover {
  color: rgba(22, 24, 26, 0.65);
}
.area-picker-search-results {
  border-top: 1px solid #edf0f2;
  max-height: 208px;
  overflow-y: auto;
}
.area-picker-search-item {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 12px 16px;
  border: none;
  background: transparent;
  text-align: left;
  font-size: 14px;
  font-weight: 500;
  color: #16181a;
  cursor: pointer;
  box-sizing: border-box;
}
.area-picker-search-item:hover,
.area-picker-search-item.is-active {
  background: #f5f7fa;
}
.area-picker-search-item.is-active {
  color: var(--el-color-primary, #1a5eff);
  font-weight: 600;
}
.area-picker-search-item .is-highlight {
  color: var(--el-color-primary, #1a5eff);
}
.area-picker-empty {
  padding: 40px 42px;
  font-size: 14px;
  line-height: 20px;
  color: rgba(22, 24, 26, 0.7);
  text-align: center;
}
.area-picker-empty-link {
  color: var(--el-color-primary, #1a5eff);
  cursor: pointer;
}
