/**
 * Product Trash Button Styles
 * Positions a trash icon in the bottom left corner of product cards
 */

.my-product-card {
    position: relative;
}

.product-trash-btn {
    position: absolute;
    bottom: 10px;
    left: 10px;
    z-index: 10;

    /* Button styling */
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    padding: 8px;
    cursor: pointer;

    /* Flexbox for centering icon */
    display: flex;
    align-items: center;
    justify-content: center;

    /* Transitions */
    transition: all 0.3s ease;

    /* Shadow for visibility */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.product-trash-btn:hover {
    background: #fff;
    border-color: #ff4444;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: scale(1.1);
}

.product-trash-btn:active {
    transform: scale(0.95);
}

.product-trash-btn:disabled,
.product-trash-btn.loading {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Icon styling */
.product-trash-btn svg {
    width: 20px;
    height: 20px;
    display: block;
    color: #333;
    transition: color 0.3s ease;
}

.product-trash-btn:hover svg {
    color: #ff4444;
}

/* Loading state */
.product-trash-btn.loading svg {
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .product-trash-btn {
        width: 36px;
        height: 36px;
        padding: 6px;
        bottom: 8px;
        left: 8px;
    }

    .product-trash-btn svg {
        width: 18px;
        height: 18px;
    }
}

/* Ensure the button doesn't interfere with card hover effects */
.my-product-card:hover .product-trash-btn {
    /* Keep button visible on card hover */
    visibility: visible;
    opacity: 1;
}
