/**
 * 购物车网关样式
 * 版本: 1.0.0
 */

/* 隐藏默认的 Update Cart 按钮 */
button[name="update_cart"] {
    display: none !important;
}

/* 提示信息 - 增强版 */
.cart-gateway-notice {
    margin-bottom: 20px;
    padding: 18px 24px;
    background: linear-gradient(135deg, #fff9e6 0%, #fffbf0 100%);
    border: 3px solid #ffc107;
    border-left: 6px solid #ff9800;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.2);
    animation: notice-pulse 3s ease-in-out infinite;
    position: relative;
}

.cart-gateway-notice::before {
    position: absolute;
    left: -3px;
    top: -3px;
    font-size: 24px;
    animation: bounce-icon 2s ease-in-out infinite;
}

@keyframes notice-pulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(255, 152, 0, 0.2);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 6px 20px rgba(255, 152, 0, 0.4);
        transform: scale(1.01);
    }
}

@keyframes bounce-icon {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

.cart-gateway-notice p {
    margin: 0;
    font-size: 16px;
    color: #854d0e;
    font-weight: 600;
    line-height: 1.6;
}

.cart-gateway-notice strong {
    color: #dc2626;
    font-size: 17px;
    font-weight: 700;
}

/* 选择控制区域 */
.cart-gateway-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 16px;
    background: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.select-all-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    margin: 0;
}

.select-all-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin: 0;
}

/* 计算按钮 - 增强版 */
.btn-calculate-selected {
    background: linear-gradient(135deg, #0071a1 0%, #005177 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    transition: all 0.3s;
    box-shadow: 0 3px 10px rgba(0, 113, 161, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-calculate-selected::before {
    content: "⚡";
    margin-right: 6px;
    font-size: 16px;
}

.btn-calculate-selected:hover {
    background: linear-gradient(135deg, #005177 0%, #003d5c 100%);
    box-shadow: 0 5px 15px rgba(0, 113, 161, 0.5);
    transform: translateY(-2px);
}

.btn-calculate-selected:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* 选中计数 */
.selection-info {
    color: #666;
    font-size: 13px;
    margin-left: auto;
}

.selection-info .selected-count {
    color: #dc3545;
    font-weight: 700;
    font-size: 15px;
}

.partial-checkout-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #ffc107;
    color: #333;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
}

/* 警告信息 - 增强版 */
.cart-gateway-warning {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-left: 5px solid #dc3545;
    border-radius: 6px;
    padding: 15px 20px;
    margin-bottom: 20px;
    font-size: 15px;
    color: #856404;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
    animation: pulse-warning 2s ease-in-out infinite;
}

@keyframes pulse-warning {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
    }
    50% {
        box-shadow: 0 4px 16px rgba(255, 193, 7, 0.5);
    }
}

.cart-gateway-warning strong {
    color: #dc3545;
    font-size: 16px;
}

/* 商品复选框 */
.cart-item-with-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.cart-item-with-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin-top: 2px;
    flex-shrink: 0;
}

.cart-item-name {
    flex: 1;
}

/* 未选中商品样式 */
.woocommerce-cart-form__cart-item.item-not-selected {
    opacity: 0.5;
    background: #f9f9f9;
}

.woocommerce-cart-form__cart-item.item-not-selected .product-name a,
.woocommerce-cart-form__cart-item.item-not-selected .woocommerce-Price-amount {
    color: #999 !important;
}

/* 隐藏购物车的 Subtotal 列 */
.woocommerce-cart-form table.cart th.product-subtotal,
.woocommerce-cart-form table.cart td.product-subtotal {
    display: none !important;
}

/* 隐藏购物车汇总区域的 Subtotal 行 */
tr.cart-subtotal {
    display: none !important;
}
