/* General action buttons */
.action-button {
    background-color: #6f42c1;
    color: #fff;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    min-width: 120px;
}

.action-button:hover {
    background-color: #5a35a0;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Button with icon */
.action-button img {
    margin-right: 8px;
    width: 20px;
    height: 20px;
}

/* Product buttons */
.product-button {
    display: flex;
    justify-content: space-between;
	gap: 7px; /* Aumenta questo valore per più spazio */
    align-items: center;
    font-size: 16px;
    border-radius: 8px;
    background-color: #444;
    color: white;
    border: 1px solid #555;
    cursor: pointer;
    width: 180px;
    height: 44px;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
}

.product-button:hover {
    background-color: #555;
    border-color: #6f42c1;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.product-button.selected {
    background-color: #6f42c1;
    color: #fff;
    border-color: #5a35a0;
}

/* Edit mode button */
#save-product-button.edit-mode {
    background-color: #4CAF50;
}

#save-product-button.edit-mode:hover {
    background-color: #45a049;
}

/* Delete button */
.delete-button {
    background-color: #dc3545;
}

.delete-button:hover {
    background-color: #c82333;
}

/* Product actions container */
.product-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
    width: 100%;
}

/* Mobile adjustments for product actions */
@media (max-width: 600px) {
    .product-actions {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    
    .product-actions .action-button {
        width: 80%;
        max-width: 200px;
        margin: 5px 0;
    }
}

.remove-icon {
    color: #ff4444;
    cursor: pointer;
    font-weight: bold;
    font-size: 20px;
    line-height: 1;
    padding: 0 8px;
}

.remove-icon:hover {
    color: #ff6666;
}

/* Voice and Management buttons */
#voice-command,
#gestione {
    position: fixed;
    bottom: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #6f42c1;
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    padding: 0;
    min-width: unset;
    margin: 0;
    transition: all 0.3s ease;
}

#gestione {
    right: 20px;
}

#voice-command {
    left: 20px;
}

#voice-command.active {
    background-color: #dc3545;
    animation: pulse 2s infinite;
}

#gestione:hover,
#voice-command:hover {
    background-color: #5a35a0;
    transform: scale(1.1);
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(220, 53, 69, 0.5);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
    }
}

/* Close management button */
#close-management {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
    height: 25px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#close-management:hover {
    background-color: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Mobile adjustments */
@media (max-width: 600px) {
    .product {
        width: calc(50% - 10px);
    }

    .product-button {
        width: 169px;
        font-size: 14px;
        height: 43px;
    }

    .action-button {
        width: 100%;
        margin: 10px 0;
        font-size: 14px;
        padding: 10px 20px;
    }

    #close-management {
        position: fixed;
        top: 10px;
        right: 10px;
        min-width: 80px;
        height: 20px;
        font-size: 14px;
        padding: 8px 15px;
    }
}
