/* 收货地址列表页样式 - 基于tcb-shop-demo设计规范 */

/* 页面容器 */
.address-container {
  min-height: 100vh;
  background-color: #f5f5f5;
  display: flex;
  flex-direction: column;
}

/* 滚动区域 */
.address-scroll-view {
  flex: 1;
}

/* 加载状态 */
.loading-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 80rpx 0;
}

.loading-icon {
  width: 64rpx;
  height: 64rpx;
  color: #fa4126;
}

/* 地址列表 */
.address-list {
  padding: 0;
}

/* 地址项 */
.address-item {
  background-color: #ffffff;
  margin-bottom: 16rpx;
  position: relative;
  overflow: hidden;
}

.address-item::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background-color: #e5e5e5;
  transform: scaleY(0.5);
}

.address-item:last-child::after {
  display: none;
}

/* 侧滑删除容器 */
.swipe-cell {
  display: flex;
  width: 100%;
  position: relative;
  cursor: pointer;
}

.swipe-content {
  flex: 1;
  min-width: 100%;
  background-color: #ffffff;
}

.swipe-actions {
  position: absolute;
  right: -288rpx;
  top: 0;
  bottom: 0;
  width: 288rpx;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: right 0.3s ease;
  z-index: 10;
}

.swipe-actions.swipe-open {
  right: 0;
}

.swipe-cell {
  touch-action: pan-x;
}

/* 移除hover效果，完全依赖JS控制 */

.delete-btn {
  width: 100%;
  height: 100%;
  background-color: #fa4126;
  color: #ffffff;
  border: none;
  font-size: 32rpx;
  display: flex;
  align-items: center;
  justify-content: center;
}

.delete-btn:hover {
  background-color: #e6391a;
}

/* 地址内容 */
.address-content {
  padding: 32rpx;
}

/* 地址头部 */
.address-header {
  display: flex;
  align-items: center;
  margin-bottom: 16rpx;
}

.address-name {
  font-size: 32rpx;
  font-weight: 500;
  color: #333333;
  margin-right: 24rpx;
}

.address-phone {
  font-size: 28rpx;
  color: #999999;
  margin-right: 24rpx;
}

.default-tag {
  font-size: 24rpx;
  color: #fa4126;
  background-color: #ffece8;
  padding: 4rpx 12rpx;
  border-radius: 4rpx;
}

/* 地址详情 */
.address-detail {
  font-size: 28rpx;
  color: #666666;
  line-height: 1.5;
  margin-bottom: 24rpx;
}

/* 地址操作区域 */
.address-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24rpx;
  border-top: 2rpx solid #f0f0f0;
}

.address-actions:only-child {
  justify-content: flex-end;
}

.action-buttons {
  display: flex;
  gap: 32rpx;
}

.set-default-btn,
.edit-btn {
  font-size: 28rpx;
  color: #666666;
  background: none;
  border: none;
  padding: 8rpx 16rpx;
}

.set-default-btn:hover,
.edit-btn:hover {
  color: #fa4126;
}

.select-btn {
  background-color: #fa4126;
  color: #ffffff;
  border: none;
  border-radius: 8rpx;
  padding: 16rpx 32rpx;
  font-size: 28rpx;
  font-weight: 500;
}

.select-btn:hover {
  background-color: #e6391a;
}

/* 空状态 */
.no-address {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 160rpx 0;
}

.no-address-icon {
  width: 160rpx;
  height: 160rpx;
  background-color: #f0f0f0;
  border-radius: 80rpx;
  margin-bottom: 32rpx;
  position: relative;
}

.no-address-icon::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80rpx;
  height: 80rpx;
  background-color: #cccccc;
  border-radius: 40rpx;
}

.no-address-text {
  font-size: 32rpx;
  color: #999999;
}

/* 底部固定区域 */
.bottom-fixed {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #ffffff;
  padding: 32rpx;
  box-shadow: 0 -4rpx 16rpx rgba(0, 0, 0, 0.1);
}

.address-btn {
  width: 100%;
  height: 88rpx;
  background-color: #fa4126;
  color: #ffffff;
  border: none;
  border-radius: 44rpx;
  font-size: 32rpx;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}

.address-btn.disabled {
  background-color: #c6c6c6;
  color: #ffffff;
  cursor: not-allowed;
}

.address-btn:not(.disabled):hover {
  background-color: #e6391a;
}

.limit-tip {
  font-size: 24rpx;
  color: #999999;
  text-align: center;
  margin-top: 16rpx;
}

/* 响应式适配 */
@media (max-width: 375px) {
  .address-content {
    padding: 24rpx;
  }

  .address-name {
    font-size: 30rpx;
  }

  .address-phone {
    font-size: 26rpx;
  }

  .address-detail {
    font-size: 26rpx;
  }
}