.mst-wc-tools {
    margin: 15px 0;
    clear: both;
}

.mst-wc-tools .wccb-copy-box {
    margin-top: 10px;
    display: inline-block;
    width: auto;
}

.mst-wc-tools .wccb-copy-box button#wccb-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    min-height: 40px;
    border-radius: 6px;
    background: #f7f7f7;
    border: 1px solid rgba(0,0,0,0.15) !important;
    color: #222 !important;
    text-decoration: none;
    cursor: pointer;
    user-select: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.mst-wc-tools .wccb-copy-box button#wccb-copy-btn::before {
    content: "📋";
    font-size: 1.1em;
}

.mst-wc-tools .wccb-copy-box button#wccb-copy-btn:hover {
    background: #eeeeee !important;
    border-color: rgba(0,0,0,0.3) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.mst-wc-tools .wccb-copy-box button#wccb-copy-btn:focus-visible {
    outline: 2px solid rgba(0,0,0,0.15);
    outline-offset: 2px;
}

.mst-wc-tools .wccb-copy-box button#wccb-copy-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    pointer-events: none;
}

.mst-wc-tools .wccb-copy-box button#wccb-copy-btn.is-copied {
    background: #e8f5e9 !important;
    border-color: #a5d6a7 !important;
    color: #2e7d32 !important;
}

.mst-wc-tools .wccb-copy-box button#wccb-copy-btn.is-copied::before {
    content: "✅";
}

.mst-wc-tools .wccb-copy-box button#wccb-copy-btn:active {
    transform: translateY(1px);
}

/* Toast Notification (Simple) */
.mst-wc-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 10px 20px;
    border-radius: 30px;
    z-index: 99999;
    font-size: 14px;
    animation: mstFadeInUp 0.3s ease forwards;
}

@keyframes mstFadeInUp {
    from { opacity: 0; transform: translate(-50%, 10px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

/* Custom Add to Cart Button (Beside Mode) */
.mst-custom-cart-btn {
    vertical-align: middle;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Container for Single Product Actions */
.mst-single-actions {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    vertical-align: middle;
}

.mst-zalo-btn {
    background-color: #0068ff;
    color: #fff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
}

.mst-zalo-btn:hover {
    background-color: #0056d6;
    color: #fff;
    opacity: 0.95;
    text-decoration: none;
}

/* Fix for Single Product Add to Cart area (Simple & Variable) */
.single-product div.product form.cart,
.single-product div.product form.cart .woocommerce-variation-add-to-cart {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.single-product div.product form.cart .mst-single-actions,
.single-product div.product form.cart .woocommerce-variation-add-to-cart .mst-single-actions {
    margin: 0;
    display: inline-flex;
    gap: 10px;
    align-items: center;
}

/* Ensure buttons don't wrap on desktop if space allows */
@media (min-width: 769px) {
    .single-product div.product form.cart .woocommerce-variation-add-to-cart .single_add_to_cart_button,
    .single-product div.product form.cart .woocommerce-variation-add-to-cart .mst-single-actions,
    .single-product div.product form.cart .single_add_to_cart_button {
        flex: 0 0 auto;
        width: auto;
    }
}

/* Ensure custom loop button inherits layout if needed */
.mst-custom-loop-btn {
    width: auto;
    display: inline-block;
}

/* Responsive adjustment for small screens */
@media (max-width: 768px) {
    .mst-single-actions {
        width: 100%;
    }
    .mst-zalo-btn {
        width: 100%;
        margin-top: 5px;
    }
    .mst-wc-tools .wccb-copy-box,
    .mst-wc-tools .wccb-copy-box button#wccb-copy-btn {
        width: 100%;
        min-height: 44px;
        padding: 12px 14px;
        box-sizing: border-box;
    }
    .mst-add-beside-wrap {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }
}
