/**
 * 移动端WhatsApp结账按钮样式优化
 * 确保移动端的WhatsApp结账按钮样式正确应用
 */

/* 移动端特定样式 - 使用!important确保最高优先级 */
@media (max-width: 768px) {
  .checkout-whatsapp-btn,
  .whatsapp-checkout-btn,
  button[class*="whatsapp"],
  [class*="checkout"][class*="whatsapp"] {
    /* 基本样式 */
    background-color: #25D366 !important; /* WhatsApp绿色 */
    background-image: linear-gradient(to right, #25D366, #1DA851) !important; /* 微妙渐变 */
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    letter-spacing: 0.3px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    margin: 15px auto 5px !important;
    width: 100% !important;
    height: 48px !important; /* 保持当前大小 */
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 6px rgba(37, 211, 102, 0.4) !important;
    position: relative !important;
    overflow: hidden !important;
    text-decoration: none !important;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2) !important;
    
    /* 添加微妙的内部边框 */
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    
    /* 确保按钮内容垂直居中 */
    line-height: 1 !important;
  }

  /* 图标样式 */
  .checkout-whatsapp-btn i,
  .whatsapp-checkout-btn i,
  button[class*="whatsapp"] i,
  [class*="checkout"][class*="whatsapp"] i {
    font-size: 20px !important; /* 适当的图标大小 */
    margin-right: 0 !important; /* 移除默认的右边距，使用gap控制 */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* 文本样式 */
  .checkout-whatsapp-btn span,
  .whatsapp-checkout-btn span,
  button[class*="whatsapp"] span,
  [class*="checkout"][class*="whatsapp"] span {
    font-weight: 600 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* 点击效果 */
  .checkout-whatsapp-btn:active,
  .whatsapp-checkout-btn:active,
  button[class*="whatsapp"]:active,
  [class*="checkout"][class*="whatsapp"]:active {
    transform: scale(0.98) !important;
    box-shadow: 0 1px 3px rgba(37, 211, 102, 0.3) !important;
    background-image: linear-gradient(to right, #1DA851, #25D366) !important; /* 反向渐变 */
  }
  
  /* 闪光效果 - 微妙的高光 */
  .checkout-whatsapp-btn::after,
  .whatsapp-checkout-btn::after,
  button[class*="whatsapp"]::after,
  [class*="checkout"][class*="whatsapp"]::after {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(to bottom, 
                rgba(255, 255, 255, 0.2) 0%, 
                rgba(255, 255, 255, 0.1) 50%, 
                rgba(255, 255, 255, 0) 100%) !important;
    pointer-events: none !important;
  }
}

/* 超小屏幕设备适配 */
@media (max-width: 360px) {
  .checkout-whatsapp-btn,
  .whatsapp-checkout-btn,
  button[class*="whatsapp"],
  [class*="checkout"][class*="whatsapp"] {
    font-size: 15px !important; /* 稍微减小字体 */
    height: 46px !important; /* 稍微减小高度 */
    gap: 6px !important; /* 减小间距 */
  }
  
  .checkout-whatsapp-btn i,
  .whatsapp-checkout-btn i,
  button[class*="whatsapp"] i,
  [class*="checkout"][class*="whatsapp"] i {
    font-size: 18px !important; /* 减小图标 */
  }
}
