/* 购物车选择结账 - 表格布局 */

/* 复选框单元格 */
.djyp-cart-checkbox-cell,
.djyp-select-all-cell {
    width: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    vertical-align: top !important;
    text-align: center !important;
    padding: 20px 4px 8px !important;
}

.djyp-cart-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #ff5722;
    margin: 0 !important;
    padding: 0 !important;
}

/* 全选栏（当 thead 不存在时的备用） */
.djyp-select-all-bar {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 0;
    gap: 12px;
}

.djyp-select-all-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.djyp-select-all-wrap label {
    cursor: pointer;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.djyp-selected-count {
    font-size: 13px;
    color: #999;
}

/* 已选合计栏 */
.djyp-selected-total-bar {
    background: #fff8f0;
    border: 1px solid #ff5722;
    border-radius: 6px;
    padding: 15px 20px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.djyp-selected-total-label {
    font-size: 14px;
    color: #666;
}

.djyp-selected-total-amount {
    font-size: 22px;
    font-weight: 700;
    color: #ff5722;
}

/* 自定义结账按钮 */
.djyp-checkout-btn {
    display: block;
    width: 100%;
    padding: 14px 20px;
    background-color: #ff5722;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 10px;
}

.djyp-checkout-btn:hover {
    background-color: #e64a19;
}

.djyp-checkout-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* 隐藏原始的"继续结账"按钮 */
.wc-block-cart .wp-block-woocommerce-proceed-to-checkout-block .wc-block-components-button {
    display: none !important;
}

/* 未选中的商品半透明 */
.wc-block-cart-items__row.djyp-unselected td:not(.djyp-cart-checkbox-cell) {
    opacity: 0.45;
    transition: opacity 0.3s;
}

.wc-block-cart-items__row.djyp-unselected:hover td:not(.djyp-cart-checkbox-cell) {
    opacity: 0.7;
}

/* 加载中遮罩 */
.djyp-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    font-size: 18px;
    color: #333;
}

.djyp-loading-overlay .djyp-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid #ddd;
    border-top-color: #ff5722;
    border-radius: 50%;
    animation: djyp-spin 0.8s linear infinite;
    margin-right: 12px;
}

@keyframes djyp-spin {
    to { transform: rotate(360deg); }
}
