/**
 * 购物车结账信息修复样式
 * 确保结账信息显示在优惠券模态框和WhatsApp结账按钮之间
 */

/* 移动端适配 */
@media (max-width: 768px) {
  /* 优惠券容器样式 */
  .cart-coupon-container {
    position: fixed !important;
    bottom: 210px !important; /* 为结账信息和按钮留出空间 */
    left: 0 !important;
    right: 0 !important;
    background-color: #fff !important;
    padding: 10px 15px !important;
    z-index: 10000 !important;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.05) !important;
  }
  
  /* 优惠券模态框样式调整 */
  .user-coupons-modal-overlay {
    z-index: 20000 !important; /* 确保在最上层 */
  }
  
  /* 为优惠券留出空间，避免被底部固定元素遮挡 */
  .cart-items {
    padding-bottom: 280px !important; /* 为底部的优惠券、结账信息和导航栏留出空间 */
  }
  
  /* 优化优惠券输入容器样式 */
  .coupon-input-container {
    margin: 0 !important;
    padding: 8px !important;
  }
  
  .coupon-input-container h4 {
    margin-top: 0 !important;
    margin-bottom: 8px !important;
    font-size: 14px !important;
  }
  
  /* 优化优惠券显示样式 */
  .applied-coupon {
    padding: 8px !important;
    margin-bottom: 0 !important;
  }
  
  /* 为iOS设备底部安全区域适配 */
  @supports (padding: env(safe-area-inset-bottom)) {
    .cart-coupon-container {
      bottom: calc(210px + env(safe-area-inset-bottom)) !important;
    }
    
    .cart-items {
      padding-bottom: calc(280px + env(safe-area-inset-bottom)) !important;
    }
  }
}
