/* pages/device/fence/fence.wxss */
.page-container {
  min-height: 100vh;
  background-color: #f6f6f6;
}

/* 顶部操作栏 */
.top-bar {
  background-color: #fff;
  padding: 20rpx;
  box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
}

/* 搜索栏样式 */
.search-bar {
  display: flex;
  align-items: center;
  margin-bottom: 20rpx;
}

.search-input {
  flex: 1;
  height: 60rpx;
  padding: 0 20rpx;
  background-color: #f5f5f5;
  border-radius: 8rpx;
  font-size: 28rpx;
}

.search-btn {
  width: 120rpx;
  height: 60rpx;
  line-height: 60rpx;
  padding: 0;
  margin-left: 20rpx;
  background-color: #52c41a;
  color: #fff;
  font-size: 28rpx;
  border-radius: 8rpx;
  border: none;
}

.search-btn::after {
  border: none;
}

.clear-btn {
  width: 100rpx;
  height: 60rpx;
  line-height: 60rpx;
  padding: 0;
  margin-left: 20rpx;
  background-color: #ff4d4f;
  color: #fff;
  font-size: 28rpx;
  border-radius: 8rpx;
  border: none;
}

.clear-btn::after {
  border: none;
}

/* 视图切换按钮 */
.view-toggle {
  display: flex;
  gap: 20rpx;
  justify-content: center;
}

.toggle-btn {
  flex: 1;
  height: 60rpx;
  line-height: 60rpx;
  padding: 0;
  background-color: #f5f5f5;
  color: #666;
  font-size: 28rpx;
  border-radius: 8rpx;
  border: none;
}

.toggle-btn::after {
  border: none;
}

.toggle-btn.active {
  background-color: #52c41a;
  color: #fff;
  font-weight: bold;
}

/* 地图容器 */
.map-container {
  position: relative;
  width: 100%;
  height: calc(100vh - 200rpx);
}

.fence-map {
  width: 100%;
  height: 100%;
}

/* 地图信息卡片 */
.map-info-card {
  position: absolute;
  bottom: 20rpx;
  left: 20rpx;
  right: 20rpx;
  background-color: rgba(255, 255, 255, 0.95);
  border-radius: 12rpx;
  padding: 24rpx;
  box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.15);
}

.info-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16rpx;
  padding-bottom: 12rpx;
  border-bottom: 1rpx solid #f0f0f0;
}

.info-title {
  font-size: 30rpx;
  font-weight: bold;
  color: #333;
}

.info-status {
  padding: 6rpx 16rpx;
  font-size: 24rpx;
  border-radius: 20rpx;
  font-weight: 500;
}

.info-content {
  display: flex;
  flex-direction: column;
  gap: 12rpx;
}

.info-row {
  display: flex;
  font-size: 26rpx;
}

.info-label {
  color: #999;
  min-width: 140rpx;
  flex-shrink: 0;
}

.info-value {
  color: #333;
  flex: 1;
}

/* 列表容器 */
.list-container {
  padding: 20rpx;
}

/* 加载状态 */
.loading-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 400rpx;
  color: #999;
  font-size: 28rpx;
}

/* 围栏列表样式 */
.fence-list {
  padding-bottom: 20rpx;
}

.list-item {
  background-color: #fff;
  margin-bottom: 20rpx;
  border-radius: 12rpx;
  overflow: hidden;
  box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
  transition: all 0.3s;
}

.list-item:active {
  transform: scale(0.98);
  box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
}

.item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24rpx 24rpx 16rpx;
  border-bottom: 1rpx solid #f0f0f0;
}

.item-title {
  font-size: 32rpx;
  font-weight: bold;
  color: #333;
}

.item-status {
  padding: 8rpx 20rpx;
  font-size: 24rpx;
  border-radius: 20rpx;
  font-weight: 500;
}

.status-active {
  background-color: #f6ffed;
  color: #52c41a;
  border: 1rpx solid #b7eb8f;
}

.status-inactive {
  background-color: #fff1f0;
  color: #ff4d4f;
  border: 1rpx solid #ffccc7;
}

.item-content {
  display: flex;
  flex-direction: column;
  gap: 16rpx;
  padding: 20rpx 24rpx;
}

.item-row {
  display: flex;
  align-items: flex-start;
  font-size: 28rpx;
}

.item-label {
  color: #999;
  min-width: 160rpx;
  flex-shrink: 0;
}

.item-value {
  color: #333;
  flex: 1;
  word-break: break-all;
}

.item-footer {
  padding: 16rpx 24rpx;
  background-color: #f8f8f8;
  text-align: center;
  border-top: 1rpx solid #f0f0f0;
}

.view-map-hint {
  font-size: 26rpx;
  color: #52c41a;
  font-weight: 500;
}

/* 空状态样式 */
.empty-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100rpx 0;
}

.empty-icon {
  font-size: 120rpx;
  margin-bottom: 30rpx;
  opacity: 0.3;
}

.empty-text {
  font-size: 28rpx;
  color: #999;
}

/* 分页样式 */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 30rpx 0;
  padding: 20rpx;
  background-color: #fff;
  border-radius: 12rpx;
}

.page-btn {
  width: 150rpx;
  height: 60rpx;
  line-height: 60rpx;
  padding: 0;
  margin: 0 10rpx;
  background-color: #52c41a;
  color: #fff;
  font-size: 26rpx;
  border-radius: 8rpx;
  border: none;
}

.page-btn::after {
  border: none;
}

.page-btn[disabled] {
  background-color: #d9d9d9;
  color: #999;
}

.page-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 10rpx;
  margin: 0 20rpx;
  max-width: 400rpx;
  justify-content: center;
}

.page-number {
  width: 60rpx;
  height: 60rpx;
  line-height: 60rpx;
  text-align: center;
  font-size: 26rpx;
  color: #333;
  background-color: #f5f5f5;
  border-radius: 8rpx;
}

.page-number.active {
  background-color: #52c41a;
  color: #fff;
  font-weight: bold;
}

/* 数据统计栏 */
.stats-bar {
  text-align: center;
  padding: 20rpx;
  margin-top: 20rpx;
}

.stats-text {
  font-size: 24rpx;
  color: #999;
}
